summaryrefslogtreecommitdiff
path: root/tinyusb/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-04-09 13:28:07 +0700
committerhathach <[email protected]>2013-04-09 13:28:07 +0700
commite6a44b3fe9a0af6ce33f8340c8703bf0bbc43d5a (patch)
tree9fe35b73fd7fb1921979889f6323b0a28785b091 /tinyusb/class
parenta6cf4f228e3036c4df69066df524b3fde74b271c (diff)
add test & code for TUSB_EVENT_INTERFACE_OPEN for tusbh_hid_keyboard_isr tusbh_hid_mouse_isr
Diffstat (limited to 'tinyusb/class')
-rw-r--r--tinyusb/class/hid_host.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c
index 3668af9c0..412465b5b 100644
--- a/tinyusb/class/hid_host.c
+++ b/tinyusb/class/hid_host.c
@@ -199,12 +199,20 @@ tusb_error_t hidh_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
#if TUSB_CFG_HOST_HID_KEYBOARD
case HID_PROTOCOL_KEYBOARD:
ASSERT_STATUS ( hidh_interface_open(dev_addr, (tusb_descriptor_endpoint_t const *) p_desc, &keyboard_data[dev_addr-1]) );
+ if ( tusbh_hid_keyboard_isr )
+ {
+ tusbh_hid_keyboard_isr(dev_addr, 0, TUSB_EVENT_INTERFACE_OPEN);
+ }
break;
#endif
#if TUSB_CFG_HOST_HID_MOUSE
case HID_PROTOCOL_MOUSE:
ASSERT_STATUS ( hidh_interface_open(dev_addr, (tusb_descriptor_endpoint_t const *) p_desc, &mouse_data[dev_addr-1]) );
+ if (tusbh_hid_mouse_isr)
+ {
+ tusbh_hid_mouse_isr(dev_addr, 0, TUSB_EVENT_INTERFACE_OPEN);
+ }
break;
#endif