From ef0ff43975fd3047231110bf40d6f650ed46bc0a Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 18 Jul 2023 17:23:50 -0300 Subject: [PATCH] static clue --- examples/stm32/nucleo-h743zi-cube-baremetal/Core/Src/main.c | 4 ++++ examples/stm32/nucleo-h743zi-cube-freertos/Core/Src/main.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/examples/stm32/nucleo-h743zi-cube-baremetal/Core/Src/main.c b/examples/stm32/nucleo-h743zi-cube-baremetal/Core/Src/main.c index 62505d2e..67a5b2b4 100644 --- a/examples/stm32/nucleo-h743zi-cube-baremetal/Core/Src/main.c +++ b/examples/stm32/nucleo-h743zi-cube-baremetal/Core/Src/main.c @@ -154,6 +154,10 @@ int main(void) // Initialise Mongoose network stack struct mg_tcpip_driver_stm32h_data driver_data = {.mdc_cr = 4}; struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(), + // Uncomment below for static configuration: + // .ip = mg_htonl(MG_U32(192, 168, 0, 223)), + // .mask = mg_htonl(MG_U32(255, 255, 255, 0)), + // .gw = mg_htonl(MG_U32(192, 168, 0, 1)), .driver = &mg_tcpip_driver_stm32h, .driver_data = &driver_data}; mg_tcpip_init(&mgr, &mif); diff --git a/examples/stm32/nucleo-h743zi-cube-freertos/Core/Src/main.c b/examples/stm32/nucleo-h743zi-cube-freertos/Core/Src/main.c index bab97870..e88811f7 100644 --- a/examples/stm32/nucleo-h743zi-cube-freertos/Core/Src/main.c +++ b/examples/stm32/nucleo-h743zi-cube-freertos/Core/Src/main.c @@ -510,10 +510,12 @@ void server(void *argument) mg_log_set(MG_LL_DEBUG); // Set log level // Initialise Mongoose network stack - // Specify MAC address, and IP/mask/GW in network byte order for static - // IP configuration. If IP/mask/GW are unset, DHCP is going to be used struct mg_tcpip_driver_stm32h_data driver_data = {.mdc_cr = 4}; struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(), + // Uncomment below for static configuration: + // .ip = mg_htonl(MG_U32(192, 168, 0, 223)), + // .mask = mg_htonl(MG_U32(255, 255, 255, 0)), + // .gw = mg_htonl(MG_U32(192, 168, 0, 1)), .driver = &mg_tcpip_driver_stm32h, .driver_data = &driver_data}; mg_tcpip_init(&mgr, &mif);