diff options
| author | hathach <[email protected]> | 2026-07-17 11:40:15 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-07-17 11:54:14 +0700 |
| commit | a2f0c3c1baea4f0129d14d1a85c7fe8b307a2405 (patch) | |
| tree | f53e2fd1cc6368967f4a5c32a8e2c9352896bc74 | |
| parent | 9b3259e60f3bd7e2d9637b61dc07265e4a73b362 (diff) | |
rusb2: restore speed-conditional hwfifo stride mask
FS-forced builds on the HS module are not a supported configuration, so
the 32-bit access path does not need to exist in full-speed builds:
CFG_TUSB_FIFO_HWFIFO_DATA_STRIDE returns to (2 | (TUD_OPT_HIGH_SPEED ? 4 : 0)).
Saves 28 bytes of text on FS-only parts (measured on ra4m1_ek cdc_msc);
high-speed builds keep both widths for the dual-module (FS+HS ports) case.
Build-verified: ra4m1_ek and ra6m5_ek cdc_msc.
| -rw-r--r-- | src/tusb_option.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tusb_option.h b/src/tusb_option.h index 65cf747e2..e19ee1629 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -376,7 +376,7 @@ //------------ RUSB2 --------------// #if defined(TUP_USBIP_RUSB2) #define CFG_TUD_EDPT_DEDICATED_HWFIFO 1 - #define CFG_TUSB_FIFO_HWFIFO_DATA_STRIDE (2 | 4) // HS module uses 32-bit access at any link speed (e.g. FS-forced build) + #define CFG_TUSB_FIFO_HWFIFO_DATA_STRIDE (2 | (TUD_OPT_HIGH_SPEED ? 4 : 0)) // 16 bit and 32 bit if highspeed #define CFG_TUSB_FIFO_HWFIFO_ADDR_STRIDE 0 #define CFG_TUSB_FIFO_HWFIFO_CUSTOM_WRITE // custom write since rusb2 can change access width 32 -> 16 and can write // odd byte with byte access |
