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

+9 -9
View File
@@ -183,7 +183,7 @@ extern "C" {
// use HAL-defined execute-in-ram section // use HAL-defined execute-in-ram section
#define MG_IRAM __attribute__((section(".RamFunc"))) #define MG_IRAM __attribute__((section(".RamFunc")))
#ifndef STM32H5 #ifndef HAL_ICACHE_MODULE_ENABLED
#define HAL_ICACHE_IsEnabled() 0 #define HAL_ICACHE_IsEnabled() 0
#define HAL_ICACHE_Enable() (void) 0 #define HAL_ICACHE_Enable() (void) 0
#define HAL_ICACHE_Disable() (void) 0 #define HAL_ICACHE_Disable() (void) 0
@@ -3494,9 +3494,9 @@ struct mg_tcpip_driver_stm32f_data {
#endif #endif
#if MG_ARCH == MG_ARCH_CUBE #if MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn) #define MG_ENABLE_ETH_IRQ() NVIC_EnableIRQ(ETH_IRQn)
#else #else
#define MG_NEIRQ #define MG_ENABLE_ETH_IRQ()
#endif #endif
#define MG_TCPIP_DRIVER_INIT(mgr) \ #define MG_TCPIP_DRIVER_INIT(mgr) \
@@ -3511,7 +3511,7 @@ struct mg_tcpip_driver_stm32f_data {
mif_.driver = &mg_tcpip_driver_stm32f; \ mif_.driver = &mg_tcpip_driver_stm32f; \
mif_.driver_data = &driver_data_; \ mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \ MG_SET_MAC_ADDRESS(mif_.mac); \
MG_NEIRQ; \ MG_ENABLE_ETH_IRQ(); \
mg_tcpip_init(mgr, &mif_); \ mg_tcpip_init(mgr, &mif_); \
MG_INFO(("Driver: stm32f, MAC: %M", mg_print_mac, mif_.mac)); \ MG_INFO(("Driver: stm32f, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0) } while (0)
@@ -3560,9 +3560,9 @@ struct mg_tcpip_driver_stm32h_data {
#endif #endif
#if MG_ENABLE_DRIVER_STM32H && MG_ARCH == MG_ARCH_CUBE #if MG_ENABLE_DRIVER_STM32H && MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn) #define MG_ENABLE_ETH_IRQ() NVIC_EnableIRQ(ETH_IRQn)
#else #else
#define MG_NEIRQ #define MG_ENABLE_ETH_IRQ()
#endif #endif
#define MG_TCPIP_DRIVER_INIT(mgr) \ #define MG_TCPIP_DRIVER_INIT(mgr) \
@@ -3579,7 +3579,7 @@ struct mg_tcpip_driver_stm32h_data {
mif_.driver_data = &driver_data_; \ mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \ MG_SET_MAC_ADDRESS(mif_.mac); \
mg_tcpip_init(mgr, &mif_); \ mg_tcpip_init(mgr, &mif_); \
MG_NEIRQ; \ MG_ENABLE_ETH_IRQ(); \
MG_INFO(("Driver: stm32h, MAC: %M", mg_print_mac, mif_.mac)); \ MG_INFO(("Driver: stm32h, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0) } while (0)
+1 -1
View File
@@ -59,7 +59,7 @@
// use HAL-defined execute-in-ram section // use HAL-defined execute-in-ram section
#define MG_IRAM __attribute__((section(".RamFunc"))) #define MG_IRAM __attribute__((section(".RamFunc")))
#ifndef STM32H5 #ifndef HAL_ICACHE_MODULE_ENABLED
#define HAL_ICACHE_IsEnabled() 0 #define HAL_ICACHE_IsEnabled() 0
#define HAL_ICACHE_Enable() (void) 0 #define HAL_ICACHE_Enable() (void) 0
#define HAL_ICACHE_Disable() (void) 0 #define HAL_ICACHE_Disable() (void) 0
+4 -4
View File
@@ -29,9 +29,9 @@ struct mg_tcpip_driver_stm32f_data {
#endif #endif
#if MG_ARCH == MG_ARCH_CUBE #if MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn) #define MG_ENABLE_ETH_IRQ() NVIC_EnableIRQ(ETH_IRQn)
#else #else
#define MG_NEIRQ #define MG_ENABLE_ETH_IRQ()
#endif #endif
#define MG_TCPIP_DRIVER_INIT(mgr) \ #define MG_TCPIP_DRIVER_INIT(mgr) \
@@ -46,7 +46,7 @@ struct mg_tcpip_driver_stm32f_data {
mif_.driver = &mg_tcpip_driver_stm32f; \ mif_.driver = &mg_tcpip_driver_stm32f; \
mif_.driver_data = &driver_data_; \ mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \ MG_SET_MAC_ADDRESS(mif_.mac); \
MG_NEIRQ; \ MG_ENABLE_ETH_IRQ(); \
mg_tcpip_init(mgr, &mif_); \ mg_tcpip_init(mgr, &mif_); \
MG_INFO(("Driver: stm32f, MAC: %M", mg_print_mac, mif_.mac)); \ MG_INFO(("Driver: stm32f, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0) } while (0)
+4 -4
View File
@@ -41,9 +41,9 @@ struct mg_tcpip_driver_stm32h_data {
#endif #endif
#if MG_ENABLE_DRIVER_STM32H && MG_ARCH == MG_ARCH_CUBE #if MG_ENABLE_DRIVER_STM32H && MG_ARCH == MG_ARCH_CUBE
#define MG_NEIRQ NVIC_EnableIRQ(ETH_IRQn) #define MG_ENABLE_ETH_IRQ() NVIC_EnableIRQ(ETH_IRQn)
#else #else
#define MG_NEIRQ #define MG_ENABLE_ETH_IRQ()
#endif #endif
#define MG_TCPIP_DRIVER_INIT(mgr) \ #define MG_TCPIP_DRIVER_INIT(mgr) \
@@ -60,7 +60,7 @@ struct mg_tcpip_driver_stm32h_data {
mif_.driver_data = &driver_data_; \ mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \ MG_SET_MAC_ADDRESS(mif_.mac); \
mg_tcpip_init(mgr, &mif_); \ mg_tcpip_init(mgr, &mif_); \
MG_NEIRQ; \ MG_ENABLE_ETH_IRQ(); \
MG_INFO(("Driver: stm32h, MAC: %M", mg_print_mac, mif_.mac)); \ MG_INFO(("Driver: stm32h, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0) } while (0)