USB::CDC Namespace Reference
Classes | |
| class | Device |
| Serial device implementation, in ACM mode. More... | |
| class | HostDevice |
| Implements CDC interface for a connected serial device. More... | |
| class | UsbSerial |
| Base class for both device and host serial port modes. More... | |
Typedefs | |
| using | MountCallback = Delegate< HostDevice *(const HostInterface::Instance &inst)> |
| Application callback to notify connection of a new device. More... | |
| using | UnmountCallback = Delegate< void(HostDevice &dev)> |
| Application callback to notify disconnection of a device. More... | |
Enumerations | |
| enum class | Event { rx_data , tx_done , line_break } |
Functions | |
| void | onMount (MountCallback callback) |
| Application should call this method to receive device connection notifications. More... | |
| void | onUnmount (UnmountCallback callback) |
| Application should call this method to receive device disconnection notifications. More... | |
Typedef Documentation
◆ MountCallback
| using USB::CDC::MountCallback = typedef Delegate<HostDevice*(const HostInterface::Instance& inst)> |
Application callback to notify connection of a new device.
- Parameters
-
inst TinyUSB device instance
- Return values
-
HostDevice* Application returns pointer to implementation, or nullptr to ignore this device
◆ UnmountCallback
| using USB::CDC::UnmountCallback = typedef Delegate<void(HostDevice& dev)> |
Application callback to notify disconnection of a device.
- Parameters
-
dev The device which has been disconnected
Enumeration Type Documentation
◆ Event
|
strong |
Function Documentation
◆ onMount()
| void USB::CDC::onMount | ( | MountCallback | callback | ) |
Application should call this method to receive device connection notifications.
- Parameters
-
callback
◆ onUnmount()
| void USB::CDC::onUnmount | ( | UnmountCallback | callback | ) |
Application should call this method to receive device disconnection notifications.
- Parameters
-
callback
1.9.1