mirror of
https://github.com/hathach/tinyusb.git
synced 2026-02-04 03:15:26 +00:00
Merge pull request #3465 from hathach/stream_write_fix
fix stream write racing
This commit is contained in:
@ -392,7 +392,7 @@ uint32_t tu_edpt_stream_write_xfer(tu_edpt_stream_t *s) {
|
||||
// Pull data from FIFO -> EP buf
|
||||
uint16_t count;
|
||||
if (s->ep_buf == NULL) {
|
||||
count = ff_count;
|
||||
count = tu_fifo_count(&s->ff); // re-get count since fifo can be changed
|
||||
} else {
|
||||
count = tu_fifo_read_n(&s->ff, s->ep_buf, s->ep_bufsize);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user