diff --git a/examples/stm32/nucleo-f429zi-cube-freertos/Core/Src/main.c b/examples/stm32/nucleo-f429zi-cube-freertos/Core/Src/main.c index b93e203364..1531a3ec43 100644 --- a/examples/stm32/nucleo-f429zi-cube-freertos/Core/Src/main.c +++ b/examples/stm32/nucleo-f429zi-cube-freertos/Core/Src/main.c @@ -461,10 +461,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_stm32_data driver_data = {.mdc_cr = 4}; - struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(), + 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_stm32, .driver_data = &driver_data}; mg_tcpip_init(&mgr, &mif); diff --git a/examples/stm32/nucleo-f746zg-cube-freertos/Core/Src/main.c b/examples/stm32/nucleo-f746zg-cube-freertos/Core/Src/main.c index 94118d295b..a14ad33435 100644 --- a/examples/stm32/nucleo-f746zg-cube-freertos/Core/Src/main.c +++ b/examples/stm32/nucleo-f746zg-cube-freertos/Core/Src/main.c @@ -477,10 +477,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_stm32_data driver_data = {.mdc_cr = 4}; - struct mg_tcpip_if mif = {.mac = GENERATE_LOCALLY_ADMINISTERED_MAC(), + 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_stm32, .driver_data = &driver_data}; mg_tcpip_init(&mgr, &mif);