diff options
| author | Ha Thach <[email protected]> | 2024-04-08 23:48:52 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-08 23:48:52 +0700 |
| commit | 42decf28f1bf7512a4c3e7402c9daf83ee241191 (patch) | |
| tree | 1a3ed93956a7d51d592d6ba4de6215725ec43c4c /src/class/hid | |
| parent | d33fe38a6257bcdd60f51a57c9fd19ce2ad1f202 (diff) | |
| parent | be25a3fc20339c27803e68cb1363f89ffe7a7c67 (diff) | |
Merge pull request #1835 from MasterQ32/otg_bringup
Implements deinit functions for host/device mode switch
Diffstat (limited to 'src/class/hid')
| -rw-r--r-- | src/class/hid/hid_device.c | 7 | ||||
| -rw-r--r-- | src/class/hid/hid_device.h | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c index 8ae51109d..5cc5a2488 100644 --- a/src/class/hid/hid_device.c +++ b/src/class/hid/hid_device.c @@ -179,11 +179,14 @@ bool tud_hid_n_gamepad_report(uint8_t instance, uint8_t report_id, //--------------------------------------------------------------------+ // USBD-CLASS API //--------------------------------------------------------------------+ -void hidd_init(void) -{ +void hidd_init(void) { hidd_reset(0); } +bool hidd_deinit(void) { + return true; +} + void hidd_reset(uint8_t rhport) { (void) rhport; diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h index 40755afed..040cad162 100644 --- a/src/class/hid/hid_device.h +++ b/src/class/hid/hid_device.h @@ -465,6 +465,7 @@ static inline bool tud_hid_gamepad_report(uint8_t report_id, int8_t x, int8_t y // Internal Class Driver API //--------------------------------------------------------------------+ void hidd_init (void); +bool hidd_deinit (void); void hidd_reset (uint8_t rhport); uint16_t hidd_open (uint8_t rhport, tusb_desc_interface_t const * itf_desc, uint16_t max_len); bool hidd_control_xfer_cb (uint8_t rhport, uint8_t stage, tusb_control_request_t const * request); |
