1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

Add Mega definitions to allow compilation

This commit is contained in:
pmantoine 2024-04-18 15:48:08 +08:00
parent c35a6aeedc
commit ebfc59387f
2 changed files with 9 additions and 1 deletions

View File

@ -53,6 +53,12 @@
#define SPIWIFI_ACK 7 // a.k.a BUSY or READY pin
#define ESP32_RESETN 5 // Reset pin
#define ESP32_GPIO0 -1 // Not connected
#elif defined(ARDUINO_AVR_MEGA2560)
#define SPIWIFI SPI // The SPI port
#define SPIWIFI_SS 53 // Chip select pin
#define ESP32_RESETN 22 // Reset pin
#define SPIWIFI_ACK 23 // a.k.a BUSY or READY pin
#define ESP32_GPIO0 -1
#else
#warning "WiFiNINA has no SPI port or pin allocations for this archiecture yet!"
#endif
@ -88,7 +94,8 @@ bool WifiNINA::setup(const char *SSid,
if (WiFi.status() == WL_NO_MODULE) {
DIAG(F("Communication with WiFi module failed!"));
// don't continue for now!
while (true);
// while (true);
return;
}
// Print firmware version on the module

View File

@ -105,6 +105,7 @@ lib_deps =
${env.lib_deps}
arduino-libraries/Ethernet
SPI
https://github.com/adafruit/WiFiNINA
monitor_speed = 115200
monitor_echo = yes
build_flags =