struct mip_ipcfg -> struct mip_cfg

This commit is contained in:
cpq 2022-08-31 08:41:16 +01:00
parent 8a61969c8f
commit c131b8daf1
6 changed files with 8 additions and 8 deletions

View File

@ -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"));

View File

@ -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"));

View File

@ -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 =

View File

@ -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;

View File

@ -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 =

View File

@ -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;