From ddca518cca21e3fdf31ec1afa79637ede1c9dbfb Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Fri, 23 Dec 2022 15:45:30 -0300 Subject: [PATCH] Rename driver data structure --- examples/stm32/nucleo-f429zi-baremetal/main.c | 2 +- examples/stm32/nucleo-f429zi-freertos-mip/main.c | 2 +- examples/stm32/nucleo-f746zg-baremetal/main.c | 2 +- examples/stm32/nucleo-f746zg-freertos-mip/main.c | 2 +- mip/driver_stm32.c | 2 +- mip/driver_stm32.h | 2 +- mongoose.c | 2 +- mongoose.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/stm32/nucleo-f429zi-baremetal/main.c b/examples/stm32/nucleo-f429zi-baremetal/main.c index 40305d75..d8553c6f 100644 --- a/examples/stm32/nucleo-f429zi-baremetal/main.c +++ b/examples/stm32/nucleo-f429zi-baremetal/main.c @@ -70,7 +70,7 @@ int main(void) { // 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 mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h + struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h struct mip_if mif = { .mac = {2, 0, 1, 2, 3, 5}, .driver = &mip_driver_stm32, diff --git a/examples/stm32/nucleo-f429zi-freertos-mip/main.c b/examples/stm32/nucleo-f429zi-freertos-mip/main.c index 959a2ae5..8dba74d3 100644 --- a/examples/stm32/nucleo-f429zi-freertos-mip/main.c +++ b/examples/stm32/nucleo-f429zi-freertos-mip/main.c @@ -48,7 +48,7 @@ static void server(void *args) { // IP configuration. If IP/mask/GW are unset, DHCP is going to be used MG_INFO(("Initializing Ethernet driver")); ethernet_init(); - struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h + struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h struct mip_if mif = { .mac = {2, 0, 1, 2, 3, 5}, .driver = &mip_driver_stm32, diff --git a/examples/stm32/nucleo-f746zg-baremetal/main.c b/examples/stm32/nucleo-f746zg-baremetal/main.c index 62b75303..d6770fe7 100644 --- a/examples/stm32/nucleo-f746zg-baremetal/main.c +++ b/examples/stm32/nucleo-f746zg-baremetal/main.c @@ -70,7 +70,7 @@ int main(void) { // 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 mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h + struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h struct mip_if mif = { .mac = {2, 0, 1, 2, 3, 5}, .driver = &mip_driver_stm32, diff --git a/examples/stm32/nucleo-f746zg-freertos-mip/main.c b/examples/stm32/nucleo-f746zg-freertos-mip/main.c index c43a2bc0..bdfab575 100644 --- a/examples/stm32/nucleo-f746zg-freertos-mip/main.c +++ b/examples/stm32/nucleo-f746zg-freertos-mip/main.c @@ -47,7 +47,7 @@ static void server(void *args) { // IP configuration. If IP/mask/GW are unset, DHCP is going to be used MG_INFO(("Initializing Ethernet driver")); ethernet_init(); - struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h + struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h struct mip_if mif = { .mac = {2, 0, 1, 2, 3, 5}, .driver = &mip_driver_stm32, diff --git a/mip/driver_stm32.c b/mip/driver_stm32.c index 12f050ab..c3c15e63 100644 --- a/mip/driver_stm32.c +++ b/mip/driver_stm32.c @@ -102,7 +102,7 @@ static int guess_mdc_cr(void) { } static bool mip_driver_stm32_init(struct mip_if *ifp) { - struct mip_driver_stm32 *d = (struct mip_driver_stm32 *) ifp->driver_data; + struct mip_driver_stm32_data *d = (struct mip_driver_stm32_data *) ifp->driver_data; s_ifp = ifp; // Init RX descriptors diff --git a/mip/driver_stm32.h b/mip/driver_stm32.h index 859fb68b..9dc63d7a 100644 --- a/mip/driver_stm32.h +++ b/mip/driver_stm32.h @@ -1,6 +1,6 @@ #pragma once -struct mip_driver_stm32 { +struct mip_driver_stm32_data { // MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz // HCLK range DIVIDER mdc_cr VALUE // ------------------------------------- diff --git a/mongoose.c b/mongoose.c index 7e1fbad4..310ab637 100644 --- a/mongoose.c +++ b/mongoose.c @@ -6029,7 +6029,7 @@ static int guess_mdc_cr(void) { } static bool mip_driver_stm32_init(struct mip_if *ifp) { - struct mip_driver_stm32 *d = (struct mip_driver_stm32 *) ifp->driver_data; + struct mip_driver_stm32_data *d = (struct mip_driver_stm32_data *) ifp->driver_data; s_ifp = ifp; // Init RX descriptors diff --git a/mongoose.h b/mongoose.h index ab2f81e3..c13f203e 100644 --- a/mongoose.h +++ b/mongoose.h @@ -1504,7 +1504,7 @@ void qp_init(void); #endif -struct mip_driver_stm32 { +struct mip_driver_stm32_data { // MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz // HCLK range DIVIDER mdc_cr VALUE // -------------------------------------