Skip to content

Commit

Permalink
[SD] Complete adapters/ work and build
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Dec 13, 2024
1 parent c673180 commit e3e6ff3
Show file tree
Hide file tree
Showing 11 changed files with 80 additions and 79 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @file ws_nonet_pico.h
* @file ws_offline_pico.h
*
* This is a driver for using the Raspberry Pi Pico/Pico2
* without a network interface with Adafruit IO Wippersnapper.
Expand All @@ -14,8 +14,8 @@
*
*/

#ifndef WS_NONET_PICO_H
#define WS_NONET_PICO_H
#ifndef WS_OFFLINE_PICO_H
#define WS_OFFLINE_PICO_H

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

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

public:
/**************************************************************************/
/*!
@brief Initializes the WipperSnapper class for RPi Pico.
*/
/**************************************************************************/
ws_nonet_pico() : Wippersnapper() {
ws_offline_pico() : Wippersnapper() {
_ssid = 0;
_pass = 0;
}
Expand All @@ -50,7 +50,7 @@ class ws_nonet_pico : public Wippersnapper {
@brief Destructor
*/
/**************************************************************************/
~ws_nonet_pico() {
~ws_offline_pico() {
// Do nothing
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @file ws_nonet_pico_v2.h
* @file ws_offline_pico_v2.h
*
* This is a driver for using the Raspberry Pi Pi Pico/Pico2
* without a network interface with Adafruit IO Wippersnapper.
Expand All @@ -14,8 +14,8 @@
*
*/

#ifndef WS_NONET_PICO_V2_H
#define WS_NONET_PICO_V2_H
#ifndef WS_OFFLINE_PICO_V2_H
#define WS_OFFLINE_PICO_V2_H

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

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

public:
/**************************************************************************/
/*!
@brief Initializes the WipperSnapper class for RPi Pico.
*/
/**************************************************************************/
ws_nonet_pico_v2() : Wippersnapper_V2() {
ws_offline_pico_v2() : Wippersnapper_V2() {

// No-op
}

Expand All @@ -49,7 +50,7 @@ class ws_nonet_pico_v2 : public Wippersnapper_V2 {
@brief Destructor
*/
/**************************************************************************/
~ws_nonet_pico_v2() {
~ws_offline_pico_v2() {
// No-op
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @file Wippersnapper_AIRLIFT.h
* @file ws_wifi_airlift.h
*
* This is a driver for using the Adafruit AirLift
* ESP32 Co-Processor's network interface with Wippersnapper.
Expand All @@ -17,8 +17,8 @@
*
*/

#ifndef WIPPERSNAPPER_AIRLIFT_H
#define WIPPERSNAPPER_AIRLIFT_H
#ifndef WS_WIFI_AIRLIFT_H
#define WS_WIFI_AIRLIFT_H

#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
Expand All @@ -40,15 +40,15 @@ extern Wippersnapper WS;
@brief Class for using the AirLift Co-Processor network iface.
*/
/****************************************************************************/
class Wippersnapper_AIRLIFT : public Wippersnapper {
class ws_wifi_airlift : public Wippersnapper {

public:
/**************************************************************************/
/*!
@brief Initializes the Adafruit IO class for AirLift devices.
*/
/**************************************************************************/
Wippersnapper_AIRLIFT() : Wippersnapper() {
ws_wifi_airlift() : Wippersnapper() {
_ssPin = SPIWIFI_SS; // 10;
_ackPin = SPIWIFI_ACK; // 7;
_rstPin = SPIWIFI_RESET; // 5; // should be 7 on PyPortals
Expand All @@ -71,7 +71,7 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
@brief Destructor for the Adafruit IO AirLift class.
*/
/**************************************************************************/
~Wippersnapper_AIRLIFT() {
~ws_wifi_airlift() {
if (_mqtt)
delete _mqtt;
}
Expand Down Expand Up @@ -394,4 +394,4 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
}
};

#endif // WIPPERSNAPPER_AIRLIFT_H
#endif // WS_WIFI_AIRLIFT_H
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @file Wippersnapper_ESP32.h
* @file ws_wifi_esp32.h
*
* This is a driver for using the ESP32's network interface
* with Adafruit IO Wippersnapper.
Expand All @@ -14,8 +14,8 @@
*
*/

#ifndef Wippersnapper_ESP32_H
#define Wippersnapper_ESP32_H
#ifndef WS_WIFI_ESP32_H
#define WS_WIFI_ESP32_H

#ifdef ARDUINO_ARCH_ESP32
#include "Wippersnapper.h"
Expand All @@ -34,15 +34,15 @@ extern Wippersnapper WS;
@brief Class for using the ESP32 network interface.
*/
/****************************************************************************/
class Wippersnapper_ESP32 : public Wippersnapper {
class ws_wifi_esp32 : public Wippersnapper {

public:
/**************************************************************************/
/*!
@brief Initializes the Adafruit IO class for ESP32 devices.
*/
/**************************************************************************/
Wippersnapper_ESP32() : Wippersnapper() {
ws_wifi_esp32() : Wippersnapper() {
_ssid = 0;
_pass = 0;
}
Expand All @@ -52,7 +52,7 @@ class Wippersnapper_ESP32 : public Wippersnapper {
@brief Overload for ESP32 devices without filesystem-backed provisioning.
*/
/**************************************************************************/
Wippersnapper_ESP32(const char *aioUsername, const char *aioKey,
ws_wifi_esp32(const char *aioUsername, const char *aioKey,
const char *netSSID, const char *netPass,
const char *brokerURL, uint16_t brokerPort)
: Wippersnapper() {
Expand All @@ -73,7 +73,7 @@ class Wippersnapper_ESP32 : public Wippersnapper {
@brief Destructor for the Adafruit IO AirLift class.
*/
/**************************************************************************/
~Wippersnapper_ESP32() {
~ws_wifi_esp32() {
if (_mqtt_client_secure)
delete _mqtt_client_secure;
if (_mqtt_client_insecure)
Expand Down Expand Up @@ -365,4 +365,4 @@ class Wippersnapper_ESP32 : public Wippersnapper {
};

#endif // ARDUINO_ARCH_ESP32_H
#endif // Wippersnapper_ESP32_H
#endif // WS_WIFI_ESP32_H
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
*
*/

#ifndef Wippersnapper_ESP32_V2_H
#define Wippersnapper_ESP32_V2_H
#ifndef WS_WIFI_ESP32_V2_H
#define WS_WIFI_ESP32_V2_H

#ifdef ARDUINO_ARCH_ESP32
#include "Wippersnapper_V2.h"
Expand All @@ -34,15 +34,15 @@ extern Wippersnapper_V2 WsV2;
@brief Class for using the ESP32 network interface.
*/
/****************************************************************************/
class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
class ws_wifi_esp32_v2 : public Wippersnapper_V2 {

public:
/**************************************************************************/
/*!
@brief Initializes the Adafruit IO class for ESP32 devices.
*/
/**************************************************************************/
Wippersnapper_ESP32V2() : Wippersnapper_V2() {
ws_wifi_esp32_v2() : Wippersnapper_V2() {
_ssid = 0;
_pass = 0;
}
Expand All @@ -52,7 +52,7 @@ class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
@brief Overload for ESP32 devices without filesystem-backed provisioning.
*/
/**************************************************************************/
Wippersnapper_ESP32V2(const char *aioUsername, const char *aioKey,
ws_wifi_esp32_v2(const char *aioUsername, const char *aioKey,
const char *netSSID, const char *netPass,
const char *brokerURL, uint16_t brokerPort)
: Wippersnapper_V2() {
Expand All @@ -73,7 +73,7 @@ class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
@brief Destructor for the Adafruit IO AirLift class.
*/
/**************************************************************************/
~Wippersnapper_ESP32V2() {
~ws_wifi_esp32_v2() {
if (_mqtt_client_secure)
delete _mqtt_client_secure;
if (_mqtt_client_insecure)
Expand Down Expand Up @@ -365,4 +365,4 @@ class Wippersnapper_ESP32V2 : public Wippersnapper_V2 {
};

#endif // ARDUINO_ARCH_ESP32_H
#endif // Wippersnapper_ESP32_V2_H
#endif // WS_WIFI_ESP32_V2_H
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @file Wippersnapper_ESP8266.h
* @file ws_wifi_esp8266.h
*
* This is a driver for using the ESP8266's network interface
* with Wippersnapper.
Expand All @@ -14,8 +14,8 @@
*
*/

#ifndef WIPPERSNAPPER_ESP8266_H
#define WIPPERSNAPPER_ESP8266_H
#ifndef WS_WIFI_ESP8266_H
#define WS_WIFI_ESP8266_H

#ifdef ARDUINO_ARCH_ESP8266
#include "Adafruit_MQTT.h"
Expand Down Expand Up @@ -45,7 +45,7 @@ extern Wippersnapper WS;
interface.
*/
/******************************************************************************/
class Wippersnapper_ESP8266 : public Wippersnapper {
class ws_wifi_esp8266 : public Wippersnapper {

public:
/**************************************************************************/
Expand All @@ -61,7 +61,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
Wireless Network password
*/
/**************************************************************************/
Wippersnapper_ESP8266() : Wippersnapper() {
ws_wifi_esp8266() : Wippersnapper() {
_ssid = 0;
_pass = 0;
_wifi_client = new WiFiClient;
Expand All @@ -74,7 +74,7 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
@brief Destructor for the ESP8266's network iface.
*/
/**************************************************************************/
~Wippersnapper_ESP8266() {
~ws_wifi_esp8266() {
if (_wifi_client)
delete _wifi_client;
if (_mqtt)
Expand Down Expand Up @@ -322,4 +322,4 @@ class Wippersnapper_ESP8266 : public Wippersnapper {
};

#endif // ARDUINO_ARCH_ESP8266
#endif // WIPPERSNAPPER_ESP8266_H
#endif // WS_WIFI_ESP8266_H
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* @file Wippersnapper_WIFININA.h
* @file ws_wifi_ninafw.h
*
* Network interface for the ublox wifi module on the
* Arduino MKR WiFi 1010, Arduino Nano 33 IoT and Arduino UNO WiFi Rev.2.
Expand All @@ -14,8 +14,8 @@
*
*/

#ifndef WIPPERSNAPPER_WIFININA_H
#define WIPPERSNAPPER_WIFININA_H
#ifndef WS_WIFI_NINAFW_H
#define WS_WIFI_NINAFW_H
#include <Adafruit_MQTT.h>
#include <Adafruit_MQTT_Client.h>
#include <Arduino.h>
Expand All @@ -33,7 +33,7 @@ extern Wippersnapper WS;
@brief Class for using the AirLift Co-Processor network iface.
*/
/****************************************************************************/
class Wippersnapper_WIFININA : public Wippersnapper {
class ws_wifi_ninafw : public Wippersnapper {

public:
/**************************************************************************/
Expand All @@ -49,7 +49,7 @@ class Wippersnapper_WIFININA : public Wippersnapper {
Wireless Network password
*/
/**************************************************************************/
Wippersnapper_WIFININA(const char *aioUsername, const char *aioKey,
ws_wifi_ninafw(const char *aioUsername, const char *aioKey,
const char *netSSID, const char *netPass)
: Wippersnapper() {
_ssid = netSSID;
Expand All @@ -66,7 +66,7 @@ class Wippersnapper_WIFININA : public Wippersnapper {
@brief Destructor for the Adafruit IO ublox class.
*/
/**************************************************************************/
~Wippersnapper_WIFININA() {
~ws_wifi_ninafw() {
if (_mqtt)
delete _mqtt;
}
Expand Down Expand Up @@ -283,4 +283,4 @@ class Wippersnapper_WIFININA : public Wippersnapper {
}
};

#endif // WIPPERSNAPPER_WIFININA_H
#endif // WS_WIFI_NINAFW_H
Loading

0 comments on commit e3e6ff3

Please sign in to comment.