Refactor autoinit code

This commit is contained in:
Sergey Lyubka committed 2024-03-15 20:23:37 +00:00
1 parent 15bd8b4fe9
commit fafc5c8348
14 files changed
+111 -303

No files matched your search

-29
View File
@@ -9,33 +9,4 @@ struct mg_tcpip_driver_ra_data {
uint8_t phy_addr; // PHY address
};
#undef MG_ENABLE_TCPIP_DRIVER_INIT
#define MG_ENABLE_TCPIP_DRIVER_INIT 0 // TODO(): needs SystemCoreClock
#if 0
#ifndef MG_MAC_ADDRESS
#define MG_MAC_ADDRESS MG_MAC_ADDRESS_RANDOM
#endif
#ifndef MG_TCPIP_PHY_ADDR
#define MG_TCPIP_PHY_ADDR 1
#endif
#ifndef MG_DRIVER_RA_CLOCK
#define MG_DRIVER_RA_CLOCK
#endif
#ifndef MG_DRIVER_RA_IRQNO
#define MG_DRIVER_RA_IRQNO 0
#endif
#define MG_TCPIP_DRIVER_DATA \
static struct mg_tcpip_driver_ra_data driver_data = { \
.clock = MG_DRIVER_RA_CLOCK, \
.irqno = MG_DRIVER_RA_CLOCK, \
.phy_addr = MG_TCPIP_PHY_ADDR, \
};
#define MG_TCPIP_DRIVER_CODE &mg_tcpip_driver_ra
#define MG_TCPIP_DRIVER_NAME "ra"
#endif
#endif