kopia lustrzana https://github.com/lora-aprs/LoRa_APRS_iGate
update t internet poe
rodzic
36511531ae
commit
b4e7d8853b
|
@ -78,27 +78,29 @@ EthTask::~EthTask() {
|
|||
bool EthTask::setup(System &system) {
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
|
||||
// if (system.getBoardConfig()->Ethernet.nReset != -1) {
|
||||
// pinMode(system.getBoardConfig()->Ethernet.nReset, OUTPUT);
|
||||
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 0);
|
||||
// delay(200);
|
||||
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 1);
|
||||
// delay(200);
|
||||
// digitalWrite(system.getBoardConfig()->Ethernet.nReset, 0);
|
||||
// delay(200);
|
||||
// digitalWrite(system.getBoardConfig()->Ethernet.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);
|
||||
//
|
||||
// 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());
|
||||
//} else {
|
||||
// ETH.setHostname(system.getUserConfig()->callsign.c_str());
|
||||
//}
|
||||
#ifdef T_INTERNET_POE
|
||||
if (ETH_NRESET != -1) {
|
||||
pinMode(ETH_NRESET, OUTPUT);
|
||||
digitalWrite(ETH_NRESET, 0);
|
||||
delay(200);
|
||||
digitalWrite(ETH_NRESET, 1);
|
||||
delay(200);
|
||||
digitalWrite(ETH_NRESET, 0);
|
||||
delay(200);
|
||||
digitalWrite(ETH_NRESET, 1);
|
||||
}
|
||||
|
||||
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.hostname.overwrite) {
|
||||
ETH.setHostname(system.getUserConfig()->network.hostname.name.c_str());
|
||||
} else {
|
||||
ETH.setHostname(system.getUserConfig()->callsign.c_str());
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
extends = esp32_base
|
||||
board = esp32doit-devkit-v1
|
||||
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
|
||||
|
|
Ładowanie…
Reference in New Issue