8000 call tuh_hid_receive_abort() when detach from kernel driver · ladyada/circuitpython@3d88402 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3d88402

Browse files
committed
call tuh_hid_receive_abort() when detach from kernel driver
- add tuh_event_hook_cb() in SRAM, required when updated to latest tinyusb - bump up pico-pio-usb to latest - bump up tinyusb to latest for new tuh_hid_receive_abort(), and all endpoint abort when SET_CONFIGURATION
1 parent 54e78c8 commit 3d88402

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

lib/tinyusb

Submodule tinyusb updated 223 files

ports/raspberrypi/common-hal/usb_host/Port.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,10 @@ usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp,
170170

171171
return self;
172172
}
173+
174+
// Not used, but we must define to put this hook into SRAM
175+
void __not_in_flash_func(tuh_event_hook_cb)(uint8_t rhport, uint32_t eventid, bool in_isr) {
176+
(void)rhport;
177+
(void)eventid;
178+
(void)in_isr;
179+
}

supervisor/shared/usb/host_keyboard.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ void usb_keyboard_detach(uint8_t dev_addr, uint8_t interface) {
329329
if (!usb_keyboard_in_use(dev_addr, interface)) {
330330
return;
331331
}
332+
tuh_hid_receive_abort(dev_addr, interface);
332333
_dev_addr = 0;
333334
_interface = 0;
334335
}

0 commit comments

Comments
 (0)
0