implement hcd_port_speed_get

move port reset & speed detection from isr context to usbh enumeration task
- decrease time in isr significantly from 50 ms to 580us
fix bug with osal_task_delay for freeRTOS buil
This commit is contained in:
hathach
2013-04-25 17:48:55 +07:00
parent 3763e22c9a
commit c0104b996e
7 changed files with 27 additions and 16 deletions

View File

@@ -105,8 +105,9 @@ tusb_error_t hcd_pipe_cancel()ATTR_WARN_UNUSED_RESULT;
// PORT API
//--------------------------------------------------------------------+
/// return the current connect status of roothub port
bool hcd_port_connect_status(uint8_t core_id) ATTR_CONST ATTR_WARN_UNUSED_RESULT;
void hcd_port_reset(uint8_t core_id);
bool hcd_port_connect_status(uint8_t hostid) ATTR_PURE ATTR_WARN_UNUSED_RESULT; // TODO make inline if possible
void hcd_port_reset(uint8_t hostid);
tusb_speed_t hcd_port_speed_get(uint8_t hostid) ATTR_PURE ATTR_WARN_UNUSED_RESULT; // TODO make inline if possible
#ifdef __cplusplus
}