Update TM4C driver init + nits

This commit is contained in:
Sergio R. Caprile committed 2024-07-31 16:53:29 -03:00
1 parent 1b75017c3c
commit 15c8ba5d3f
4 files changed
+38 -6

No files matched your search

+15
View File
@@ -19,4 +19,19 @@ struct mg_tcpip_driver_tm4c_data {
#define MG_DRIVER_MDC_CR 1
#endif
#define MG_TCPIP_DRIVER_INIT(mgr) \
do { \
static struct mg_tcpip_driver_tm4c_data driver_data_; \
static struct mg_tcpip_if mif_; \
driver_data_.mdc_cr = MG_DRIVER_MDC_CR; \
mif_.ip = MG_TCPIP_IP; \
mif_.mask = MG_TCPIP_MASK; \
mif_.gw = MG_TCPIP_GW; \
mif_.driver = &mg_tcpip_driver_tm4c; \
mif_.driver_data = &driver_data_; \
MG_SET_MAC_ADDRESS(mif_.mac); \
mg_tcpip_init(mgr, &mif_); \
MG_INFO(("Driver: tm4c, MAC: %M", mg_print_mac, mif_.mac)); \
} while (0)
#endif