Skip to content

Commit

Permalink
Merge pull request adafruit#8999 from hathach/fix-8885
Browse files Browse the repository at this point in the history
call tuh_hid_receive_abort() when detach from kernel driver
  • Loading branch information
tannewt authored Mar 4, 2024
2 parents c3f9adb + 3d88402 commit 0186d9c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tinyusb
Submodule tinyusb updated 223 files
7 changes: 7 additions & 0 deletions ports/raspberrypi/common-hal/usb_host/Port.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,10 @@ usb_host_port_obj_t *common_hal_usb_host_port_construct(const mcu_pin_obj_t *dp,

return self;
}

// Not used, but we must define to put this hook into SRAM
void __not_in_flash_func(tuh_event_hook_cb)(uint8_t rhport, uint32_t eventid, bool in_isr) {
(void)rhport;
(void)eventid;
(void)in_isr;
}
1 change: 1 addition & 0 deletions supervisor/shared/usb/host_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ void usb_keyboard_detach(uint8_t dev_addr, uint8_t interface) {
if (!usb_keyboard_in_use(dev_addr, interface)) {
return;
}
tuh_hid_receive_abort(dev_addr, interface);
_dev_addr = 0;
_interface = 0;
}
Expand Down

0 comments on commit 0186d9c

Please sign in to comment.