update t internet poe

This commit is contained in:
Peter Buchegger 2023-09-27 19:31:55 +00:00
parent 36511531ae
commit b4e7d8853b
2 changed files with 27 additions and 22 deletions

View file

@ -78,27 +78,29 @@ EthTask::~EthTask() {
bool EthTask::setup(System &system) { bool EthTask::setup(System &system) {
WiFi.onEvent(WiFiEvent); WiFi.onEvent(WiFiEvent);
// if (system.getBoardConfig()->Ethernet.nReset != -1) { #ifdef T_INTERNET_POE
// pinMode(system.getBoardConfig()->Ethernet.nReset, OUTPUT); if (ETH_NRESET != -1) {
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 0); pinMode(ETH_NRESET, OUTPUT);
// delay(200); digitalWrite(ETH_NRESET, 0);
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 1); delay(200);
// delay(200); digitalWrite(ETH_NRESET, 1);
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 0); delay(200);
// delay(200); digitalWrite(ETH_NRESET, 0);
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 1); delay(200);
// } digitalWrite(ETH_NRESET, 1);
// }
// ETH.begin(system.getBoardConfig()->Ethernet.Addr, system.getBoardConfig()->Ethernet.Power, system.getBoardConfig()->Ethernet.MDC, system.getBoardConfig()->Ethernet.MDIO, system.getBoardConfig()->Ethernet.Type, system.getBoardConfig()->Ethernet.CLK);
// ETH.begin(ETH_ADDR, ETH_POWER, ETH_MDC, ETH_MDIO, (eth_phy_type_t)ETH_TYPE, (eth_clock_mode_t)ETH_CLOCK);
// if (!system.getUserConfig()->network.DHCP) {
// ETH.config(system.getUserConfig()->network.static_.ip, system.getUserConfig()->network.static_.gateway, system.getUserConfig()->network.static_.subnet, system.getUserConfig()->network.static_.dns1, system.getUserConfig()->network.static_.dns2); if (!system.getUserConfig()->network.DHCP) {
//} ETH.config(system.getUserConfig()->network.static_.ip, system.getUserConfig()->network.static_.gateway, system.getUserConfig()->network.static_.subnet, system.getUserConfig()->network.static_.dns1, system.getUserConfig()->network.static_.dns2);
// if (system.getUserConfig()->network.hostname.overwrite) { }
// ETH.setHostname(system.getUserConfig()->network.hostname.name.c_str()); if (system.getUserConfig()->network.hostname.overwrite) {
//} else { ETH.setHostname(system.getUserConfig()->network.hostname.name.c_str());
// ETH.setHostname(system.getUserConfig()->callsign.c_str()); } else {
//} ETH.setHostname(system.getUserConfig()->callsign.c_str());
}
#endif
return true; return true;
} }

View file

@ -2,4 +2,7 @@
extends = esp32_base extends = esp32_base
board = esp32doit-devkit-v1 board = esp32doit-devkit-v1
build_flags = build_flags =
${esp32_base.build_flags} -DTINTERNET_POE -DOLED_SDA=33 -DOLED_SCL=32 -DLORA_SCK=14 -DLORA_MISO=2 -DLORA_MOSI=15 -DLORA_CS=12 -DLORA_IRQ=36 -DLORA_RST=4 -DUSE_SX1278 ${esp32_base.build_flags} -DT_INTERNET_POE
-DOLED_SDA=33 -DOLED_SCL=32
-DLORA_SCK=14 -DLORA_MISO=2 -DLORA_MOSI=15 -DLORA_CS=12 -DLORA_IRQ=36 -DLORA_RST=4 -DUSE_SX1278
-DETH_MDC=23 -DETH_MDIO=18 -DETH_NRESET=5 -DETH_ADDR=0 -DETH_POWER=-1 -DETH_CLOCK=3 -DETH_TYPE=0