diff options
| author | hathach <[email protected]> | 2025-11-21 12:58:28 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-11-21 12:58:28 +0700 |
| commit | d4cdc096caa9c662f77f5633a792335f74fdad97 (patch) | |
| tree | 1a0a53871738c45d47822d778e94057bac47731d /src/common/tusb_fifo.c | |
| parent | 30198b2ab9e69c120e5b49c063dad3d2d3889d79 (diff) | |
add more unit tests for tu_fifo
Diffstat (limited to 'src/common/tusb_fifo.c')
| -rw-r--r-- | src/common/tusb_fifo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index a3e89bbc2..ef2344801 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -85,7 +85,7 @@ bool tu_fifo_config(tu_fifo_t *f, void *buffer, uint16_t depth, uint16_t item_si // Pull & Push //--------------------------------------------------------------------+ -#ifdef TUP_MEM_CONST_ADDR +#ifdef CFG_TUSB_FIFO_ACCESS_FIXED_ADDR_RW32 // Intended to be used to read from hardware USB FIFO in e.g. STM32 where all data is read from a constant address // Code adapted from dcd_synopsys.c // TODO generalize with configurable 1 byte or 4 byte each read @@ -164,7 +164,7 @@ static void _ff_push_n(tu_fifo_t *f, const void *app_buf, uint16_t n, uint16_t w } break; -#ifdef TUP_MEM_CONST_ADDR +#ifdef CFG_TUSB_FIFO_ACCESS_FIXED_ADDR_RW32 case TU_FIFO_FIXED_ADDR_RW32: // Intended for hardware buffers from which it can be read word by word only if (n <= lin_count) { @@ -244,7 +244,7 @@ static void _ff_pull_n(tu_fifo_t *f, void *app_buf, uint16_t n, uint16_t rd_ptr, } break; -#ifdef TUP_MEM_CONST_ADDR +#ifdef CFG_TUSB_FIFO_ACCESS_FIXED_ADDR_RW32 case TU_FIFO_FIXED_ADDR_RW32: if (n <= lin_count) { // Linear only |
