mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-18 19:31:02 +00:00
Add driver init to mg_mgr_init()
This commit is contained in:
1 parent
5c459c71ea
commit
8db0729c19
4 files changed
+28
No files matched your search
@@ -9616,6 +9616,11 @@ void mg_mgr_free(struct mg_mgr *mgr) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if MG_ENABLE_TCPIP && MG_ENABLE_TCPIP_DRIVER_INIT
|
||||||
|
void mg_tcpip_auto_init(struct mg_mgr *);
|
||||||
|
#endif
|
||||||
|
|
||||||
void mg_mgr_init(struct mg_mgr *mgr) {
|
void mg_mgr_init(struct mg_mgr *mgr) {
|
||||||
memset(mgr, 0, sizeof(*mgr));
|
memset(mgr, 0, sizeof(*mgr));
|
||||||
#if MG_ENABLE_EPOLL
|
#if MG_ENABLE_EPOLL
|
||||||
|
|||||||
@@ -5253,6 +5253,15 @@ struct mg_tcpip_driver_atcmd_data {
|
|||||||
#include "Driver_ETH_MAC.h" // keep this include
|
#include "Driver_ETH_MAC.h" // keep this include
|
||||||
#include "Driver_ETH_PHY.h" // keep this include
|
#include "Driver_ETH_PHY.h" // keep this include
|
||||||
|
|
||||||
|
#ifndef MG_MAC_ADDRESS
|
||||||
|
#define MG_MAC_ADDRESS MG_MAC_ADDRESS_RANDOM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MG_TCPIP_DRIVER_DATA int driver_data;
|
||||||
|
|
||||||
|
#define MG_TCPIP_DRIVER_CODE &mg_tcpip_driver_cmsis
|
||||||
|
#define MG_TCPIP_DRIVER_NAME "cmsis"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,4 +5,13 @@
|
|||||||
#include "Driver_ETH_MAC.h" // keep this include
|
#include "Driver_ETH_MAC.h" // keep this include
|
||||||
#include "Driver_ETH_PHY.h" // keep this include
|
#include "Driver_ETH_PHY.h" // keep this include
|
||||||
|
|
||||||
|
#ifndef MG_MAC_ADDRESS
|
||||||
|
#define MG_MAC_ADDRESS MG_MAC_ADDRESS_RANDOM
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MG_TCPIP_DRIVER_DATA int driver_data;
|
||||||
|
|
||||||
|
#define MG_TCPIP_DRIVER_CODE &mg_tcpip_driver_cmsis
|
||||||
|
#define MG_TCPIP_DRIVER_NAME "cmsis"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -316,6 +316,11 @@ void mg_mgr_free(struct mg_mgr *mgr) {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if MG_ENABLE_TCPIP && MG_ENABLE_TCPIP_DRIVER_INIT
|
||||||
|
void mg_tcpip_auto_init(struct mg_mgr *);
|
||||||
|
#endif
|
||||||
|
|
||||||
void mg_mgr_init(struct mg_mgr *mgr) {
|
void mg_mgr_init(struct mg_mgr *mgr) {
|
||||||
memset(mgr, 0, sizeof(*mgr));
|
memset(mgr, 0, sizeof(*mgr));
|
||||||
#if MG_ENABLE_EPOLL
|
#if MG_ENABLE_EPOLL
|
||||||
|
|||||||
Reference in new issue
Block a user