diff options
| author | hathach <[email protected]> | 2025-12-10 15:25:30 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-12-10 15:25:30 +0700 |
| commit | a165cf26b269efa396667b05f5ccedace9b528ca (patch) | |
| tree | 01025109094bf8f7f29d44644febe3b78716482b /src/tusb.c | |
| parent | fcc300770d9df7fdbefc2f899b63ef8fcb274b80 (diff) | |
remove tu_fifo_discard_n() and its usage
Diffstat (limited to 'src/tusb.c')
| -rw-r--r-- | src/tusb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tusb.c b/src/tusb.c index fef5b1b75..8bb1ddeff 100644 --- a/src/tusb.c +++ b/src/tusb.c @@ -338,9 +338,11 @@ bool tu_edpt_stream_init(tu_edpt_stream_t* s, bool is_host, bool is_tx, bool ove void* ff_buf, uint16_t ff_bufsize, uint8_t* ep_buf, uint16_t ep_bufsize) { (void) is_tx; - if (CFG_TUSB_EDPT_STREAM_NO_FIFO_ENABLED == 0 && (ff_buf == NULL || ff_bufsize == 0)) { + #if CFG_TUSB_EDPT_STREAM_NO_FIFO_ENABLED == 0 // FIFO is required + if (ff_buf == NULL || ff_bufsize == 0) { return false; } + #endif s->is_host = is_host; tu_fifo_config(&s->ff, ff_buf, ff_bufsize, 1, overwritable); |
