Update examples to adopt to the new iface state

This commit is contained in:
cpq committed 2023-07-12 14:09:30 +01:00
1 parent 6957c379d5
commit 818f99b286
13 files changed
+84 -86

No files matched your search

+3 -3
View File
@@ -35,9 +35,9 @@ void mg_random(void *buf, size_t len) {
static void timer_fn(void *arg) {
gpio_put(PICO_DEFAULT_LED_PIN,
!gpio_get_out_level(PICO_DEFAULT_LED_PIN)); // Blink LED
struct mg_tcpip_if *ifp = arg; // And show
const char *names[] = {"down", "up", "ready"}; // network stats
!gpio_get_out_level(PICO_DEFAULT_LED_PIN)); // Blink LED
struct mg_tcpip_if *ifp = arg; // And show
const char *names[] = {"down", "up", "req", "ready"}; // network stats
MG_INFO(("Ethernet: %s, IP: %M, rx:%u, tx:%u, dr:%u, er:%u",
names[ifp->state], mg_print_ip4, &ifp->ip, ifp->nrecv, ifp->nsent,
ifp->ndrop, ifp->nerr));