diff --git a/examples/stm32/nucleo-f429zi-baremetal/main.c b/examples/stm32/nucleo-f429zi-baremetal/main.c index fbc5d9ea..1518519a 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 use 0 for IP, mask, GW - i.e. use DHCP // For static configuration, specify IP/mask/GW in network byte order - struct mip_ipcfg c = {.mac = {0, 0, 1, 2, 3, 4}, .ip = 0, .mask = 0, .gw = 0}; + struct mip_cfg c = {.mac = {0, 0, 1, 2, 3, 4}, .ip = 0, .mask = 0, .gw = 0}; mip_init(&mgr, &c, &mip_driver_stm32, NULL); MG_INFO(("Init done, starting main loop")); diff --git a/examples/stm32/nucleo-f746zg-baremetal/main.c b/examples/stm32/nucleo-f746zg-baremetal/main.c index 9e54e909..b9227ec2 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 use 0 for IP, mask, GW - i.e. use DHCP // For static configuration, specify IP/mask/GW in network byte order - struct mip_ipcfg c = {.mac = {0, 0, 1, 2, 3, 4}, .ip = 0, .mask = 0, .gw = 0}; + struct mip_cfg c = {.mac = {0, 0, 1, 2, 3, 4}, .ip = 0, .mask = 0, .gw = 0}; mip_init(&mgr, &c, &mip_driver_stm32, NULL); MG_INFO(("Init done, starting main loop")); diff --git a/mip/mip.c b/mip/mip.c index 1940594f..5850fec3 100644 --- a/mip/mip.c +++ b/mip/mip.c @@ -711,7 +711,7 @@ static void on_rx(void *buf, size_t len, void *userdata) { if (!q_write(&ifp->queue, buf, len)) MG_ERROR(("dropped %d", (int) len)); } -void mip_init(struct mg_mgr *mgr, struct mip_ipcfg *ipcfg, +void mip_init(struct mg_mgr *mgr, struct mip_cfg *ipcfg, struct mip_driver *driver, void *driver_data) { size_t maxpktsize = 1500, qlen = driver->setrx ? 1024 * 16 : 0; struct mip_if *ifp = diff --git a/mip/mip.h b/mip/mip.h index 2adcda12..6fa05434 100644 --- a/mip/mip.h +++ b/mip/mip.h @@ -12,12 +12,12 @@ struct mip_driver { void (*setrx)(void (*fn)(void *buf, size_t len, void *rxdata), void *rxdata); }; -struct mip_ipcfg { +struct mip_cfg { uint8_t mac[6]; // MAC address. Must not be 0 uint32_t ip, mask, gw; // IP, netmask, GW. If IP is 0, DHCP is used }; -void mip_init(struct mg_mgr *, struct mip_ipcfg *, struct mip_driver *, void *); +void mip_init(struct mg_mgr *, struct mip_cfg *, struct mip_driver *, void *); extern struct mip_driver mip_driver_stm32; extern struct mip_driver mip_driver_enc28j60; diff --git a/mongoose.c b/mongoose.c index 51038630..3c812bec 100644 --- a/mongoose.c +++ b/mongoose.c @@ -6820,7 +6820,7 @@ static void on_rx(void *buf, size_t len, void *userdata) { if (!q_write(&ifp->queue, buf, len)) MG_ERROR(("dropped %d", (int) len)); } -void mip_init(struct mg_mgr *mgr, struct mip_ipcfg *ipcfg, +void mip_init(struct mg_mgr *mgr, struct mip_cfg *ipcfg, struct mip_driver *driver, void *driver_data) { size_t maxpktsize = 1500, qlen = driver->setrx ? 1024 * 16 : 0; struct mip_if *ifp = diff --git a/mongoose.h b/mongoose.h index a2f933af..0b7c1125 100644 --- a/mongoose.h +++ b/mongoose.h @@ -1431,12 +1431,12 @@ struct mip_driver { void (*setrx)(void (*fn)(void *buf, size_t len, void *rxdata), void *rxdata); }; -struct mip_ipcfg { +struct mip_cfg { uint8_t mac[6]; // MAC address. Must not be 0 uint32_t ip, mask, gw; // IP, netmask, GW. If IP is 0, DHCP is used }; -void mip_init(struct mg_mgr *, struct mip_ipcfg *, struct mip_driver *, void *); +void mip_init(struct mg_mgr *, struct mip_cfg *, struct mip_driver *, void *); extern struct mip_driver mip_driver_stm32; extern struct mip_driver mip_driver_enc28j60;