1- /*!
2- * @file Wippersnapper_Networking.h
3- *
4- * This file includes network interfaces at compile-time.
5- *
6- * Adafruit invests time and resources providing this open source code,
7- * please support Adafruit and open-source hardware by purchasing
8- * products from Adafruit!
9- *
10- * Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.
11- *
12- * BSD license, all text here must be included in any redistribution.
13- *
14- */
15-
16- #ifndef WIPPERSNAPPER_NETWORKING_H
17- #define WIPPERSNAPPER_NETWORKING_H
18-
19- #if defined(ADAFRUIT_METRO_M4_EXPRESS ) || \
20- defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE ) || defined(ADAFRUIT_PYPORTAL ) || \
21- defined(ADAFRUIT_PYPORTAL_M4_TITANO ) || defined(USE_AIRLIFT )
22- #include "network_interfaces/Wippersnapper_AIRLIFT.h"
23- /** Nina-FW (adafruit fork) networking class */
24- typedef Wippersnapper_AIRLIFT Wippersnapper_WiFi ;
25- #elif defined(ARDUINO_ARCH_ESP8266 )
26- #include "network_interfaces/Wippersnapper_ESP8266.h"
27- /** ESP8266's networking class */
28- typedef Wippersnapper_ESP8266 Wippersnapper_WiFi ;
29- #elif defined(ARDUINO_ARCH_ESP32 )
30- #include "network_interfaces/Wippersnapper_ESP32.h"
31- /** ESP32's networking class */
32- typedef Wippersnapper_ESP32 Wippersnapper_WiFi ;
33- #elif defined(ARDUINO_ARCH_RP2040 )
34- #include "network_interfaces/ws_networking_pico.h"
35- typedef ws_networking_pico Wippersnapper_WiFi ;
36- #elif defined(ARDUINO_SAMD_NANO_33_IOT ) || defined(ARDUINO_SAMD_MKRWIFI1010 )
37- /** Nina-FW (arduino) networking class */
38- #include "network_interfaces/Wippersnapper_WIFININA.h"
39- typedef Wippersnapper_WIFININA Wippersnapper_WiFi ;
40- #else
41- #warning "Must define network interface in config.h!"
42- #endif
43-
1+ /*!
2+ * @file Wippersnapper_Networking.h
3+ *
4+ * This file includes network interfaces at compile-time.
5+ *
6+ * Adafruit invests time and resources providing this open source code,
7+ * please support Adafruit and open-source hardware by purchasing
8+ * products from Adafruit!
9+ *
10+ * Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.
11+ *
12+ * BSD license, all text here must be included in any redistribution.
13+ *
14+ */
15+
16+ #ifndef WIPPERSNAPPER_NETWORKING_H
17+ #define WIPPERSNAPPER_NETWORKING_H
18+
19+ #ifndef WL_MAC_ADDR_LENGTH
20+ #define WL_MAC_ADDR_LENGTH 6 // MAC address length - from RP2040 BSP
21+ #endif
22+ #define WS_MAX_SORTED_NETWORKS 15 ///< Maximum number of networks to sort
23+ #define WS_MAX_ALT_WIFI_NETWORKS 3 ///< Maximum number of alternative networks
24+
25+
26+ #if defined(ADAFRUIT_METRO_M4_EXPRESS ) || \
27+ defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE ) || defined(ADAFRUIT_PYPORTAL ) || \
28+ defined(ADAFRUIT_PYPORTAL_M4_TITANO ) || defined(USE_AIRLIFT )
29+ #include "network_interfaces/Wippersnapper_AIRLIFT.h"
30+ /** Nina-FW (adafruit fork) networking class */
31+ typedef Wippersnapper_AIRLIFT Wippersnapper_WiFi ;
32+ #elif defined(ARDUINO_ARCH_ESP8266 )
33+ #include "network_interfaces/Wippersnapper_ESP8266.h"
34+ /** ESP8266's networking class */
35+ typedef Wippersnapper_ESP8266 Wippersnapper_WiFi ;
36+ #elif defined(ARDUINO_ARCH_ESP32 )
37+ #include "network_interfaces/Wippersnapper_ESP32.h"
38+ /** ESP32's networking class */
39+ typedef Wippersnapper_ESP32 Wippersnapper_WiFi ;
40+ #elif defined(ARDUINO_ARCH_RP2040 )
41+ #include "network_interfaces/ws_networking_pico.h"
42+ typedef ws_networking_pico Wippersnapper_WiFi ;
43+ #elif defined(ARDUINO_SAMD_NANO_33_IOT ) || defined(ARDUINO_SAMD_MKRWIFI1010 )
44+ /** Nina-FW (arduino) networking class */
45+ #include "network_interfaces/Wippersnapper_WIFININA.h"
46+ typedef Wippersnapper_WIFININA Wippersnapper_WiFi ;
47+ #else
48+ #warning "Must define network interface in config.h!"
49+ #endif
50+
4451#endif // WIPPERSNAPPER_NETWORKING_H
0 commit comments