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
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
USBHostPhsPort | ( | ) |
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:
-
pListener instance 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:
-
baudrate The 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:
-
bits The number of bits in a word (default = 8) parity The parity used (USBHostSerialPort::None, USBHostSerialPort::Odd, USBHostSerialPort::Even, USBHostSerialPort::Mark, USBHostSerialPort::Space; default = USBHostSerialPort::None) stop The 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.
Generated on Wed Jul 13 2022 01:40:22 by 1.7.2