summaryrefslogtreecommitdiff
path: root/shared-module/usb_hid
diff options
context:
space:
mode:
authorsommersoft <sommersoft@users.noreply.github.com>2019-07-27 10:46:53 -0500
committerGitHub <noreply@github.com>2019-07-27 10:46:53 -0500
commitcebdadd0f6122826337c962b3d443bd41d1de69d (patch)
treee2aeb661c3760f7aaf152bc1bbd95fd120161ab8 /shared-module/usb_hid
parentc335f170d7d561d07ca7412da60c260e13c5e746 (diff)
parentd99d3bd471920cdd9b2683b7dbd538551f7aee43 (diff)
Merge branch 'master' into dynamic_support_matrix
Diffstat (limited to 'shared-module/usb_hid')
-rw-r--r--shared-module/usb_hid/Device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/shared-module/usb_hid/Device.c b/shared-module/usb_hid/Device.c
index 0e256cb5e..a5a57419c 100644
--- a/shared-module/usb_hid/Device.c
+++ b/shared-module/usb_hid/Device.c
@@ -47,15 +47,15 @@ void common_hal_usb_hid_device_send_report(usb_hid_device_obj_t *self, uint8_t*
// Wait until interface is ready, timeout = 2 seconds
uint64_t end_ticks = ticks_ms + 2000;
- while ( (ticks_ms < end_ticks) && !tud_hid_generic_ready() ) { }
+ while ( (ticks_ms < end_ticks) && !tud_hid_ready() ) { }
- if ( !tud_hid_generic_ready() ) {
+ if ( !tud_hid_ready() ) {
mp_raise_msg(&mp_type_OSError, translate("USB Busy"));
}
memcpy(self->report_buffer, report, len);
- if ( !tud_hid_generic_report(self->report_id, self->report_buffer, len) ) {
+ if ( !tud_hid_report(self->report_id, self->report_buffer, len) ) {
mp_raise_msg(&mp_type_OSError, translate("USB Error"));
}
}
@@ -70,7 +70,7 @@ static usb_hid_device_obj_t* get_hid_device(uint8_t report_id) {
}
// Callbacks invoked when receive Get_Report request through control endpoint
-uint16_t tud_hid_generic_get_report_cb(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 report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen) {
// only support Input Report
if ( report_type != HID_REPORT_TYPE_INPUT ) return 0;
@@ -80,7 +80,7 @@ uint16_t tud_hid_generic_get_report_cb(uint8_t report_id, hid_report_type_t repo
}
// Callbacks invoked when receive Set_Report request through control endpoint
-void tud_hid_generic_set_report_cb(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 report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize) {
usb_hid_device_obj_t* hid_device = get_hid_device(report_id);
if ( report_type == HID_REPORT_TYPE_OUTPUT ) {