Last active
March 24, 2017 09:55
-
-
Save kuro68k/cf107b63d8a34b1cd4c65e5a9eae6d78 to your computer and use it in GitHub Desktop.
Atmel ASF HID stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HID descriptor locations: | |
src\ASF\common\services\usb\class\hid\device\generic\udi_hid_generic.c - contains 'udi_hid_generic_report_desc' | |
src\ASF\common\services\usb\class\hid\device\generic\udi_hid_generic.h - contains 'udi_hid_generic_report_desc_t' | |
To handle feature requests, add this to conf_usb.h: | |
#define UDI_HID_GENERIC_GET_FEATURE(payload, size) HID_get_feature_report_out(payload, size) | |
extern bool HID_get_feature_report_out(uint8_t **payload, uint16_t *size); | |
And this to udi_hid.c/udi_hid_setup: | |
case USB_REQ_HID_GET_REPORT: | |
// hack: not implemented in original code | |
return UDI_HID_GENERIC_GET_FEATURE(&udd_g_ctrlreq.payload, &udd_g_ctrlreq.payload_size); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment