Skip to content

Commit c6f3559

Browse files
authored
Merge pull request #164 from adafruit/add-support-esp32-2.0
Build WipperSnapper ESP32/ESP32-S2 with ESP32 Arduino core version 2.0.0
2 parents dd9f039 + ca9b8d5 commit c6f3559

File tree

4 files changed

+56
-53
lines changed

4 files changed

+56
-53
lines changed

.github/workflows/release.yml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
release-wippersnapper:
1313
name: Release WipperSnapper
1414
runs-on: ubuntu-latest
15-
needs: [build-samd, build-esp32, build-esp32s2]
15+
#needs: [build-samd, build-esp32, build-esp32s2]
16+
needs: [build-samd, build-esp32]
1617
steps:
1718
- name: Download build artifacts from build-platform steps
1819
uses: actions/download-artifact@v2
@@ -28,46 +29,46 @@ jobs:
2829
wippersnapper.*.uf2
2930
wippersnapper.*.bin
3031
31-
build-esp32s2:
32-
name: Build WipperSnapper ESP32-S2
33-
runs-on: ubuntu-latest
34-
strategy:
35-
fail-fast: false
36-
matrix:
37-
arduino-platform: ["funhouse_tinyusb", "magtag_tinyusb",
38-
"metro_s2_tinyusb"]
39-
steps:
40-
- uses: actions/setup-python@v1
41-
with:
42-
python-version: '3.x'
43-
- uses: actions/checkout@v2
44-
- name: Get WipperSnapper version
45-
run: |
46-
git fetch --prune --unshallow --tags
47-
git describe --dirty --tags
48-
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
49-
- uses: actions/checkout@v2
50-
with:
51-
repository: brentru/ci-arduino
52-
path: ci
53-
- name: Install CI-Arduino
54-
run: bash ci/actions_install.sh
55-
- name: Install extra Arduino libraries
56-
run: |
57-
git clone --quiet https://github.com/brentru/Adafruit_MQTT_Library.git /home/runner/Arduino/libraries/Adafruit_MQTT_Library
58-
- name: Build for ESP32-S2
59-
run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
60-
- name: Rename build artifacts to reflect the platform name
61-
run: |
62-
mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
63-
mv examples/*/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
64-
- name: upload build artifacts
65-
uses: actions/upload-artifact@v2
66-
with:
67-
name: build-files
68-
path: |
69-
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
70-
wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
32+
# build-esp32s2:
33+
# name: Build WipperSnapper ESP32-S2
34+
# runs-on: ubuntu-latest
35+
# strategy:
36+
# fail-fast: false
37+
# matrix:
38+
# arduino-platform: ["funhouse_tinyusb", "magtag_tinyusb",
39+
# "metro_s2_tinyusb"]
40+
# steps:
41+
# - uses: actions/setup-python@v1
42+
# with:
43+
# python-version: '3.x'
44+
# - uses: actions/checkout@v2
45+
# - name: Get WipperSnapper version
46+
# run: |
47+
# git fetch --prune --unshallow --tags
48+
# git describe --dirty --tags
49+
# echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
50+
# - uses: actions/checkout@v2
51+
# with:
52+
# repository: brentru/ci-arduino
53+
# path: ci
54+
# - name: Install CI-Arduino
55+
# run: bash ci/actions_install.sh
56+
# - name: Install extra Arduino libraries
57+
# run: |
58+
# git clone --quiet https://github.com/brentru/Adafruit_MQTT_Library.git /home/runner/Arduino/libraries/Adafruit_MQTT_Library
59+
# - name: Build for ESP32-S2
60+
# run: python3 ci/build_platform.py ${{ matrix.arduino-platform }}
61+
# - name: Rename build artifacts to reflect the platform name
62+
# run: |
63+
# mv examples/*/build/*/Wippersnapper_demo.ino.uf2 wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
64+
# mv examples/*/build/*/Wippersnapper_demo.ino.bin wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
65+
# - name: upload build artifacts
66+
# uses: actions/upload-artifact@v2
67+
# with:
68+
# name: build-files
69+
# path: |
70+
# wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.uf2
71+
# wippersnapper.${{ matrix.arduino-platform }}.${{ env.WS_VERSION }}.bin
7172

7273

7374
build-esp32:
@@ -89,7 +90,7 @@ jobs:
8990
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
9091
- uses: actions/checkout@v2
9192
with:
92-
repository: adafruit/ci-arduino
93+
repository: brentru/ci-arduino
9394
path: ci
9495
- name: Install CI-Arduino
9596
run: bash ci/actions_install.sh
@@ -127,7 +128,7 @@ jobs:
127128
echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags)
128129
- uses: actions/checkout@v2
129130
with:
130-
repository: adafruit/ci-arduino
131+
repository: brentru/ci-arduino
131132
path: ci
132133
- name: Install CI-Arduino
133134
run: bash ci/actions_install.sh

library.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name=Adafruit WipperSnapper
2-
version=1.0.0-beta.11
1+
name=Adafruit WipperSnapper Beta
2+
version=1.0.0-beta.12
33
author=Adafruit
44
maintainer=Adafruit <[email protected]>
5-
sentence=Arduino library to access WipperSnapper
6-
paragraph=Arduino library to access WipperSnapper
5+
sentence=Arduino library for Adafruit.io WipperSnapper
6+
paragraph=Arduino library for Adafruit.io WipperSnapper
77
category=Communication
88
url=https://github.com/adafruit/Adafruit_IO_Arduino
99
architectures=*
10-
depends=Adafruit NeoPixel, Adafruit TinyUSB Library, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit SleepyDog Library
10+
depends=Adafruit NeoPixel, Adafruit SPIFlash, ArduinoJson, Adafruit DotStar, Adafruit SleepyDog Library, Adafruit TinyUSB Library

src/Wippersnapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
#endif
6161

6262
#define WS_VERSION \
63-
"1.0.0-beta.11" ///< WipperSnapper app. version (semver-formatted)
63+
"1.0.0-beta.12" ///< WipperSnapper app. version (semver-formatted)
6464

6565
// Reserved Adafruit IO MQTT topics
6666
#define TOPIC_IO_THROTTLE "/throttle" ///< Adafruit IO Throttle MQTT Topic

src/provisioning/tinyusb/Wippersnapper_FS.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212
* BSD license, all text here must be included in any redistribution.
1313
*
1414
*/
15-
#if defined(USE_TINYUSB)
15+
#if defined(ARDUINO_MAGTAG29_ESP32S2) || defined(ARDUINO_METRO_ESP32S2) || defined(ARDUINO_FUNHOUSE_ESP32S2) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL)
1616
#include "Wippersnapper_FS.h"
17-
1817
// On-board external flash (QSPI or SPI) macros should already
1918
// defined in your board variant if supported
2019
// - EXTERNAL_FLASH_USE_QSPI
@@ -71,7 +70,7 @@ bool setVolumeLabel() {
7170
/**************************************************************************/
7271
Wippersnapper_FS::Wippersnapper_FS() {
7372
// Detach USB device during init.
74-
USBDevice.detach();
73+
TinyUSBDevice.detach();
7574
// Wait for detach
7675
delay(500);
7776

@@ -186,12 +185,15 @@ void Wippersnapper_FS::initUSBMSC() {
186185

187186
// Set disk size, block size should be 512 regardless of spi flash page size
188187
usb_msc.setCapacity(flash.pageSize() * flash.numPages() / 512, 512);
188+
189189
// MSC is ready for read/write
190190
usb_msc.setUnitReady(true);
191+
191192
// init MSC
192193
usb_msc.begin();
194+
193195
// re-attach the usb device
194-
USBDevice.attach();
196+
TinyUSBDevice.attach();
195197
// wait for enumeration
196198
delay(500);
197199
}

0 commit comments

Comments
 (0)