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

Commit 2530160

Browse files
authored
v1.8.14-1 to support ATmega4809
### 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)
1 parent 266480a commit 2530160

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+540
-158
lines changed

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1414

1515
Please ensure to specify the following:
1616

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

2929
```
30-
Arduino IDE version: 1.8.15
31-
Arduino-mbed RP2040 v2.3.1
30+
Arduino IDE version: 1.8.16
31+
Arduino-mbed RP2040 v2.6.1
3232
NANO_RP2040_CONNECT Module
3333
OS: Ubuntu 20.04 LTS
34-
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
34+
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
3535
3636
Context:
3737
I encountered an endless loop while trying to connect to Local WiFi.

README.md

Lines changed: 7 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ This [**WiFiNINA_Generic library**](https://github.com/khoih-prog/WiFiNINA_Gener
133133
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)
134134
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
135135
4. [`Arduino SAM DUE core 1.6.12+`](https://github.com/arduino/ArduinoCore-sam) for SAM DUE ARM Cortex-M3 boards
136-
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)
136+
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)
137137
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)
138138
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/)
139139
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)
140140
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)
141-
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)
142-
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)
141+
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)
142+
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)
143143
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/)
144144
13. [`Adafruit AVR core 1.4.14+`](https://github.com/adafruit/Adafruit_Arduino_Boards) for Adafruit AVR boards. Use Arduino Board Manager to install.
145145
14. [`Sparkfun AVR core 1.1.13+`](https://github.com/sparkfun/Arduino_Boards) for Sparkfun AVR boards. Use Arduino Board Manager to install.
@@ -524,7 +524,7 @@ For example
524524
525525
```
526526
Start WiFiNINA CheckFirmwareVersion on SAMD_NANO_33_IOT
527-
WiFiNINA_Generic v1.8.13
527+
WiFiNINA_Generic v1.8.14-1
528528
Firmware version installed: aaa.bbb.ccc
529529
Latest firmware version available : aaa.bbb.ccc
530530

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

