Skip to content

Commit 192ff1a

Browse files
committed
merge in upstream esp32s3 metro patch
1 parent 01d4b72 commit 192ff1a

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ monitor_speed = 115200
1717
extra_scripts = upload_no_build.py
1818
lib_compat_mode = strict
1919
lib_deps =
20-
adafruit/Adafruit Zero DMA Library
2120
adafruit/Adafruit TinyUSB Library
21+
adafruit/Adafruit Zero DMA Library
2222
adafruit/Adafruit SPIFlash
2323
adafruit/Adafruit NeoPixel
2424
adafruit/Adafruit DotStar

src/Wippersnapper_Boards.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
#define STATUS_NEOPIXEL_PIN 46
5959
#define STATUS_NEOPIXEL_NUM 1
6060
#define USE_PSRAM ///< Board has PSRAM, use it for dynamic memory allocation
61+
#define SD_CS_PIN SS
6162
#elif defined(ARDUINO_MAGTAG29_ESP32S2)
6263
#define BOARD_ID "magtag"
6364
#define USE_TINYUSB
File renamed without changes.
File renamed without changes.

src/provisioning/sdcard/ws_sdcard.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
ws_sdcard::ws_sdcard() {
2323
mode_offline = false;
2424
_wokwi_runner = false;
25-
#ifndef SD_CS_PIN
25+
/* #ifndef SD_CS_PIN
2626
return;
27-
#endif
28-
27+
#else
2928
// Attempt to initialize the SD card
3029
if (_sd.begin(SD_CS_PIN)) {
3130
mode_offline = true;
3231
}
32+
#endif
33+
*/
34+
3335
}
3436

3537
/**************************************************************************/

src/provisioning/tinyusb/Wippersnapper_FS_V2.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*/
1515
#if defined(ARDUINO_MAGTAG29_ESP32S2) || defined(ARDUINO_METRO_ESP32S2) || \
16-
defined(ARDUINO_FUNHOUSE_ESP32S2) || \
16+
defined(ARDUINO_METRO_ESP32S3) || defined(ARDUINO_FUNHOUSE_ESP32S2) || \
1717
defined(ADAFRUIT_PYPORTAL_M4_TITANO) || \
1818
defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL) || \
1919
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) || \
@@ -129,9 +129,6 @@ Wippersnapper_FS_V2::Wippersnapper_FS_V2() {
129129
fsHalt("FATAL ERROR: Could not write filesystem contents!");
130130
}
131131

132-
// Initialize USB-MSC
133-
initUSBMSC();
134-
135132
// If we wrote a fresh secrets.json file, halt until user edits the file and
136133
// RESETs the device Signal to user that action must be taken (edit
137134
// secrets.json)
@@ -149,6 +146,8 @@ Wippersnapper_FS_V2::Wippersnapper_FS_V2() {
149146
"values\n. Using a text editor, edit it to reflect your Adafruit IO "
150147
"and WiFi credentials. Then, reset the board.");
151148
}
149+
delay(500);
150+
initUSBMSC(); // re-init USB MSC to show new file to user for editing
152151
}
153152

154153
/************************************************************/

src/provisioning/tinyusb/Wippersnapper_FS_V2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
#include "Adafruit_TinyUSB.h"
2020
#include "SdFat.h"
2121
// using f_mkfs() for formatting
22-
#include "fatfs/diskio.h"
2322
#include "fatfs/ff.h" // NOTE: This should be #included before fatfs/diskio.h!!!
23+
#include "fatfs/diskio.h"
2424

2525
#include "Wippersnapper_V2.h"
26-
#define SD_FAT_TYPE 3
26+
#define SD_FAT_TYPE 3 // TODO: Remove this and move to sdcard class instead?
2727

2828
// forward decl.
2929
class Wippersnapper_V2;

0 commit comments

Comments
 (0)