assorted nit picks

This commit is contained in:
Sergio R. Caprile committed 2025-07-18 11:19:58 -03:00
1 parent 75c11436ff
commit fa841916c1
4 files changed
+40 -4

No files matched your search

+7 -1
View File
@@ -28,6 +28,12 @@ struct mg_tcpip_driver_stm32f_data {
#define MG_DRIVER_MDC_CR 4
#endif
#if MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn)
#else
#define MG_NEIRQ
#endif
#define MG_TCPIP_DRIVER_INIT(mgr) \
do { \
static struct mg_tcpip_driver_stm32f_data driver_data_; \
@@ -40,8 +46,8 @@ struct mg_tcpip_driver_stm32f_data {
mif_.driver = &mg_tcpip_driver_stm32f; \
mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \
MG_NEIRQ; \
mg_tcpip_init(mgr, &mif_); \
NVIC_EnableIRQ(ETH_IRQn); \
MG_INFO(("Driver: stm32f, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)
+7 -1
View File
@@ -40,6 +40,12 @@ struct mg_tcpip_driver_stm32h_data {
#define MG_DRIVER_MDC_CR 4
#endif
#if MG_ENABLE_DRIVER_STM32H && MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn)
#else
#define MG_NEIRQ
#endif
#define MG_TCPIP_DRIVER_INIT(mgr) \
do { \
static struct mg_tcpip_driver_stm32h_data driver_data_; \
@@ -54,7 +60,7 @@ struct mg_tcpip_driver_stm32h_data {
mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \
mg_tcpip_init(mgr, &mif_); \
NVIC_EnableIRQ(ETH_IRQn); \
MG_NEIRQ; \
MG_INFO(("Driver: stm32h, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)