Created
April 18, 2021 14:41
-
-
Save CelliesProjects/04538cf4616e4b195b12dd20363a511b to your computer and use it in GitHub Desktop.
A esp32 check to see if any network interface up.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tcpip_adapter.h> | |
static bool netif_isup() { | |
for (int i = TCPIP_ADAPTER_IF_STA; i < TCPIP_ADAPTER_IF_MAX; i++) | |
if (tcpip_adapter_is_netif_up((tcpip_adapter_if_t)i)) return true; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment