diff options
| author | hathach <[email protected]> | 2024-07-23 19:53:41 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-07-23 19:53:41 +0700 |
| commit | c0f38ebf8d483da02a9074eaf021e1660a55fd75 (patch) | |
| tree | 570f1f4a1a08e48296f1d8ffb74ca0056a0e85b2 /src/portable/st/stm32_fsdev/fsdev_common.h | |
| parent | 5d26f5794e991409addfd9501ee04ad4e68dd1af (diff) | |
fsdev read/write packet use unaligned function
Diffstat (limited to 'src/portable/st/stm32_fsdev/fsdev_common.h')
| -rw-r--r-- | src/portable/st/stm32_fsdev/fsdev_common.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/portable/st/stm32_fsdev/fsdev_common.h b/src/portable/st/stm32_fsdev/fsdev_common.h index e8a6af8cb..920c17a04 100644 --- a/src/portable/st/stm32_fsdev/fsdev_common.h +++ b/src/portable/st/stm32_fsdev/fsdev_common.h @@ -35,14 +35,19 @@ #include "stdint.h" // FSDEV_PMA_SIZE is PMA buffer size in bytes. -// On 512-byte devices, access with a stride of two words (use every other 16-bit address) -// On 1024-byte devices, access with a stride of one word (use every 16-bit address) +// - 512-byte devices, access with a stride of two words (use every other 16-bit address) +// - 1024-byte devices, access with a stride of one word (use every 16-bit address) +// - 2048-byte devices, access with 32-bit address // For purposes of accessing the packet -#if ((FSDEV_PMA_SIZE) == 512u) +#if FSDEV_PMA_SIZE == 512 #define FSDEV_PMA_STRIDE (2u) -#elif ((FSDEV_PMA_SIZE) == 1024u) +#elif FSDEV_PMA_SIZE == 1024 #define FSDEV_PMA_STRIDE (1u) +#elif FSDEV_PMA_SIZE == 2048 + #ifndef FSDEV_BUS_32BIT + #warning "FSDEV_PMA_SIZE is 2048, but FSDEV_BUS_32BIT is not defined" + #endif #endif // The fsdev_bus_t type can be used for both register and PMA access necessities |
