diff options
| author | hathach <[email protected]> | 2018-07-13 18:01:16 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-07-13 18:01:16 +0700 |
| commit | 7a1f40593f984d37d602cdf6457d0f8c6f7c01d7 (patch) | |
| tree | 4ed7d9c4f0cc2775985794ccab0f2543f9288468 /src/class | |
| parent | 1efb552bfd097a23651bbb5ad29b6d8eb3bc9ccd (diff) | |
only call class xfer callback associated with endpoint address
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/cdc/cdc_device.c | 3 | ||||
| -rw-r--r-- | src/class/msc/msc_device.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 76526d40b..f8aa6824c 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -297,6 +297,7 @@ tusb_error_t cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, tusb_event_t event, u uint8_t const itf = 0;
cdcd_interface_t const * p_cdc = &_cdcd_itf[itf];
+ // receive new data
if ( ep_addr == p_cdc->ep_out )
{
tu_fifo_write_n(&_rx_ff[itf], _tmp_rx_buf, xferred_bytes);
@@ -308,6 +309,8 @@ tusb_error_t cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, tusb_event_t event, u if (tud_cdc_rx_cb) tud_cdc_rx_cb(itf);
}
+ // nothing to do with in and notif endpoint
+
return TUSB_ERROR_NONE;
}
diff --git a/src/class/msc/msc_device.c b/src/class/msc/msc_device.c index 71987addf..5ad8aa929 100644 --- a/src/class/msc/msc_device.c +++ b/src/class/msc/msc_device.c @@ -208,8 +208,6 @@ tusb_error_t mscd_xfer_cb(uint8_t rhport, uint8_t ep_addr, tusb_event_t event, u msc_cbw_t const * p_cbw = &p_msc->cbw;
msc_csw_t * p_csw = &p_msc->csw;
- VERIFY( (ep_addr == p_msc->ep_out) || (ep_addr == p_msc->ep_in), TUSB_ERROR_INVALID_PARA);
-
switch (p_msc->stage)
{
case MSC_STAGE_CMD:
|
