Skip to content

Commit

Permalink
Add Mega definitions to allow compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
pmantoine committed Apr 18, 2024
1 parent c35a6ae commit ebfc593
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Wifi_NINA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit ebfc593

Please sign in to comment.