diff options
| author | hathach <[email protected]> | 2025-03-24 22:58:21 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-03-24 22:58:21 +0700 |
| commit | db537861b2e39debe09009762a968edfcd4a9618 (patch) | |
| tree | a6c8fddbfa6f490a6bdce93cc70d53d3631dbf4e /src/common | |
| parent | 9f541a3d961e1a75a9c6441cb3564c726292731b (diff) | |
device cdc: rename tud_cdc_configure_fifo/_t to tud_cdc_configure/_t
add tx_overwritabe_if_not_connected for cdc driver configure
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_fifo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index 5f2dcabad..ecf002b09 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -916,8 +916,11 @@ bool tu_fifo_clear(tu_fifo_t *f) Overwritable mode the fifo is set to */ /******************************************************************************/ -bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) -{ +bool tu_fifo_set_overwritable(tu_fifo_t *f, bool overwritable) { + if (f->overwritable == overwritable) { + return true; + } + _ff_lock(f->mutex_wr); _ff_lock(f->mutex_rd); |
