Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
v1.8.14-1 to support ATmega4809
Browse files Browse the repository at this point in the history
### Releases v1.8.14-1

1. Fix examples to support ATmega4809 such as UNO_WIFI_REV2 and NANO_EVERY
2. Add support to generic `__SAMD21E1xA__`, `__SAMD21G1xA__` and `__SAMD21J1xA__`
3. Add `headers` in `library.json` for PIO
4. Update `platform.io`
5. Remove debug leftovers. Check [Debug text comes out of the serial port when listening for UDP connections #15](#15)
  • Loading branch information
khoih-prog authored Nov 26, 2021
1 parent 266480a commit 2530160
Show file tree
Hide file tree
Showing 53 changed files with 540 additions and 158 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p

Please ensure to specify the following:

* Arduino IDE version (e.g. 1.8.15) or Platform.io version
* Core Version (e.g. Arduino SAMD core v1.8.11, Adafruit SAMD core v1.7.3, Arduino-mbed RP2040 v2.3.1)
* Arduino IDE version (e.g. 1.8.16) or Platform.io version
* Core Version (e.g. Arduino SAMD core v1.8.12, Adafruit SAMD core v1.7.5, Arduino-mbed RP2040 v2.6.1)
* Board type (e.g. NANO_RP2040_CONNECT, RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040, GENERIC_RP2040, etc.)
* Contextual information (e.g. what you were trying to achieve)
* Simplest possible steps to reproduce
Expand All @@ -27,11 +27,11 @@ Please ensure to specify the following:
### Example

```
Arduino IDE version: 1.8.15
Arduino-mbed RP2040 v2.3.1
Arduino IDE version: 1.8.16
Arduino-mbed RP2040 v2.6.1
NANO_RP2040_CONNECT Module
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-80-generic #90-Ubuntu SMP Fri Jul 9 22:49:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Linux xy-Inspiron-3593 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Context:
I encountered an endless loop while trying to connect to Local WiFi.
Expand Down
123 changes: 7 additions & 116 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ This [**WiFiNINA_Generic library**](https://github.com/khoih-prog/WiFiNINA_Gener
2. [`Arduino AVR core 1.8.3+`](https://github.com/arduino/ArduinoCore-avr) for Arduino (Use Arduino Board Manager) for AVR boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-avr.svg)](https://github.com/arduino/ArduinoCore-avr/releases/latest)
3. [`Teensy core 1.55+`](https://www.pjrc.com/teensy/td_download.html) for Teensy (4.1, 4.0, 3.6, 3.5, 3,2, 3.1, 3.0, LC) boards
4. [`Arduino SAM DUE core 1.6.12+`](https://github.com/arduino/ArduinoCore-sam) for SAM DUE ARM Cortex-M3 boards
5. [`Arduino SAMD core 1.8.11+`](https://www.arduino.cc/en/Guide/ArduinoM0) for SAMD ARM Cortex-M0+ boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-samd.svg)](https://github.com/arduino/ArduinoCore-samd/releases/latest)
5. [`Arduino SAMD core 1.8.12+`](https://www.arduino.cc/en/Guide/ArduinoM0) for SAMD ARM Cortex-M0+ boards. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-samd.svg)](https://github.com/arduino/ArduinoCore-samd/releases/latest)
6. [`Adafruit SAMD core 1.7.5+`](https://www.adafruit.com/) for SAMD ARM Cortex-M0+ and M4 boards (Nano 33 IoT, etc.). [![GitHub release](https://img.shields.io/github/release/adafruit/ArduinoCore-samd.svg)](https://github.com/adafruit/ArduinoCore-samd/releases/latest)
7. [`Seeeduino SAMD core 1.8.2+`](https://github.com/Seeed-Studio/ArduinoCore-samd) for SAMD21/SAMD51 boards (XIAO M0, Wio Terminal, etc.). [![Latest release](https://img.shields.io/github/release/Seeed-Studio/ArduinoCore-samd.svg)](https://github.com/Seeed-Studio/ArduinoCore-samd/releases/latest/)
8. [`Adafruit nRF52 v1.1.0+`](https://www.adafruit.com) for nRF52 boards such as Adafruit NRF52840_FEATHER, NRF52832_FEATHER, NRF52840_FEATHER_SENSE, NRF52840_ITSYBITSY, NRF52840_CIRCUITPLAY, NRF52840_CLUE, NRF52840_METRO, NRF52840_PCA10056, PARTICLE_XENON, **NINA_B302_ublox**, etc. [![GitHub release](https://img.shields.io/github/release/adafruit/Adafruit_nRF52_Arduino.svg)](https://github.com/adafruit/Adafruit_nRF52_Arduino/releases/latest)
9. [`Arduino Core for STM32 v2.1.0+`](https://github.com/stm32duino/Arduino_Core_STM32) for STM32F/L/H/G/WB/MP1 boards. [![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)
10. [`Arduino mbed_rp2040 core 2.5.2+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
11. [`Earle Philhower's arduino-pico core v1.9.5+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
10. [`Arduino mbed_rp2040 core 2.6.1+`](https://github.com/arduino/ArduinoCore-mbed) for Arduino (Use Arduino Board Manager) RP2040-based boards, such as **Arduino Nano RP2040 Connect, RASPBERRY_PI_PICO, etc.**. [![GitHub release](https://img.shields.io/github/release/arduino/ArduinoCore-mbed.svg)](https://github.com/arduino/ArduinoCore-mbed/releases/latest)
11. [`Earle Philhower's arduino-pico core v1.9.6+`](https://github.com/earlephilhower/arduino-pico) for RP2040-based boards such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, etc. [![GitHub release](https://img.shields.io/github/release/earlephilhower/arduino-pico.svg)](https://github.com/earlephilhower/arduino-pico/releases/latest)
12. [`Arduino AVR core 1.8.3+`](https://github.com/arduino/ArduinoCore-avr) for Arduino AVR boards. Use Arduino Board Manager to install. [![Latest release](https://img.shields.io/github/release/arduino/ArduinoCore-avr.svg)](https://github.com/arduino/ArduinoCore-avr/releases/latest/)
13. [`Adafruit AVR core 1.4.14+`](https://github.com/adafruit/Adafruit_Arduino_Boards) for Adafruit AVR boards. Use Arduino Board Manager to install.
14. [`Sparkfun AVR core 1.1.13+`](https://github.com/sparkfun/Arduino_Boards) for Sparkfun AVR boards. Use Arduino Board Manager to install.
Expand Down Expand Up @@ -524,7 +524,7 @@ For example
```
Start WiFiNINA CheckFirmwareVersion on SAMD_NANO_33_IOT
WiFiNINA_Generic v1.8.13
WiFiNINA_Generic v1.8.14-1
Firmware version installed: aaa.bbb.ccc
Latest firmware version available : aaa.bbb.ccc

Expand Down Expand Up @@ -590,7 +590,7 @@ This is the screen to demonstrate the SSL certificates have been loaded successf
// To eliminate FW warning when using not latest nina-fw version
// To use whenever WiFi101-FirmwareUpdater-Plugin is not sync'ed with nina-fw version
#define WIFI_FIRMWARE_LATEST_VERSION "1.4.5"
//#define WIFI_FIRMWARE_LATEST_VERSION "1.4.5"
#include <SPI.h>
#include <WiFiNINA_Generic.h>
Expand Down Expand Up @@ -1105,7 +1105,7 @@ The following are screen shot and debug terminal output when running example [Ad

```
Starting AdvancedServer on SAMD_NANO_33_IOT
WiFiNINA_Generic v1.8.13
WiFiNINA_Generic v1.8.14-1
[NN] ===============================
[NN]
Used/default SPI pinout:
Expand Down Expand Up @@ -1275,116 +1275,6 @@ Sometimes, the library will only work if you update the `WiFiNINA module/shield`
---
---

## Releases

### Releases v1.8.13

1. Sync with [Arduino WiFiNINA Library v1.8.13](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.13).
- Update latest available nina-fw to v1.4.8

2. Add support to SAMD51 ADAFRUIT_MATRIXPORTAL_M4_EXPRESS

### Releases v1.8.12

1. Sync with [Arduino WiFiNINA Library v1.8.12](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.12).
- Update latest available nina-fw to v1.4.7

2. Add support to many AVR (328P, 32U4, 16U4, etc.) boards. Check [Add support to Arduino UNO board #9](https://github.com/khoih-prog/WiFiNINA_Generic/pull/9)

### Releases v1.8.11

1. Sync with [Arduino WiFiNINA Library v1.8.11](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.11).
- RP2040 - adapt NinaPins to be used as class
- Provide clean API for passing watchdog function
- Update latest available nina-fw to v1.4.6

2. Permit nina-fw version overridden to use whenever WiFi101-FirmwareUpdater-Plugin is not sync'ed with nina-fw version

### Releases v1.8.10-1

1. Fix PinStatus-related compile error for some platforms

### Releases v1.8.10

1. Sync with [Arduino WiFiNINA Library v1.8.10](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.10).
- Add support to **Arduino Nano RP2040 Connect** using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed).
- Update latest available nina-fw to v1.4.5
- Bug fixes.
2. Add support to RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Earle Philhower's arduino-pico** v1.5.1+ core](https://github.com/earlephilhower/arduino-pico).
3. Add support to RP2040-based boards, such as **RASPBERRY_PI_PICO, ADAFRUIT_FEATHER_RP2040 and GENERIC_RP2040**, using [**Arduino-mbed RP2040** v2.1.0+ core](https://github.com/arduino/ArduinoCore-mbed).
4. Update `Packages' Patches`

### Releases v1.8.5

1. Sync with [Arduino WiFiNINA Library v1.8.5](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.5). Bugfix: Feed watchdog within busy-wait-loop within connectBearSSL to prevent a premature reset.
2. Update `Packages' Patches`

### Releases v1.8.2

1. Sync with [Arduino WiFiNINA Library v1.8.2](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.2). Using the latest WiFiNINA FW v1.4.3 in [WiFi101-FirmwareUpdater-Plugin v0.10.13](https://github.com/arduino/WiFi101-FirmwareUpdater-Plugin/releases/tag/v0.10.13)
2. Add possibility to resend data if lwip_send fails.

### Releases v1.8.0

1. Sync with [Arduino WiFiNINA Library v1.8.0](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.0). Using the latest WiFiNINA FW v1.4.2 in [WiFi101-FirmwareUpdater-Plugin v0.10.13](https://github.com/arduino/WiFi101-FirmwareUpdater-Plugin/releases/tag/v0.10.13)
2. Limit the maximum length of the download URL for the OTA binary since the receive buffer on the nina firmware can't hold more than 128 bytes.
3. Introduce **WiFiBearSSLClient (offloaded to Nina)**

### Releases v1.7.2

1. Add support to **Adafruit Airlift M4 boards: METRO_M4_AIRLIFT_LITE, PYBADGE_AIRLIFT_M4.** Thanks to [Gerard Moorcroft](https://github.com/gmstuff) to report issue [**WiFi Hangs when attempting to start WiFi (Adafruit M4 Express Airlift Lite board)**](https://github.com/khoih-prog/MySQL_MariaDB_Generic/issues/2) leading to this new version.
2. Add WIFININA_GENERIC_VERSION

#### Releases v1.7.1

1. Sync with [Arduino WiFiNINA Library v1.7.1](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.7.1). Using the latest WiFiNINA FW v1.4.1 in [WiFi101-FirmwareUpdater-Plugin v0.10.12](https://github.com/arduino/WiFi101-FirmwareUpdater-Plugin/releases/tag/v0.10.12)

#### Releases v1.7.0

1. Sync with [Arduino WiFiNINA Library v1.7.0](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.7.0). See [Add 'downloadOTA' command to download OTA file and verify length/CRC](https://github.com/arduino-libraries/WiFiNINA/pull/124)
2. Add Arduino SAMD Packages_Patches to fix Arduino SAMD compiler error when using STL. See [Improve Arduino compatibility with the STL (min and max macro)](https://github.com/arduino/ArduinoCore-samd/pull/399)

#### Releases v1.6.2

1. Fix WiFiStorage bug introduced from v1.6.0 resulting compile error.
2. Add example for WiFiStorage.

#### Releases v1.6.1

1. Add support to all **STM32F/L/H/G/WB/MP1**
2. Add support to **Seeeduino SAMD21/SAMD51 boards **
3. Fix bug introduced to v1.6.0 resulting nRF52 compile error.

#### Releases v1.6.0

1. Sync'ed with latest WiFiNINA Library v1.6.0.
2. New features include **WiFiStorage** and update to **NINA Firmware v1.4.0** from v1.3.0


#### Releases v1.5.3

1. Add function to support new WebSockets2_Generic Library
2. Update default pin-outs for nRF52 boards, especially NINA_112_ublox.

#### Releases v1.5.2

1. Port FirmwareUpdater to permit **nRF52, Teensy, SAMD21, SAMD51, etc.** boards to update WiFiNINA W101/W102 firmware and SSL certificates using **Arduino IDE WiFi101/WiFiNINA Firmware Updater.**
2. Update default pin-outs for nRF52 boards, especially NINA_B302_ublox.

Again with credits of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).

#### Releases v1.5.1

1. Add support to **nRF52** boards, such as **AdaFruit Feather nRF52832, nRF52840 Express, BlueFruit Sense, Itsy-Bitsy nRF52840 Express, Metro nRF52840 Express, Clue nRF52840, Nordic nRF52840DK, Particle Xenon, etc.** Raytac MDBT50Q-RX Dongle is not supported.
2. Add support to **NINA_B302_ublox running as nRF52840**. Thanks to great work of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip) for initiating, inspriring, working with, developing, debugging and testing. See [u-blox nina b](https://github.com/khoih-prog/WiFiNINA_Generic/issues/1)

#### Releases v1.5.0

1. The original [Arduino WiFiNINA library](http://www.arduino.cc/en/Reference/WiFiNINA) only supports very limited boards, such as: the Arduino MKR WiFi 1010, Arduino MKR VIDOR 4000 and Arduino UNO WiFi Rev.2. This library is based on and modified from [Arduino WiFiNINA library](http://www.arduino.cc/en/Reference/WiFiNINA) to provide support for many more boards, such as **SAM DUE, SAMD21, SAMD51, Teensy, AVR Mega, STM32, etc.**

---
---

### TO DO
1. Bug Searching and Killing
2. Support more types of boards using WiFiNINA and other WiFi shields.
Expand Down Expand Up @@ -1412,6 +1302,7 @@ Again with credits of [Miguel Alexandre Wisintainer](https://github.com/tcpipchi
17. Add support to **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
18. Add support to **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**
19. Add support to **ADAFRUIT_MATRIXPORTAL_M4_EXPRESS**
20. Add support to generic `__SAMD21E1xA__`, `__SAMD21G1xA__` and `__SAMD21J1xA__`

---

Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
## Table of Contents

* [Changelog](#changelog)
* [Releases v1.8.14-1](#releases-v1814-1)
* [Releases v1.8.13](#releases-v1813)
* [Releases v1.8.12](#releases-v1812)
* [Releases v1.8.11](#releases-v1811)
Expand All @@ -36,6 +37,15 @@

## Changelog

### Releases v1.8.14-1

1. Fix examples to support ATmega4809 such as UNO_WIFI_REV2 and NANO_EVERY
2. Add support to generic `__SAMD21E1xA__`, `__SAMD21G1xA__` and `__SAMD21J1xA__`
3. Add `headers` in `library.json` for PIO
4. Update `platform.io`
5. Remove debug leftovers. Check [Debug text comes out of the serial port when listening for UDP connections #15](https://github.com/khoih-prog/WiFiNINA_Generic/issues/15)


### Releases v1.8.13

1. Sync with [Arduino WiFiNINA Library v1.8.13](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.13).
Expand Down
16 changes: 16 additions & 0 deletions examples/AP_SimpleWebServer/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
16 changes: 16 additions & 0 deletions examples/ConnectNoEncryption/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
16 changes: 16 additions & 0 deletions examples/ConnectWithWEP/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
16 changes: 16 additions & 0 deletions examples/ConnectWithWPA/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
16 changes: 16 additions & 0 deletions examples/ConnectWithWPA2Enterprise/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
16 changes: 16 additions & 0 deletions examples/MultiServers/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
16 changes: 16 additions & 0 deletions examples/ScanNetworks/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,22 @@

#endif

#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
#if !defined(BOARD_NAME)
#if (ARDUINO_AVR_UNO_WIFI_REV2)
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
#elif (ARDUINO_AVR_NANO_EVERY)
#define BOARD_NAME "megaAVR Nano Every"
#else
#define BOARD_NAME "megaAVR Unknown"
#endif
#endif
#endif

#ifndef BOARD_TYPE
#define BOARD_TYPE "Unknown board"
#endif

#ifndef BOARD_NAME
#define BOARD_NAME BOARD_TYPE
#endif
Expand Down
Loading

0 comments on commit 2530160

Please sign in to comment.