USB::HID Namespace Reference

Classes

class  Device
 
struct  Report
 
class  HostDevice
 

Typedefs

using MountCallback = Delegate< HostDevice *(const HostInterface::Instance &inst, const Report &report)>
 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::HID::MountCallback = typedef Delegate<HostDevice*(const HostInterface::Instance& inst, const Report& report)>

Application callback to notify connection of a new device.

Parameters
instTinyUSB device instance
reportHID report descriptors for this interface
Return values
HostDevice*Application returns pointer to implementation, or nullptr to ignore this device

◆ UnmountCallback

using USB::HID::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::HID::onMount ( MountCallback  callback)

Application should call this method to receive device connection notifications.

Parameters
callback

◆ onUnmount()

void USB::HID::onUnmount ( UnmountCallback  callback)

Application should call this method to receive device disconnection notifications.

Parameters
callback