11061106
```
11071107
Starting AdvancedServer on SAMD_NANO_33_IOT
1108-
WiFiNINA_Generic v1.8.13
1108+
WiFiNINA_Generic v1.8.14-1
11091109
[NN] ===============================
11101110
[NN]
11111111
Used/default SPI pinout:
@@ -1275,116 +1275,6 @@ Sometimes, the library will only work if you update the `WiFiNINA module/shield`
12751275
---
12761276
---
12771277

1278-
## Releases
1279-
1280-
### Releases v1.8.13
1281-
1282-
1. Sync with [Arduino WiFiNINA Library v1.8.13](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.13).
1283-
- Update latest available nina-fw to v1.4.8
1284-
1285-
2. Add support to SAMD51 ADAFRUIT_MATRIXPORTAL_M4_EXPRESS
1286-
1287-
### Releases v1.8.12
1288-
1289-
1. Sync with [Arduino WiFiNINA Library v1.8.12](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.12).
1290-
- Update latest available nina-fw to v1.4.7
1291-
1292-
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)
1293-
1294-
### Releases v1.8.11
1295-
1296-
1. Sync with [Arduino WiFiNINA Library v1.8.11](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.11).
1297-
- RP2040 - adapt NinaPins to be used as class
1298-
- Provide clean API for passing watchdog function
1299-
- Update latest available nina-fw to v1.4.6
1300-
1301-
2. Permit nina-fw version overridden to use whenever WiFi101-FirmwareUpdater-Plugin is not sync'ed with nina-fw version
1302-
1303-
### Releases v1.8.10-1
1304-
1305-
1. Fix PinStatus-related compile error for some platforms
1306-
1307-
### Releases v1.8.10
1308-
1309-
1. Sync with [Arduino WiFiNINA Library v1.8.10](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.10).
1310-
- Add support to **Arduino Nano RP2040 Connect** using [**Arduino mbed OS for Nano boards**](https://github.com/arduino/ArduinoCore-mbed).
1311-
- Update latest available nina-fw to v1.4.5
1312-
- Bug fixes.
1313-
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).
1314-
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).
1315-
4. Update `Packages' Patches`
1316-
1317-
### Releases v1.8.5
1318-
1319-
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.
1320-
2. Update `Packages' Patches`
1321-
1322-
### Releases v1.8.2
1323-
1324-
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)
1325-
2. Add possibility to resend data if lwip_send fails.
1326-
1327-
### Releases v1.8.0
1328-
1329-
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)
1330-
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.
1331-
3. Introduce **WiFiBearSSLClient (offloaded to Nina)**
1332-
1333-
### Releases v1.7.2
1334-
1335-
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.
1336-
2. Add WIFININA_GENERIC_VERSION
1337-
1338-
#### Releases v1.7.1
1339-
1340-
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)
1341-
1342-
#### Releases v1.7.0
1343-
1344-
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)
1345-
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)
1346-
1347-
#### Releases v1.6.2
1348-
1349-
1. Fix WiFiStorage bug introduced from v1.6.0 resulting compile error.
1350-
2. Add example for WiFiStorage.
1351-
1352-
#### Releases v1.6.1
1353-
1354-
1. Add support to all **STM32F/L/H/G/WB/MP1**
1355-
2. Add support to **Seeeduino SAMD21/SAMD51 boards **
1356-
3. Fix bug introduced to v1.6.0 resulting nRF52 compile error.
1357-
1358-
#### Releases v1.6.0
1359-
1360-
1. Sync'ed with latest WiFiNINA Library v1.6.0.
1361-
2. New features include **WiFiStorage** and update to **NINA Firmware v1.4.0** from v1.3.0
1362-
1363-
1364-
#### Releases v1.5.3
1365-
1366-
1. Add function to support new WebSockets2_Generic Library
1367-
2. Update default pin-outs for nRF52 boards, especially NINA_112_ublox.
1368-
1369-
#### Releases v1.5.2
1370-
1371-
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.**
1372-
2. Update default pin-outs for nRF52 boards, especially NINA_B302_ublox.
1373-
1374-
Again with credits of [Miguel Alexandre Wisintainer](https://github.com/tcpipchip).
1375-
1376-
#### Releases v1.5.1
1377-
1378-
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.
1379-
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)
1380-
1381-
#### Releases v1.5.0
1382-
1383-
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.**
1384-
1385-
---
1386-
---
1387-
13881278
### TO DO
13891279
1. Bug Searching and Killing
13901280
2. Support more types of boards using WiFiNINA and other WiFi shields.
@@ -1412,6 +1302,7 @@ Again with credits of [Miguel Alexandre Wisintainer](https://github.com/tcpipchi
14121302
17. Add support to **Generic or Sparkfun AVR ATmega_328(P)** such as **ARDUINO_REDBOT, ARDUINO_AVR_DIGITAL_SANDBOX, etc.**
14131303
18. Add support to **Generic or Sparkfun AVR ATmega128RFA1** such as **ATMEGA128RFA1_DEV_BOARD, etc.**
14141304
19. Add support to **ADAFRUIT_MATRIXPORTAL_M4_EXPRESS**
1305+
20. Add support to generic `__SAMD21E1xA__`, `__SAMD21G1xA__` and `__SAMD21J1xA__`
14151306

14161307
---
14171308

changelog.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
## Table of Contents
1313

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

3738
## Changelog
3839

40+
### Releases v1.8.14-1
41+
42+
1. Fix examples to support ATmega4809 such as UNO_WIFI_REV2 and NANO_EVERY
43+
2. Add support to generic `__SAMD21E1xA__`, `__SAMD21G1xA__` and `__SAMD21J1xA__`
44+
3. Add `headers` in `library.json` for PIO
45+
4. Update `platform.io`
46+
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)
47+
48+
3949
### Releases v1.8.13
4050

4151
1. Sync with [Arduino WiFiNINA Library v1.8.13](https://github.com/arduino-libraries/WiFiNINA/releases/tag/1.8.13).

examples/AP_SimpleWebServer/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

examples/ConnectNoEncryption/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

examples/ConnectWithWEP/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

examples/ConnectWithWPA/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

examples/ConnectWithWPA2Enterprise/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

examples/MultiServers/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

examples/ScanNetworks/defines.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,22 @@
370370

371371
#endif
372372

373+
#if ( defined(__AVR_ATmega4809__) || defined(ARDUINO_AVR_UNO_WIFI_REV2) || defined(ARDUINO_AVR_NANO_EVERY) )
374+
#if !defined(BOARD_NAME)
375+
#if (ARDUINO_AVR_UNO_WIFI_REV2)
376+
#define BOARD_NAME "megaAVR UNO WiFi Rev2"
377+
#elif (ARDUINO_AVR_NANO_EVERY)
378+
#define BOARD_NAME "megaAVR Nano Every"
379+
#else
380+
#define BOARD_NAME "megaAVR Unknown"
381+
#endif
382+
#endif
383+
#endif
384+
385+
#ifndef BOARD_TYPE
386+
#define BOARD_TYPE "Unknown board"
387+
#endif
388+
373389
#ifndef BOARD_NAME
374390
#define BOARD_NAME BOARD_TYPE
375391
#endif

0 commit comments

Comments
 (0)