diff options
| author | hathach <[email protected]> | 2013-07-05 13:37:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-07-05 13:37:57 +0700 |
| commit | 7345a4515db401d411fdb5d5db0665e1bc071f12 (patch) | |
| tree | c1849af88e7261644b84ce66f55108d228a8fe30 /tinyusb/class | |
| parent | 374aea7a11b6b9986318707f5951b9c69ad00239 (diff) | |
fix bug with rndis overshadow the normal cdc callback
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/cdc_host.c | 4 | ||||
| -rw-r--r-- | tinyusb/class/cdc_rndis_host.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c index 0e97c5d9a..2b81b9ab6 100644 --- a/tinyusb/class/cdc_host.c +++ b/tinyusb/class/cdc_host.c @@ -204,8 +204,8 @@ tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con { OSAL_SUBTASK_INVOKED_AND_WAIT( rndish_open_subtask(dev_addr, p_cdc), error ); } - else -// if ( TUSB_ERROR_NONE != error ) // device is not an rndis + + if ( !(0xff == p_cdc->interface_protocol && TUSB_ERROR_NONE == error) ) // device is not an rndis #endif // FIXME mounted class flag is not set yet diff --git a/tinyusb/class/cdc_rndis_host.c b/tinyusb/class/cdc_rndis_host.c index 024329b4b..585cf7d42 100644 --- a/tinyusb/class/cdc_rndis_host.c +++ b/tinyusb/class/cdc_rndis_host.c @@ -116,6 +116,11 @@ tusb_error_t rndish_open_subtask(uint8_t dev_addr, cdch_data_t *p_cdc) error ); + if ( TUSB_ERROR_NONE != error) + { + SUBTASK_EXIT(error); + } + if ( tusbh_cdc_rndis_mounted_cb ) { tusbh_cdc_rndis_mounted_cb(dev_addr); |
