From d2f6b55d1dd90dd032c7ec62c16836a404357c45 Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Tue, 18 Jul 2023 17:21:35 -0300 Subject: [PATCH] static clue --- .../ST/NUCLEO-F746ZG/nucleo-f746zg-keil-baremetal/main.c | 6 ++++-- .../ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos/main.c | 6 ++++-- .../NUCLEO-F746ZG/nucleo-f746zg-keil-freertos_cmsis2/main.c | 6 ++++-- .../Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx/main.c | 6 ++++-- .../Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx5/main.c | 6 ++++-- .../Examples/nucleo-f746zg-cube-baremetal/Core/Src/main.c | 6 ++++-- .../Examples/nucleo-f746zg-cube-freertos/Core/Src/main.c | 6 ++++-- 7 files changed, 28 insertions(+), 14 deletions(-) diff --git a/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-baremetal/main.c b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-baremetal/main.c index 542892e7..a34b938c 100644 --- a/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-baremetal/main.c +++ b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-baremetal/main.c @@ -43,10 +43,12 @@ int main(void) { 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(), + // 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/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos/main.c b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos/main.c index 8421c593..588a52ef 100644 --- a/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos/main.c +++ b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos/main.c @@ -39,10 +39,12 @@ static void server(void *args) { 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(), + // 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/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos_cmsis2/main.c b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos_cmsis2/main.c index 1a3d8124..b68262f3 100644 --- a/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos_cmsis2/main.c +++ b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-freertos_cmsis2/main.c @@ -33,10 +33,12 @@ static void server(void *args) { 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(), + // 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/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx/main.c b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx/main.c index 6b075ab0..232deccc 100644 --- a/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx/main.c +++ b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx/main.c @@ -33,10 +33,12 @@ static void server(const void *args) { 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(), + // 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/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx5/main.c b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx5/main.c index c78bee3d..80f47138 100644 --- a/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx5/main.c +++ b/extra/cmsis-pack/Boards/ST/NUCLEO-F746ZG/nucleo-f746zg-keil-rtx5/main.c @@ -33,10 +33,12 @@ static void server(void *args) { 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(), + // 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/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-baremetal/Core/Src/main.c b/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-baremetal/Core/Src/main.c index 1707ea3b..e923ab8a 100644 --- a/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-baremetal/Core/Src/main.c +++ b/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-baremetal/Core/Src/main.c @@ -149,10 +149,12 @@ int main(void) 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(), + // 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/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-freertos/Core/Src/main.c b/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-freertos/Core/Src/main.c index eb0250b2..9c97d539 100644 --- a/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-freertos/Core/Src/main.c +++ b/extra/stm_exp_pack/Examples/nucleo-f746zg-cube-freertos/Core/Src/main.c @@ -476,10 +476,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(), + // 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);