MG_ARCH_CUBE nitpicks

This commit is contained in:
Sergey Lyubka committed 2025-07-19 08:33:48 +01:00
1 parent 490066fd17
commit 3cd166d065
4 files changed
+18 -18

No files matched your search

+4 -4
View File
@@ -29,9 +29,9 @@ struct mg_tcpip_driver_stm32f_data {
#endif
#if MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn)
#else
#define MG_NEIRQ
#define MG_ENABLE_ETH_IRQ() NVIC_EnableIRQ(ETH_IRQn)
#else
#define MG_ENABLE_ETH_IRQ()
#endif
#define MG_TCPIP_DRIVER_INIT(mgr) \
@@ -46,7 +46,7 @@ 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_ENABLE_ETH_IRQ(); \
mg_tcpip_init(mgr, &mif_); \
MG_INFO(("Driver: stm32f, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)
+4 -4
View File
@@ -41,9 +41,9 @@ struct mg_tcpip_driver_stm32h_data {
#endif
#if MG_ENABLE_DRIVER_STM32H && MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn)
#else
#define MG_NEIRQ
#define MG_ENABLE_ETH_IRQ() NVIC_EnableIRQ(ETH_IRQn)
#else
#define MG_ENABLE_ETH_IRQ()
#endif
#define MG_TCPIP_DRIVER_INIT(mgr) \
@@ -60,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_); \
MG_NEIRQ; \
MG_ENABLE_ETH_IRQ(); \
MG_INFO(("Driver: stm32h, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)