Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-clang-doxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arduino-platform: ["picow_rp2040_tinyusb", "picow_rp2350_tinyusb"]
arduino-platform: ["picow_rp2040_tinyusb", "picow_rp2350_tinyusb", "fruit_jam_tinyusb"]
steps:
- name: "skip if unwanted"
continue-on-error: true
Expand Down
3 changes: 3 additions & 0 deletions examples/Wippersnapper_demo/.fruit_jam_tinyusb.generate
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@



3 changes: 3 additions & 0 deletions examples/wippersnapper_debug/.fruit_jam_tinyusb.test.skip
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@



47 changes: 28 additions & 19 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ lib_deps =
adafruit/Adafruit SSD1306
https://github.com/tyeth/omron-devhub_d6t-arduino.git
https://github.com/pstolarz/OneWireNg.git
https://github.com/milesburton/Arduino-Temperature-Control-Library.git
; COMMENT OUT FOR RP2040/RP2350 BOARDS
; https://github.com/milesburton/Arduino-Temperature-Control-Library.git
; AND UNCOMMENT FOR RP2040/RP2350 BOARDS
https://github.com/pstolarz/Arduino-Temperature-Control-Library.git
https://github.com/Sensirion/arduino-sht.git
https://github.com/Sensirion/arduino-i2c-scd4x.git
https://github.com/Sensirion/arduino-i2c-sen5x.git
Expand Down Expand Up @@ -126,19 +129,14 @@ lib_compat_mode = strict
lib_archive = no ; debug timer issues see https://community.platformio.org/t/choose-usb-stack-as-tiny-usb/22451/5
lib_ignore = OneWire, USBHost

[common:rp2040]
; Common build environment for Arduino-Pico platforms
[common:arduinopico]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
; platform_packages =
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
; framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git#master
board = rpipicow
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
build_flags = -DUSE_TINYUSB
; Once https://github.com/platformio/platformio-core > 6.1.11 these can be removed
lib_ignore = WiFiNINA, WiFi101, Adafruit Zero DMA Library, OneWire
lib_compat_mode = soft ; can be strict once pio detects SleepyDog on RP2040
lib_compat_mode = soft ; can be stricter once pio detects SleepyDog on RP2040


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Individual Board Definitions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -546,16 +544,20 @@ board_build.partitions = min_spiffs.csv


[env:raspberypi_picow]
extends = common:rp2040
extends = common:arduinopico
board = rpipicow
build_flags =
-DUSE_TINYUSB

[env:raspberypi_picow_debug_port_only]
extends = common:rp2040
extends = common:arduinopico
board = rpipicow
build_flags =
-DUSE_TINYUSB
-DDEBUG_RP2040_PORT=Serial

[env:raspberypi_picow_debug]
extends = common:rp2040
extends = common:arduinopico
; platform = https://github.com/maxgerhardt/platform-raspberrypi.git
; platform_packages =
; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
Expand Down Expand Up @@ -597,7 +599,7 @@ build_flags =


[env:raspberypi_pico2w]
extends = common:rp2040
extends = common:arduinopico
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
platform_packages =
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
Expand All @@ -610,11 +612,7 @@ build_flags =
; -DPICO_CYW43_SUPPORTED=1

[env:raspberypi_pico2w_debug]
extends = common:rp2040
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
platform_packages =
framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
; ; framework-arduinopico @ symlink:///Users/tyeth/Projects/arduino-pico
extends = common:arduinopico
board = rpipico2w
build_type = debug
framework = arduino
Expand Down Expand Up @@ -654,3 +652,14 @@ build_flags =
; ; No USB stack
; build_flags = -DPIO_FRAMEWORK_ARDUINO_NO_USB
; -DPIO_FRAMEWORK_ARDUINO_ENABLE_IPV6

[env:adafruit_fruitjam]
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#develop
platform_packages = framework-arduinopico@https://github.com/earlephilhower/arduino-pico.git
board = adafruit_fruitjam
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
lib_ignore = WiFi, WiFi101, Adafruit Zero DMA Library
lib_compat_mode = soft
build_flags = -DUSE_TINYUSB -DADAFRUIT_FRUITJAM_RP2350
20 changes: 14 additions & 6 deletions src/Wippersnapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/Wippersnapper_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@
#define USE_TINYUSB
#define USE_STATUS_LED
#define STATUS_LED_PIN LED_BUILTIN
#elif defined(ARDUINO_ADAFRUIT_FRUITJAM_RP2350)
#define BOARD_ID "fruitjam"
#define USE_TINYUSB
#define USE_STATUS_NEOPIXEL
#define STATUS_NEOPIXEL_PIN PIN_NEOPIXEL
#define STATUS_NEOPIXEL_NUM 5
#else
#warning "Board type not identified within Wippersnapper_Boards.h!"
#endif
Expand Down
3 changes: 2 additions & 1 deletion src/Wippersnapper_Networking.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
16 changes: 11 additions & 5 deletions src/network_interfaces/Wippersnapper_AIRLIFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* please support Adafruit and open-source hardware by purchasing
* products from Adafruit!
*
* Copyright (c) Brent Rubell 2020-2021 for Adafruit Industries.
* Copyright (c) Brent Rubell 2020-2025 for Adafruit Industries.
*
* MIT license, all text here must be included in any redistribution.
*
Expand All @@ -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;
/****************************************************************************/
Expand All @@ -49,9 +51,13 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
*/
/**************************************************************************/
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
Expand Down Expand Up @@ -236,7 +242,7 @@ class Wippersnapper_AIRLIFT : public Wippersnapper {
*/
/********************************************************/
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));
}
Expand Down
4 changes: 3 additions & 1 deletion src/provisioning/tinyusb/Wippersnapper_FS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S3_REVTFT) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2_REVTFT) || \
defined(ARDUINO_ADAFRUIT_QTPY_ESP32S3_N4R2) || \
defined(ARDUINO_XIAO_ESP32S3)
defined(ARDUINO_XIAO_ESP32S3) || \
defined(ADAFRUIT_FRUITJAM_RP2350)

#include "Wippersnapper_FS.h"
#include "print_dependencies.h"
// On-board external flash (QSPI or SPI) macros should already
Expand Down
Loading