From be165a67134d08f7c32386de041f1a2665e696be Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 12 May 2021 19:36:52 +0700 Subject: reworking host hid API --- examples/host/cdc_msc_hid/src/main.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'examples') diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c index b3fd1f2af..5543e9efb 100644 --- a/examples/host/cdc_msc_hid/src/main.c +++ b/examples/host/cdc_msc_hid/src/main.c @@ -162,19 +162,12 @@ void tuh_hid_mounted_cb(uint8_t dev_addr) tuh_hid_keyboard_get_report(dev_addr, &usb_keyboard_report); } -void tuh_hid_keyboard_unmounted_cb(uint8_t dev_addr) +void tuh_hid_unmounted_cb(uint8_t dev_addr) { // application tear-down printf("A Keyboard device (address %d) is unmounted\r\n", dev_addr); } -// invoked ISR context -void tuh_hid_keyboard_isr(uint8_t dev_addr, xfer_result_t event) -{ - (void) dev_addr; - (void) event; -} - #endif #if CFG_TUH_HID_MOUSE @@ -242,12 +235,6 @@ void tuh_hid_mouse_unmounted_cb(uint8_t dev_addr) printf("A Mouse device (address %d) is unmounted\r\n", dev_addr); } -// invoked ISR context -void tuh_hid_mouse_isr(uint8_t dev_addr, xfer_result_t event) -{ - (void) dev_addr; - (void) event; -} #endif @@ -257,7 +244,7 @@ void hid_task(void) uint8_t const addr = 1; #if CFG_TUH_HID_KEYBOARD - if ( tuh_hid_keyboard_mounted(addr) ) + if ( tuh_n_hid_n_keyboard_mounted(addr, 0) ) { if ( !tuh_hid_keyboard_is_busy(addr) ) { -- cgit v1.3.1