diff options
| author | hathach <[email protected]> | 2013-01-23 14:57:12 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-01-23 15:01:17 +0700 |
| commit | fdc9a82e8c3dcce08613f0c0e1a773f0c39381e0 (patch) | |
| tree | 772cae317e01118f28085375d7f6339af41630b7 /tinyusb/class | |
| parent | 3015776078a336a4245fd480fdead17d34906b69 (diff) | |
change configure handle to device handle
change test case accordingly
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/hid_host.c | 11 | ||||
| -rw-r--r-- | tinyusb/class/hid_host.h | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tinyusb/class/hid_host.c b/tinyusb/class/hid_host.c index c4ae20008..21bc1a93b 100644 --- a/tinyusb/class/hid_host.c +++ b/tinyusb/class/hid_host.c @@ -41,18 +41,19 @@ #include "hid_host.h" -tusb_error_t tusbh_keyboard_get(tusb_handle_configure_t const config_hdl, tusb_keyboard_report_t * const report) +tusb_error_t tusbh_keyboard_get(tusb_handle_device_t const device_hdl, tusb_keyboard_report_t * const report) { - tusb_configure_info_t *p_cfg_info; + usbh_device_info_t *p_device_info; pipe_handle_t pipe_in; osal_queue_id_t qid; ASSERT_PTR(report, TUSB_ERROR_INVALID_PARA); - ASSERT_STATUS( usbh_configure_info_get(config_hdl, &p_cfg_info) ); + p_device_info = usbh_device_info_get(device_hdl); + ASSERT_PTR(p_device_info, TUSB_ERROR_INVALID_PARA); - pipe_in = p_cfg_info->classes.hid_keyboard.pipe_in; - qid = p_cfg_info->classes.hid_keyboard.qid; + pipe_in = p_device_info->configuration.classes.hid_keyboard.pipe_in; + qid = p_device_info->configuration.classes.hid_keyboard.qid; ASSERT(0 != pipe_in, TUSB_ERROR_CLASS_DEVICE_DONT_SUPPORT); ASSERT_STATUS( osal_queue_get(qid, (uint32_t*)report, OSAL_TIMEOUT_WAIT_FOREVER) ); diff --git a/tinyusb/class/hid_host.h b/tinyusb/class/hid_host.h index d6be47e1e..7a8c9887e 100644 --- a/tinyusb/class/hid_host.h +++ b/tinyusb/class/hid_host.h @@ -57,7 +57,7 @@ #include "hid.h" -tusb_error_t tusbh_keyboard_get(tusb_handle_configure_t const handle, tusb_keyboard_report_t * const report); +tusb_error_t tusbh_keyboard_get(tusb_handle_device_t const handle, tusb_keyboard_report_t * const report); #ifdef __cplusplus } |
