diff options
| author | hathach <[email protected]> | 2022-12-21 12:25:13 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-12-21 12:25:13 +0700 |
| commit | badb30a6c3d0748b52d7c9db5a48b7bef21b4c1a (patch) | |
| tree | 7060e73087760ca7e009db9603ef73f80a7398d8 /src/class | |
| parent | 22b62f871263ae170965a037e4f677a8a8e49709 (diff) | |
correct cdc host app
Diffstat (limited to 'src/class')
| -rw-r--r-- | src/class/cdc/cdc_host.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class/cdc/cdc_host.c b/src/class/cdc/cdc_host.c index f8d996e17..326567689 100644 --- a/src/class/cdc/cdc_host.c +++ b/src/class/cdc/cdc_host.c @@ -459,7 +459,8 @@ bool cdch_xfer_cb(uint8_t daddr, uint8_t ep_addr, xfer_result_t event, uint32_t } else if ( ep_addr == p_cdc->stream.rx.ep_addr ) { - tu_edpt_stream_read_xfer_complete(&p_cdc->stream.rx, xferred_bytes); + // skip if ZLP + if (xferred_bytes) tu_edpt_stream_read_xfer_complete(&p_cdc->stream.rx, xferred_bytes); // invoke receive callback |
