diff options
| author | Kwabena W. Agyeman <kwagyeman@live.com> | 2025-01-23 23:17:00 -0800 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-02-04 16:50:03 +1100 |
| commit | 112f65776588ef0cc3307f8bef208a480037d7d0 (patch) | |
| tree | e46ba98aaca5251f2f68157311d0a2ae603ab0d1 | |
| parent | 990f50fbb829e41ce275d942c056bcd3f4b857df (diff) | |
stm32/eth: Make ETH DMA buffer attributes configurable.
Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
| -rw-r--r-- | ports/stm32/eth.c | 2 | ||||
| -rw-r--r-- | ports/stm32/mpconfigboard_common.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ports/stm32/eth.c b/ports/stm32/eth.c index fd46bde23..9f6553068 100644 --- a/ports/stm32/eth.c +++ b/ports/stm32/eth.c @@ -121,7 +121,7 @@ typedef struct _eth_t { int16_t (*phy_get_link_status)(uint32_t phy_addr); } eth_t; -static eth_dma_t eth_dma __attribute__((aligned(16384))); +static eth_dma_t eth_dma MICROPY_HW_ETH_DMA_ATTRIBUTE; eth_t eth_instance; diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h index e1c9c159e..4ce0a75b8 100644 --- a/ports/stm32/mpconfigboard_common.h +++ b/ports/stm32/mpconfigboard_common.h @@ -669,3 +669,7 @@ #endif #define MICROPY_HW_USES_BOOTLOADER (MICROPY_HW_VTOR != 0x08000000) + +#ifndef MICROPY_HW_ETH_DMA_ATTRIBUTE +#define MICROPY_HW_ETH_DMA_ATTRIBUTE __attribute__((aligned(16384))); +#endif |
