Skip to content

Instantly share code, notes, and snippets.

@CelliesProjects
Created April 18, 2021 14:41
Show Gist options
  • Save CelliesProjects/04538cf4616e4b195b12dd20363a511b to your computer and use it in GitHub Desktop.
Save CelliesProjects/04538cf4616e4b195b12dd20363a511b to your computer and use it in GitHub Desktop.
A esp32 check to see if any network interface up.
#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