summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-09-06 12:11:07 +0700
committerhathach <[email protected]>2020-09-06 12:11:07 +0700
commitb3e81673c0582a07a764981604a560ee3d310ef9 (patch)
tree4217a1ebea06224ea3826eec875845015d945297 /src/class/hid
parent15ad585e674f14e247aa7e5f42fb84f90f14be8b (diff)
change xfer_cb return type from void to bool
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_host.c8
-rw-r--r--src/class/hid/hid_host.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c
index 5ea8cc7e9..6002ead3c 100644
--- a/src/class/hid/hid_host.c
+++ b/src/class/hid/hid_host.c
@@ -233,7 +233,7 @@ bool hidh_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t c
return true;
}
-void hidh_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes)
+bool hidh_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes)
{
(void) xferred_bytes; // TODO may need to use this para later
@@ -241,7 +241,7 @@ void hidh_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32
if ( ep_addr == keyboardh_data[dev_addr-1].ep_in )
{
tuh_hid_keyboard_isr(dev_addr, event);
- return;
+ return true;
}
#endif
@@ -249,13 +249,15 @@ void hidh_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32
if ( ep_addr == mouseh_data[dev_addr-1].ep_in )
{
tuh_hid_mouse_isr(dev_addr, event);
- return;
+ return true;
}
#endif
#if CFG_TUSB_HOST_HID_GENERIC
#endif
+
+ return true;
}
void hidh_close(uint8_t dev_addr)
diff --git a/src/class/hid/hid_host.h b/src/class/hid/hid_host.h
index 54542de55..324dad203 100644
--- a/src/class/hid/hid_host.h
+++ b/src/class/hid/hid_host.h
@@ -197,7 +197,7 @@ void tuh_hid_generic_isr(uint8_t dev_addr, xfer_result_t event);
//--------------------------------------------------------------------+
void hidh_init(void);
bool hidh_open_subtask(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const *p_interface_desc, uint16_t *p_length);
-void hidh_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
+bool hidh_xfer_cb(uint8_t dev_addr, uint8_t ep_addr, xfer_result_t event, uint32_t xferred_bytes);
void hidh_close(uint8_t dev_addr);
#ifdef __cplusplus