@@ -63,23 +63,21 @@ TU_VERIFY_STATIC(FSDEV_BTABLE_BASE % 8 == 0, "BTABLE base must be aligned to 8 b
6363
6464// CFG_TUSB_FSDEV_PMA_SIZE is PMA buffer size in bytes.
6565// - 512-byte devices, access with a stride of two words (use every other 16-bit address)
66- // - 1024-byte devices, access with a stride of one word (use every 16-bit address)
66+ // - 1024-byte devices, access with a stride of one word (use every 16-bit address) or 32-bit address
6767// - 2048-byte devices, access with 32-bit address
68-
69- // For purposes of accessing the packet
70- #if CFG_TUSB_FSDEV_PMA_SIZE == 512
71- // 1x16 bit / word access scheme
72- #define FSDEV_PMA_STRIDE 2
73- #define pma_access_scheme TU_ATTR_ALIGNED(4)
74- #elif CFG_TUSB_FSDEV_PMA_SIZE == 1024 && CFG_TUSB_MCU != OPT_MCU_STM32U0
75- // 2x16 bit / word access scheme
76- #define FSDEV_PMA_STRIDE 1
77- #define pma_access_scheme
78- #elif CFG_TUSB_FSDEV_PMA_SIZE == 2048 || CFG_TUSB_MCU == OPT_MCU_STM32U0
68+ #if CFG_TUSB_FSDEV_PMA_SIZE == 2048 || TU_CHECK_MCU (OPT_MCU_STM32U0 )
7969 // 32 bit access scheme
8070 #define FSDEV_BUS_32BIT
8171 #define FSDEV_PMA_STRIDE 1
8272 #define pma_access_scheme
73+ #elif CFG_TUSB_FSDEV_PMA_SIZE == 1024
74+ // 2x16 bit / word access scheme
75+ #define FSDEV_PMA_STRIDE 1
76+ #define pma_access_scheme
77+ #elif CFG_TUSB_FSDEV_PMA_SIZE == 512
78+ // 1x16 bit / word access scheme
79+ #define FSDEV_PMA_STRIDE 2
80+ #define pma_access_scheme TU_ATTR_ALIGNED(4)
8381#endif
8482
8583// The fsdev_bus_t type can be used for both register and PMA access necessities
0 commit comments