USB::VENDOR Namespace Reference

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

Application callback to notify connection of a new device.

Parameters
instTinyUSB device instance
cfgHostDevice 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
devThe 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