#include <cafe/hid.h> #define HID_DEVICE_DETACH 0 #define HID_DEVICE_ATTACH 1 typedef int (*HIDAttachCallback)( HIDClient *p_hc, HIDDevice *p_hd, u32 attach );
|p_hc||Pointer to the
|p_hd||Pointer to the
|attach||Attach or detach event.
HIDAttachCallback function returns
HID_DEVICE_ATTACH if the client driver supports the specific HID interface.
HIDAttachCallback is implemented by HID clients to receive attach and detach events for HID interface at runtime.
The first client to accept the
HID_DEVICE_ATTACH will break the callback chain to additional clients.
Attach and detach events are notified to clients in FILO order.
After attachment, the
HIDClient stores the
HIDDevice.handle to address the HID interface for runtime transactions.
The handle will no longer be valid after the HID interface is detached.
|Background||Do not call this function from the background.|
2013/05/08 Automated cleanup pass.
2011/09/29 Initial version.