Working on FruitJam

This commit is contained in:
brentru 2025-08-13 12:49:29 -04:00
parent 0b6964b131
commit 74e2f53aa7
4 changed files with 26 additions and 12 deletions

View file

@ -47,16 +47,24 @@
// Define actual debug output functions when necessary.
#ifdef WS_DEBUG
#define WS_DEBUG_PRINT(...) \
{ WS_PRINTER.print(__VA_ARGS__); } ///< Prints debug output.
{ \
WS_PRINTER.print(__VA_ARGS__); \
} ///< Prints debug output.
#define WS_DEBUG_PRINTLN(...) \
{ WS_PRINTER.println(__VA_ARGS__); } ///< Prints line from debug output.
{ \
WS_PRINTER.println(__VA_ARGS__); \
} ///< Prints line from debug output.
#define WS_DEBUG_PRINTHEX(...) \
{ WS_PRINTER.print(__VA_ARGS__, HEX); } ///< Prints debug output.
{ \
WS_PRINTER.print(__VA_ARGS__, HEX); \
} ///< Prints debug output.
#else
#define WS_DEBUG_PRINT(...) \
{} ///< Prints debug output
{ \
} ///< Prints debug output
#define WS_DEBUG_PRINTLN(...) \
{} ///< Prints line from debug output.
{ \
} ///< Prints line from debug output.
#endif
#define WS_DELAY_WITH_WDT(timeout) \
@ -142,7 +150,7 @@
#endif
#define WS_VERSION \
"1.0.0-beta.110" ///< WipperSnapper app. version (semver-formatted)
"1.0.0-beta.111" ///< WipperSnapper app. version (semver-formatted)
// Reserved Adafruit IO MQTT topics
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic

View file

@ -229,7 +229,6 @@
#define USE_STATUS_NEOPIXEL
#define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
#define STATUS_NEOPIXEL_NUM 5
#define USE_PSRAM
#else
#warning "Board type not identified within Wippersnapper_Boards.h!"
#endif

View file

@ -23,7 +23,8 @@
#if defined(ADAFRUIT_METRO_M4_EXPRESS) || \
defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL) || \
defined(ADAFRUIT_PYPORTAL_M4_TITANO) || defined(USE_AIRLIFT)
defined(ADAFRUIT_PYPORTAL_M4_TITANO) || defined(USE_AIRLIFT) || \
defined(ADAFRUIT_FRUITJAM_RP2350)
#include "network_interfaces/Wippersnapper_AIRLIFT.h"
/** Nina-FW (adafruit fork) networking class */
typedef Wippersnapper_AIRLIFT Wippersnapper_WiFi;

View file

@ -32,7 +32,9 @@
#define AIRLIFT_CONNECT_TIMEOUT_MS 20000 /*!< Connection timeout (in ms) */
#define AIRLIFT_CONNECT_RETRY_DELAY_MS 200 /*!< delay time between retries. */
#ifndef SPIWIFI
#define SPIWIFI SPI /*!< Instance of SPI interface used by an AirLift. */
#endif
extern Wippersnapper WS;
/****************************************************************************/
@ -49,9 +51,13 @@ public:
*/
/**************************************************************************/
Wippersnapper_AIRLIFT() : Wippersnapper() {
_ssPin = SPIWIFI_SS; // 10;
_ackPin = SPIWIFI_ACK; // 7;
_rstPin = SPIWIFI_RESET; // 5; // should be 7 on PyPortals
_ssPin = SPIWIFI_SS;
_ackPin = SPIWIFI_ACK;
#ifdef ESP32_RESETN
_rstPin = ESP32_RESETN; // FruitJam
#else
_rstPin = SPIWIFI_RESET;
#endif // ESP32_RESETN
#ifdef ESP32_GPIO0
_gpio0Pin = ESP32_GPIO0;
#else
@ -236,7 +242,7 @@ public:
*/
/********************************************************/
void getMacAddr() {
uint8_t mac[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
byte mac[6] = {0};
WiFi.macAddress(mac);
memcpy(WS._macAddr, mac, sizeof(mac));
}