add api for hcd: hcd_pipe_is_idle

add api for usbh: tusbh_device_get_mounted_class_flag
implement api for custom class
- is mounted
- read
This commit is contained in:
hathach
2013-06-21 14:20:08 +07:00
parent 3924764dff
commit 5c564df8c1
7 changed files with 55 additions and 3 deletions
+1 -1
View File
@@ -95,11 +95,11 @@ tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_int
tusb_error_t hidh_interface_get_report(uint8_t dev_addr, void * report, hidh_interface_info_t *p_hid)
{
//------------- parameters validation -------------//
// TODO change to use is configured function
ASSERT_INT(TUSB_DEVICE_STATE_CONFIGURED, tusbh_device_get_state(dev_addr), TUSB_ERROR_DEVICE_NOT_READY);
ASSERT_PTR(report, TUSB_ERROR_INVALID_PARA);
ASSERT(TUSB_INTERFACE_STATUS_BUSY != p_hid->status, TUSB_ERROR_INTERFACE_IS_BUSY);
// TODO abstract to use hidh service
ASSERT_STATUS( hcd_pipe_xfer(p_hid->pipe_hdl, report, p_hid->report_size, true) ) ;
p_hid->status = TUSB_INTERFACE_STATUS_BUSY;