diff options
| author | Peter Lawrence <[email protected]> | 2020-01-04 13:59:20 -0600 |
|---|---|---|
| committer | Peter Lawrence <[email protected]> | 2020-01-11 14:21:43 -0600 |
| commit | 33c715bdd060c4c2bbc89da3ccc62f10b3faba09 (patch) | |
| tree | 1151f99997c2882ba0cf87c13488c03b106a9fe9 /src | |
| parent | 13016c5cbbf2ee058371670e4f7cc33703c36f75 (diff) | |
CDC device: fix behavior for transfers that are a whole multiple of endpoint buffer
Diffstat (limited to 'src')
| -rw-r--r-- | src/class/cdc/cdc_device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 3ff72b00c..a4c42863a 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -402,10 +402,10 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_ // Data sent to host, we could continue to fetch data tx fifo to send.
// But it will cause incorrect baudrate set in line coding.
// Though maybe the baudrate is not really important !!!
-// if ( ep_addr == p_cdc->ep_in )
-// {
-//
-// }
+ if ( ep_addr == p_cdc->ep_in )
+ {
+ if ( xferred_bytes && (0 == (xferred_bytes % CFG_TUD_CDC_EPSIZE)) ) usbd_edpt_xfer(TUD_OPT_RHPORT, p_cdc->ep_in, NULL, 0);
+ }
// nothing to do with notif endpoint for now
|
