-
Cyril Danilevski authoredCyril Danilevski authored
esp32_ethernet.hpp 550 B
/*
Arduinos are more often used with wifi, and much of the utilities are written with Wifi in mind.
We use Ethernet, but reuse much of the networking utilities.
*/
#ifndef esp32_ethernet_h
#define esp32_ethernet_h
#include "Arduino.h"
#include "ETH.h"
#define ETH_ADDR 1
#define ETH_POWER_PIN 5
#define ETH_MDC_PIN 23
#define ETH_MDIO_PIN 18
#define ETH_TYPE ETH_PHY_IP101
#define ETH_CLK_MODE ETH_CLOCK_GPIO0_IN
static bool eth_connected = false;
void EthernetEvent(WiFiEvent_t event);
void connectNetwork();
#endif