diff options
| author | hathach <[email protected]> | 2024-03-22 16:12:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-03-22 16:12:57 +0700 |
| commit | e84c9f3e221092687808f175e1e19732a10fea72 (patch) | |
| tree | 6a5c66a4851db1e66aaa87d173c4f5567af5ee0d /src/class/hid | |
| parent | 31f68495cf66706926c408ad15ea90a646c62198 (diff) | |
implement tuh_init()
change usbh driver init() return type from void to bool
Diffstat (limited to 'src/class/hid')
| -rw-r--r-- | src/class/hid/hid_host.c | 4 | ||||
| -rw-r--r-- | src/class/hid/hid_host.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/class/hid/hid_host.c b/src/class/hid/hid_host.c index 16e2d3c2c..efc54656e 100644 --- a/src/class/hid/hid_host.c +++ b/src/class/hid/hid_host.c @@ -372,8 +372,10 @@ bool tuh_hid_send_report(uint8_t daddr, uint8_t idx, uint8_t report_id, const vo //--------------------------------------------------------------------+ // USBH API //--------------------------------------------------------------------+ -void hidh_init(void) { +bool hidh_init(void) { + TU_LOG_DRV("sizeof(hidh_interface_t) = %u\r\n", sizeof(hidh_interface_t)); tu_memclr(_hidh_itf, sizeof(_hidh_itf)); + return true; } bool hidh_deinit(void) { diff --git a/src/class/hid/hid_host.h b/src/class/hid/hid_host.h index 9ea222b3d..0902bf1af 100644 --- a/src/class/hid/hid_host.h +++ b/src/class/hid/hid_host.h @@ -163,7 +163,7 @@ TU_ATTR_WEAK void tuh_hid_set_protocol_complete_cb(uint8_t dev_addr, uint8_t idx //--------------------------------------------------------------------+ // Internal Class Driver API //--------------------------------------------------------------------+ -void hidh_init(void); +bool hidh_init(void); bool hidh_deinit(void); bool hidh_open(uint8_t rhport, uint8_t dev_addr, tusb_desc_interface_t const* desc_itf, uint16_t max_len); bool hidh_set_config(uint8_t dev_addr, uint8_t itf_num); |
