diff options
| author | Zachery Littell <[email protected]> | 2020-10-07 20:36:00 -0500 |
|---|---|---|
| committer | Zachery Littell <[email protected]> | 2020-10-07 20:36:00 -0500 |
| commit | db3fe97f62f22747df2c79a841bc1fb235f2f89e (patch) | |
| tree | acb71a17e78fa4b7ef6cfbfec7087c209cdbd0bf /src/class/hid/hid_device.h | |
| parent | 081af79009dc40ab41be9976d22629c7d251a50d (diff) | |
fix variable names. add itf n callbacks to multihid
Diffstat (limited to 'src/class/hid/hid_device.h')
| -rw-r--r-- | src/class/hid/hid_device.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h index 30d99ce47..4b8cb17d5 100644 --- a/src/class/hid/hid_device.h +++ b/src/class/hid/hid_device.h @@ -87,7 +87,7 @@ static inline bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8 // Invoked when received GET HID REPORT DESCRIPTOR request // Application return pointer to descriptor, whose contents must exist long enough for transfer to complete #if CFG_TUD_HID>1 -uint8_t const * tud_hid_descriptor_report_cb(uint8_t desc_index); +uint8_t const * tud_hid_n_descriptor_report_cb(uint8_t itf); #else uint8_t const * tud_hid_descriptor_report_cb(void); #endif @@ -95,11 +95,19 @@ uint8_t const * tud_hid_descriptor_report_cb(void); // 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 +#if CFG_TUD_HID>1 +uint16_t tud_hid_n_get_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen); +#else uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen); +#endif // Invoked when received SET_REPORT control request or // received data on OUT endpoint ( Report ID = 0, Type = 0 ) +#if CFG_TUD_HID>1 +void tud_hid_n_set_report_cb(uint8_t itf, uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize); +#else void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize); +#endif // Invoked when received SET_PROTOCOL request ( mode switch Boot <-> Report ) TU_ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode); |
