Skip to content

Commit e3e6ff3

Browse files
committed
[SD] Complete adapters/ work and build
1 parent c673180 commit e3e6ff3

11 files changed

+80
-79
lines changed

src/adapters/network_interfaces/ws_nonet_pico.h renamed to src/adapters/offline/ws_offline_pico.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @file ws_nonet_pico.h
2+
* @file ws_offline_pico.h
33
*
44
* This is a driver for using the Raspberry Pi Pico/Pico2
55
* without a network interface with Adafruit IO Wippersnapper.
@@ -14,8 +14,8 @@
1414
*
1515
*/
1616

17-
#ifndef WS_NONET_PICO_H
18-
#define WS_NONET_PICO_H
17+
#ifndef WS_OFFLINE_PICO_H
18+
#define WS_OFFLINE_PICO_H
1919

2020
#if defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_RASPBERRY_PI_PICO_2)
2121

@@ -32,15 +32,15 @@ extern Wippersnapper WS;
3232
@brief Class for using the Raspberry Pi Pico network interface.
3333
*/
3434
/****************************************************************************/
35-
class ws_nonet_pico : public Wippersnapper {
35+
class ws_offline_pico : public Wippersnapper {
3636

3737
public:
3838
/**************************************************************************/
3939
/*!
4040
@brief Initializes the WipperSnapper class for RPi Pico.
4141
*/
4242
/**************************************************************************/
43-
ws_nonet_pico() : Wippersnapper() {
43+
ws_offline_pico() : Wippersnapper() {
4444
_ssid = 0;
4545
_pass = 0;
4646
}
@@ -50,7 +50,7 @@ class ws_nonet_pico : public Wippersnapper {
5050
@brief Destructor
5151
*/
5252
/**************************************************************************/
53-
~ws_nonet_pico() {
53+
~ws_offline_pico() {
5454
// Do nothing
5555
}
5656

src/adapters/network_interfaces/ws_nonet_pico_v2.h renamed to src/adapters/offline/ws_offline_pico_v2.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @file ws_nonet_pico_v2.h
2+
* @file ws_offline_pico_v2.h
33
*
44
* This is a driver for using the Raspberry Pi Pi Pico/Pico2
55
* without a network interface with Adafruit IO Wippersnapper.
@@ -14,8 +14,8 @@
1414
*
1515
*/
1616

17-
#ifndef WS_NONET_PICO_V2_H
18-
#define WS_NONET_PICO_V2_H
17+
#ifndef WS_OFFLINE_PICO_V2_H
18+
#define WS_OFFLINE_PICO_V2_H
1919

2020
#if defined(ARDUINO_RASPBERRY_PI_PICO) || defined(ARDUINO_RASPBERRY_PI_PICO_2)
2121

@@ -32,15 +32,16 @@ extern Wippersnapper_V2 WsV2;
3232
@brief Class for using the Raspberry Pi Pico network interface.
3333
*/
3434
/****************************************************************************/
35-
class ws_nonet_pico_v2 : public Wippersnapper_V2 {
35+
class ws_offline_pico_v2 : public Wippersnapper_V2 {
3636

3737
public:
3838
/**************************************************************************/
3939
/*!
4040
@brief Initializes the WipperSnapper class for RPi Pico.
4141
*/
4242
/**************************************************************************/
43-
ws_nonet_pico_v2() : Wippersnapper_V2() {
43+
ws_offline_pico_v2() : Wippersnapper_V2() {
44+
4445
// No-op
4546
}
4647

@@ -49,7 +50,7 @@ class ws_nonet_pico_v2 : public Wippersnapper_V2 {
4950
@brief Destructor
5051
*/
5152
/**************************************************************************/
52-
~ws_nonet_pico_v2() {
53+
~ws_offline_pico_v2() {
5354
// No-op
5455
}
5556

src/adapters/network_interfaces/Wippersnapper_AIRLIFT.h renamed to src/adapters/wifi/ws_wifi_airlift.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @file Wippersnapper_AIRLIFT.h
2+
* @file ws_wifi_airlift.h
33
*
44
* This is a driver for using the Adafruit AirLift
55
* ESP32 Co-Processor's network interface with Wippersnapper.
@@ -17,8 +17,8 @@
1717
*
1818
*/
1919

20-
#ifndef WIPPERSNAPPER_AIRLIFT_H
21-
#define WIPPERSNAPPER_AIRLIFT_H
20+
#ifndef WS_WIFI_AIRLIFT_H
21+
#define WS_WIFI_AIRLIFT_H
2222

2323
#include "Adafruit_MQTT.h"
2424
#include "Adafruit_MQTT_Client.h"
@@ -40,15 +40,15 @@ extern Wippersnapper WS;
4040
@brief Class for using the AirLift Co-Processor network iface.
4141
*/
4242
/****************************************************************************/
43-
class Wippersnapper_AIRLIFT : public Wippersnapper {
43+
class ws_wifi_airlift : public Wippersnapper {
4444

4545
public:
4646
/**************************************************************************/
4747
/*!
4848
@brief Initializes the Adafruit IO class for AirLift devices.
4949
*/
5050
/**************************************************************************/
51-
Wippersnapper_AIRLIFT() : Wippersnapper() {
51+
ws_wifi_airlift() : Wippersnapper() {
5252
_ssPin = SPIWIFI_SS; // 10;
5353
_ackPin = SPIWIFI_ACK; // 7;
5454
_rstPin = SPIWIFI_RESET; // 5; // should be 7 on PyPortals
@@ -71,7 +71,7 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
7171
@brief Destructor for the Adafruit IO AirLift class.
7272
*/
7373
/**************************************************************************/
74-
~Wippersnapper_AIRLIFT() {
74+
~ws_wifi_airlift() {
7575
if (_mqtt)
7676
delete _mqtt;
7777
}
@@ -394,4 +394,4 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
394394
}
395395
};
396396

397-
#endif // WIPPERSNAPPER_AIRLIFT_H
397+
#endif // WS_WIFI_AIRLIFT_H

src/adapters/network_interfaces/Wippersnapper_ESP32.h renamed to src/adapters/wifi/ws_wifi_esp32.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @file Wippersnapper_ESP32.h
2+
* @file ws_wifi_esp32.h
33
*
44
* This is a driver for using the ESP32's network interface
55
* with Adafruit IO Wippersnapper.
@@ -14,8 +14,8 @@
1414
*
1515
*/
1616

17-
#ifndef Wippersnapper_ESP32_H
18-
#define Wippersnapper_ESP32_H
17+
#ifndef WS_WIFI_ESP32_H
18+
#define WS_WIFI_ESP32_H
1919

2020
#ifdef ARDUINO_ARCH_ESP32
2121
#include "Wippersnapper.h"
@@ -34,15 +34,15 @@ extern Wippersnapper WS;
3434
@brief Class for using the ESP32 network interface.
3535
*/
3636
/****************************************************************************/
37-
class Wippersnapper_ESP32 : public Wippersnapper {
37+
class ws_wifi_esp32 : public Wippersnapper {
3838

3939
public:
4040
/**************************************************************************/
4141
/*!
4242
@brief Initializes the Adafruit IO class for ESP32 devices.
4343
*/
4444
/**************************************************************************/
45-
Wippersnapper_ESP32() : Wippersnapper() {
45+
ws_wifi_esp32() : Wippersnapper() {
4646
_ssid = 0;
4747
_pass = 0;
4848
}
@@ -52,7 +52,7 @@ class Wippersnapper_ESP32 : public Wippersnapper {
5252
@brief Overload for ESP32 devices without filesystem-backed provisioning.
5353
*/
5454
/**************************************************************************/
55-
Wippersnapper_ESP32(const char *aioUsername, const char *aioKey,
55+
ws_wifi_esp32(const char *aioUsername, const char *aioKey,
5656
const char *netSSID, const char *netPass,
5757
const char *brokerURL, uint16_t brokerPort)
5858
: Wippersnapper() {
@@ -73,7 +73,7 @@ class Wippersnapper_ESP32 : public Wippersnapper {
7373
@brief Destructor for the Adafruit IO AirLift class.
7474
*/
7575
/**************************************************************************/
76-
~Wippersnapper_ESP32() {
76+
~ws_wifi_esp32() {
7777
if (_mqtt_client_secure)
7878
delete _mqtt_client_secure;
7979
if (_mqtt_client_insecure)
@@ -365,4 +365,4 @@ class Wippersnapper_ESP32 : public Wippersnapper {
365365
};
366366

367367
#endif // ARDUINO_ARCH_ESP32_H
368-
#endif // Wippersnapper_ESP32_H
368+
#endif // WS_WIFI_ESP32_H

src/adapters/network_interfaces/Wippersnapper_ESP32_V2.h renamed to src/adapters/wifi/ws_wifi_esp32_v2.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
*
1515
*/
1616

17-
#ifndef Wippersnapper_ESP32_V2_H
18-
#define Wippersnapper_ESP32_V2_H
17+
#ifndef WS_WIFI_ESP32_V2_H
18+
#define WS_WIFI_ESP32_V2_H
1919

2020
#ifdef ARDUINO_ARCH_ESP32
2121
#include "Wippersnapper_V2.h"
@@ -34,15 +34,15 @@ extern Wippersnapper_V2 WsV2;
3434
@brief Class for using the ESP32 network interface.
3535
*/
3636
/****************************************************************************/
37-
class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
37+
class ws_wifi_esp32_v2 : public Wippersnapper_V2 {
3838

3939
public:
4040
/**************************************************************************/
4141
/*!
4242
@brief Initializes the Adafruit IO class for ESP32 devices.
4343
*/
4444
/**************************************************************************/
45-
Wippersnapper_ESP32V2() : Wippersnapper_V2() {
45+
ws_wifi_esp32_v2() : Wippersnapper_V2() {
4646
_ssid = 0;
4747
_pass = 0;
4848
}
@@ -52,7 +52,7 @@ class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
5252
@brief Overload for ESP32 devices without filesystem-backed provisioning.
5353
*/
5454
/**************************************************************************/
55-
Wippersnapper_ESP32V2(const char *aioUsername, const char *aioKey,
55+
ws_wifi_esp32_v2(const char *aioUsername, const char *aioKey,
5656
const char *netSSID, const char *netPass,
5757
const char *brokerURL, uint16_t brokerPort)
5858
: Wippersnapper_V2() {
@@ -73,7 +73,7 @@ class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
7373
@brief Destructor for the Adafruit IO AirLift class.
7474
*/
7575
/**************************************************************************/
76-
~Wippersnapper_ESP32V2() {
76+
~ws_wifi_esp32_v2() {
7777
if (_mqtt_client_secure)
7878
delete _mqtt_client_secure;
7979
if (_mqtt_client_insecure)
@@ -365,4 +365,4 @@ class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
365365
};
366366

367367
#endif // ARDUINO_ARCH_ESP32_H
368-
#endif // Wippersnapper_ESP32_V2_H
368+
#endif // WS_WIFI_ESP32_V2_H

src/adapters/network_interfaces/Wippersnapper_ESP8266.h renamed to src/adapters/wifi/ws_wifi_esp8266.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @file Wippersnapper_ESP8266.h
2+
* @file ws_wifi_esp8266.h
33
*
44
* This is a driver for using the ESP8266's network interface
55
* with Wippersnapper.
@@ -14,8 +14,8 @@
1414
*
1515
*/
1616

17-
#ifndef WIPPERSNAPPER_ESP8266_H
18-
#define WIPPERSNAPPER_ESP8266_H
17+
#ifndef WS_WIFI_ESP8266_H
18+
#define WS_WIFI_ESP8266_H
1919

2020
#ifdef ARDUINO_ARCH_ESP8266
2121
#include "Adafruit_MQTT.h"
@@ -45,7 +45,7 @@ extern Wippersnapper WS;
4545
interface.
4646
*/
4747
/******************************************************************************/
48-
class Wippersnapper_ESP8266 : public Wippersnapper {
48+
class ws_wifi_esp8266 : public Wippersnapper {
4949

5050
public:
5151
/**************************************************************************/
@@ -61,7 +61,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
6161
Wireless Network password
6262
*/
6363
/**************************************************************************/
64-
Wippersnapper_ESP8266() : Wippersnapper() {
64+
ws_wifi_esp8266() : Wippersnapper() {
6565
_ssid = 0;
6666
_pass = 0;
6767
_wifi_client = new WiFiClient;
@@ -74,7 +74,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
7474
@brief Destructor for the ESP8266's network iface.
7575
*/
7676
/**************************************************************************/
77-
~Wippersnapper_ESP8266() {
77+
~ws_wifi_esp8266() {
7878
if (_wifi_client)
7979
delete _wifi_client;
8080
if (_mqtt)
@@ -322,4 +322,4 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
322322
};
323323

324324
#endif // ARDUINO_ARCH_ESP8266
325-
#endif // WIPPERSNAPPER_ESP8266_H
325+
#endif // WS_WIFI_ESP8266_H

src/adapters/network_interfaces/Wippersnapper_WIFININA.h renamed to src/adapters/wifi/ws_wifi_ninafw.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* @file Wippersnapper_WIFININA.h
2+
* @file ws_wifi_ninafw.h
33
*
44
* Network interface for the ublox wifi module on the
55
* Arduino MKR WiFi 1010, Arduino Nano 33 IoT and Arduino UNO WiFi Rev.2.
@@ -14,8 +14,8 @@
1414
*
1515
*/
1616

17-
#ifndef WIPPERSNAPPER_WIFININA_H
18-
#define WIPPERSNAPPER_WIFININA_H
17+
#ifndef WS_WIFI_NINAFW_H
18+
#define WS_WIFI_NINAFW_H
1919
#include <Adafruit_MQTT.h>
2020
#include <Adafruit_MQTT_Client.h>
2121
#include <Arduino.h>
@@ -33,7 +33,7 @@ extern Wippersnapper WS;
3333
@brief Class for using the AirLift Co-Processor network iface.
3434
*/
3535
/****************************************************************************/
36-
class Wippersnapper_WIFININA : public Wippersnapper {
36+
class ws_wifi_ninafw : public Wippersnapper {
3737

3838
public:
3939
/**************************************************************************/
@@ -49,7 +49,7 @@ class Wippersnapper_WIFININA : public Wippersnapper {
4949
Wireless Network password
5050
*/
5151
/**************************************************************************/
52-
Wippersnapper_WIFININA(const char *aioUsername, const char *aioKey,
52+
ws_wifi_ninafw(const char *aioUsername, const char *aioKey,
5353
const char *netSSID, const char *netPass)
5454
: Wippersnapper() {
5555
_ssid = netSSID;
@@ -66,7 +66,7 @@ class Wippersnapper_WIFININA : public Wippersnapper {
6666
@brief Destructor for the Adafruit IO ublox class.
6767
*/
6868
/**************************************************************************/
69-
~Wippersnapper_WIFININA() {
69+
~ws_wifi_ninafw() {
7070
if (_mqtt)
7171
delete _mqtt;
7272
}
@@ -283,4 +283,4 @@ class Wippersnapper_WIFININA : public Wippersnapper {
283283
}
284284
};
285285

286-
#endif // WIPPERSNAPPER_WIFININA_H
286+
#endif // WS_WIFI_NINAFW_H

0 commit comments

Comments
 (0)