diff options
| author | hathach <[email protected]> | 2021-08-17 13:21:24 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-08-17 13:21:24 +0700 |
| commit | 5f6418ccd79892c0f8c2152244f7e7a78e17a162 (patch) | |
| tree | 408f9fd5a724f2377f9bbd2d1c1b6be6e222e24c /examples/device/hid_composite/src | |
| parent | 02277133aea7a5d7c0908531c81fa3c3978bc318 (diff) | |
add hid_boot_interface example
Diffstat (limited to 'examples/device/hid_composite/src')
| -rw-r--r-- | examples/device/hid_composite/src/main.c | 12 | ||||
| -rw-r--r-- | examples/device/hid_composite/src/usb_descriptors.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/examples/device/hid_composite/src/main.c b/examples/device/hid_composite/src/main.c index d2a8a28fa..fd25e620a 100644 --- a/examples/device/hid_composite/src/main.c +++ b/examples/device/hid_composite/src/main.c @@ -223,9 +223,9 @@ void hid_task(void) // Invoked when sent REPORT successfully to host // Application can use this to send the next report // Note: For composite reports, report[0] is report ID -void tud_hid_report_complete_cb(uint8_t itf, uint8_t const* report, uint8_t len) +void tud_hid_report_complete_cb(uint8_t instance, uint8_t const* report, uint8_t len) { - (void) itf; + (void) instance; (void) len; uint8_t next_report_id = report[0] + 1; @@ -239,10 +239,10 @@ void tud_hid_report_complete_cb(uint8_t itf, uint8_t const* report, uint8_t len) // Invoked when received GET_REPORT control request // Application must fill buffer report's content and return its length. // Return zero will cause the stack to STALL request -uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) +uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) { // TODO not Implemented - (void) itf; + (void) instance; (void) report_id; (void) report_type; (void) buffer; @@ -253,9 +253,9 @@ uint16_t tud_hid_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t // Invoked when received SET_REPORT control request or // received data on OUT endpoint ( Report ID = 0, Type = 0 ) -void tud_hid_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize) +void tud_hid_set_report_cb(uint8_t instance, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize) { - (void) itf; + (void) instance; if (report_type == HID_REPORT_TYPE_OUTPUT) { diff --git a/examples/device/hid_composite/src/usb_descriptors.c b/examples/device/hid_composite/src/usb_descriptors.c index 1aff5e68e..b9a6e7292 100644 --- a/examples/device/hid_composite/src/usb_descriptors.c +++ b/examples/device/hid_composite/src/usb_descriptors.c @@ -82,9 +82,9 @@ uint8_t const desc_hid_report[] = // Invoked when received GET HID REPORT DESCRIPTOR // Application return pointer to descriptor // Descriptor contents must exist long enough for transfer to complete -uint8_t const * tud_hid_descriptor_report_cb(uint8_t itf) +uint8_t const * tud_hid_descriptor_report_cb(uint8_t instance) { - (void) itf; + (void) instance; return desc_hid_report; } |
