Classes | |
class | Device |
The TinyUSB vendor API is very much like a serial port. Each instance corresponds to a bi-directional interface. More... | |
class | HostDevice |
Base class to use for custom devices. More... | |
Typedefs | |
using | MountCallback = Delegate< HostDevice *(const HostInterface::Instance &inst, const HostDevice::Config &cfg)> |
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... | |
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::VENDOR::MountCallback = typedef Delegate<HostDevice*(const HostInterface::Instance& inst, const HostDevice::Config& cfg)> |
Application callback to notify connection of a new device.
- Parameters
-
inst TinyUSB device instance cfg HostDevice configuration
- Return values
-
HostDevice* Application returns pointer to implementation, or nullptr to ignore this device
◆ UnmountCallback
using USB::VENDOR::UnmountCallback = typedef Delegate<void(HostDevice& dev)> |
Application callback to notify disconnection of a device.
- Parameters
-
dev The device which has been disconnected
Function Documentation
◆ onMount()
void USB::VENDOR::onMount | ( | MountCallback | callback | ) |
Application should call this method to receive device connection notifications.
- Parameters
-
callback
◆ onUnmount()
void USB::VENDOR::onUnmount | ( | UnmountCallback | callback | ) |
Application should call this method to receive device disconnection notifications.
- Parameters
-
callback