PHS module SMA-01 library. see: https://developer.mbed.org/users/phsfan/notebook/abitusbmodem/

Dependencies:   Socket lwip-sys lwip

Dependents:   AbitUSBModem_HTTPTest AbitUSBModem_MQTTTest AbitUSBModem_WebsocketTest AbitUSBModem_SMSTest

Fork of VodafoneUSBModem by mbed official

Embed: (wiki syntax)

« Back to documentation index

USBHostPhsPort Class Reference

USBHostPhsPort Class Reference

A class to communicate a USB virtual serial port. More...

#include <USBHostPhs.h>

Inherits IUSBHostSerial.

Inherited by USBHostPhs.

Public Member Functions

 USBHostPhsPort ()
 Constructor.
void baud (int baudrate=921600)
 Set the baud rate of the serial port.
void format (int bits=8, Parity parity=USBHostPhsPort::None, int stop_bits=1)
 Set the transmission format used by the Serial port.
virtual int readable ()
 Check the number of bytes available.
virtual int writeable ()
 Check the free space in output.
virtual void attach (IUSBHostSerialListener *pListener)
 Attach a handler to call when a packet is received / when a packet has been transmitted.
virtual void setupIrq (bool en, IUSBHostSerial::IrqType irq=IUSBHostSerial::RxIrq)
 Enable or disable readable/writeable callbacks.

Detailed Description

A class to communicate a USB virtual serial port.

Definition at line 57 of file USBHostPhs.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 141 of file USBHostPhs.cpp.


Member Function Documentation

void attach ( IUSBHostSerialListener *  pListener ) [virtual]

Attach a handler to call when a packet is received / when a packet has been transmitted.

Parameters:
pListenerinstance of the listener deriving from the IUSBHostSerialListener

Implements IUSBHostSerial.

Definition at line 446 of file USBHostPhs.cpp.

void baud ( int  baudrate = 921600 )

Set the baud rate of the serial port.

Parameters:
baudrateThe baudrate of the serial port (default = 9600).

Definition at line 244 of file USBHostPhs.cpp.

void format ( int  bits = 8,
Parity  parity = USBHostPhsPort::None,
int  stop_bits = 1 
)

Set the transmission format used by the Serial port.

Parameters:
bitsThe number of bits in a word (default = 8)
parityThe parity used (USBHostSerialPort::None, USBHostSerialPort::Odd, USBHostSerialPort::Even, USBHostSerialPort::Mark, USBHostSerialPort::Space; default = USBHostSerialPort::None)
stopThe number of stop bits (1 or 2; default = 1)

Definition at line 249 of file USBHostPhs.cpp.

int readable (  ) [virtual]

Check the number of bytes available.

Returns:
the number of bytes available

Implements IUSBHostSerial.

Definition at line 408 of file USBHostPhs.cpp.

void setupIrq ( bool  en,
IUSBHostSerial::IrqType  irq = IUSBHostSerial::RxIrq 
) [virtual]

Enable or disable readable/writeable callbacks.

Implements IUSBHostSerial.

Definition at line 461 of file USBHostPhs.cpp.

int writeable (  ) [virtual]

Check the free space in output.

Returns:
the number of bytes available

Implements IUSBHostSerial.

Definition at line 427 of file USBHostPhs.cpp.