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

View File

@@ -444,6 +444,12 @@ tusb_error_t hcd_pipe_close(pipe_handle_t pipe_hdl)
return TUSB_ERROR_NONE;
}
bool hcd_pipe_is_idle(pipe_handle_t pipe_hdl)
{
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle( pipe_hdl );
return (p_qhd->p_qtd_list_head == NULL);
}
//--------------------------------------------------------------------+
// EHCI Interrupt Handler
//--------------------------------------------------------------------+