Skip to content

Commit 6bd6729

Browse files
committed
ports/stm32: Make ETH DMA buffer attributes configurable.
Signed-off-by: Kwabena W. Agyeman <kwagyeman@live.com>
1 parent c69f0e4 commit 6bd6729

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

ports/stm32/eth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ typedef struct _eth_t {
121121
int16_t (*phy_get_link_status)(uint32_t phy_addr);
122122
} eth_t;
123123

124-
static eth_dma_t eth_dma __attribute__((aligned(16384)));
124+
static eth_dma_t eth_dma MICROPY_HW_ETH_DMA_ATTRIBUTE;
125125

126126
eth_t eth_instance;
127127

ports/stm32/mpconfigport.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ extern const struct _mp_obj_type_t network_lan_type;
193193
#define MICROPY_HW_NIC_ETH
194194
#endif
195195

196+
#ifndef MICROPY_HW_ETH_DMA_ATTRIBUTE
197+
#define MICROPY_HW_ETH_DMA_ATTRIBUTE __attribute__((aligned(16384)));
198+
#endif
199+
196200
#if MICROPY_PY_NETWORK_CYW43
197201
extern const struct _mp_obj_type_t mp_network_cyw43_type;
198202
#define MICROPY_HW_NIC_CYW43 { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mp_network_cyw43_type) },

0 commit comments

Comments
 (0)