summaryrefslogtreecommitdiff
path: root/tinyusb/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-03-07 15:30:32 +0700
committerhathach <[email protected]>2018-03-07 15:30:32 +0700
commit7092db264f9284c23d777562947111369baf7f68 (patch)
treebbbb70ec1b8caf7f90d0574193916c13258672c4 /tinyusb/class
parent889169d4d06266e1f827e79259a1ac1aac1bbcb3 (diff)
update
Diffstat (limited to 'tinyusb/class')
-rw-r--r--tinyusb/class/cdc/cdc_device.c17
-rw-r--r--tinyusb/class/cdc/cdc_device.h2
2 files changed, 13 insertions, 6 deletions
diff --git a/tinyusb/class/cdc/cdc_device.c b/tinyusb/class/cdc/cdc_device.c
index f15255e4a..56a42032e 100644
--- a/tinyusb/class/cdc/cdc_device.c
+++ b/tinyusb/class/cdc/cdc_device.c
@@ -231,15 +231,20 @@ tusb_error_t cdcd_xfer_cb(endpoint_handle_t edpt_hdl, tusb_event_t event, uint32
{
cdcd_data_t const * p_cdc = &cdcd_data[edpt_hdl.coreid];
- for(cdc_pipeid_t pipeid=CDC_PIPE_NOTIFICATION; pipeid < CDC_PIPE_ERROR; pipeid++ )
+ if ( endpointhandle_is_equal(edpt_hdl, p_cdc->edpt_hdl[CDC_PIPE_DATA_OUT]) )
{
- if ( endpointhandle_is_equal(edpt_hdl, p_cdc->edpt_hdl[pipeid]) )
- {
- tud_cdc_xfer_cb(edpt_hdl.coreid, event, pipeid, xferred_bytes);
- break;
- }
+ tud_cdc_rx_cb(edpt_hdl.coreid, xferred_bytes);
}
+// for(cdc_pipeid_t pipeid=CDC_PIPE_NOTIFICATION; pipeid < CDC_PIPE_ERROR; pipeid++ )
+// {
+// if ( endpointhandle_is_equal(edpt_hdl, p_cdc->edpt_hdl[pipeid]) )
+// {
+// tud_cdc_xfer_cb(edpt_hdl.coreid, event, pipeid, xferred_bytes);
+// break;
+// }
+// }
+
return TUSB_ERROR_NONE;
}
diff --git a/tinyusb/class/cdc/cdc_device.h b/tinyusb/class/cdc/cdc_device.h
index 1f738aa7f..44351aad1 100644
--- a/tinyusb/class/cdc/cdc_device.h
+++ b/tinyusb/class/cdc/cdc_device.h
@@ -109,6 +109,8 @@ tusb_error_t tud_cdc_receive(uint8_t coreid, void * p_buffer, uint32_t length, b
void tud_cdc_xfer_cb(uint8_t coreid, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes);
//void tud_cdc_line_coding_changed_cb(uint8_t coreid, cdc_line_coding_t* p_line_coding);
+void tud_cdc_rx_cb(uint8_t coreid, uint32_t xferred_bytes);
+
//--------------------------------------------------------------------+
// USBD-CLASS DRIVER API
//--------------------------------------------------------------------+