add tusbh_cdc_serial_is_mounted API
test for cdch close driver
This commit is contained in:
@@ -57,6 +57,18 @@
|
||||
//--------------------------------------------------------------------+
|
||||
/*STATIC_*/ cdch_data_t cdch_data[TUSB_CFG_HOST_DEVICE_MAX];
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// APPLICATION API (parameter validation needed)
|
||||
//--------------------------------------------------------------------+
|
||||
bool tusbh_cdc_serial_is_mounted(uint8_t dev_addr)
|
||||
{
|
||||
// TODO consider all AT Command as serial candidate
|
||||
return
|
||||
(tusbh_device_get_mounted_class_flag(dev_addr) & BIT_(TUSB_CLASS_CDC) ) &&
|
||||
(CDC_COMM_PROTOCOL_ATCOMMAND <= cdch_data[dev_addr-1].interface_protocol) &&
|
||||
(cdch_data[dev_addr-1].interface_protocol <= CDC_COMM_PROTOCOL_ATCOMMAND_CDMA);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USBH-CLASS DRIVER API
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
@@ -57,11 +57,11 @@
|
||||
//--------------------------------------------------------------------+
|
||||
// APPLICATION PUBLIC API
|
||||
//--------------------------------------------------------------------+
|
||||
bool tusbh_cdc_acm_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
//bool tusbh_cdc_acm_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
bool tusbh_cdc_serial_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
bool tusbh_cdc_rndis_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
tusb_interface_status_t tusbh_cdc_send(void const * p_data, uint32_t length);
|
||||
tusb_interface_status_t tusbh_cdc_send(void const * p_data, uint32_t length, bool is_notify);
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// USBH-CLASS API
|
||||
|
||||
@@ -964,7 +964,7 @@ static ehci_link_t* list_find_previous_item(ehci_link_t* p_head, ehci_link_t* p_
|
||||
uint32_t max_loop = 0;
|
||||
while( (align32(p_prev->address) != (uint32_t) p_head) && // not loop around
|
||||
(align32(p_prev->address) != (uint32_t) p_current) && // not found yet
|
||||
!p_prev->terminate && // not advancable
|
||||
!p_prev->terminate && // not advanceable
|
||||
max_loop < EHCI_MAX_QHD)
|
||||
{
|
||||
p_prev = list_next(p_prev);
|
||||
|
||||
Reference in New Issue
Block a user