Change driver API: up(ifp) -> poll(ifp, 1second)

Add misc extras required by Wi-Fi drivers (in progress)
This commit is contained in:
Sergio R. Caprile committed 2025-03-07 14:14:16 -03:00
1 parent 8906b1ac0f
commit 065027843e
30 files changed
+359 -248

No files matched your search

+3 -2
View File
@@ -178,7 +178,8 @@ static size_t mg_tcpip_driver_stm32f_tx(const void *buf, size_t len,
return len;
}
static bool mg_tcpip_driver_stm32f_up(struct mg_tcpip_if *ifp) {
static bool mg_tcpip_driver_stm32f_poll(struct mg_tcpip_if *ifp, bool s1) {
if (!s1) return false;
struct mg_tcpip_driver_stm32f_data *d =
(struct mg_tcpip_driver_stm32f_data *) ifp->driver_data;
uint8_t phy_addr = d == NULL ? 0 : d->phy_addr;
@@ -229,5 +230,5 @@ void ETH_IRQHandler(void) {
struct mg_tcpip_driver mg_tcpip_driver_stm32f = {
mg_tcpip_driver_stm32f_init, mg_tcpip_driver_stm32f_tx, NULL,
mg_tcpip_driver_stm32f_up};
mg_tcpip_driver_stm32f_poll};
#endif