Skip to content

Commit

Permalink
merge in upstream esp32s3 metro patch
Browse files Browse the repository at this point in the history
  • Loading branch information
brentru committed Nov 21, 2024
1 parent 01d4b72 commit 192ff1a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ monitor_speed = 115200
extra_scripts = upload_no_build.py
lib_compat_mode = strict
lib_deps =
adafruit/Adafruit Zero DMA Library
adafruit/Adafruit TinyUSB Library
adafruit/Adafruit Zero DMA Library
adafruit/Adafruit SPIFlash
adafruit/Adafruit NeoPixel
adafruit/Adafruit DotStar
Expand Down
1 change: 1 addition & 0 deletions src/Wippersnapper_Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
#define STATUS_NEOPIXEL_PIN 46
#define STATUS_NEOPIXEL_NUM 1
#define USE_PSRAM ///< Board has PSRAM, use it for dynamic memory allocation
#define SD_CS_PIN SS
#elif defined(ARDUINO_MAGTAG29_ESP32S2)
#define BOARD_ID "magtag"
#define USE_TINYUSB
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions src/provisioning/sdcard/ws_sdcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
ws_sdcard::ws_sdcard() {
mode_offline = false;
_wokwi_runner = false;
#ifndef SD_CS_PIN
/* #ifndef SD_CS_PIN
return;
#endif

#else
// Attempt to initialize the SD card
if (_sd.begin(SD_CS_PIN)) {
mode_offline = true;
}
#endif
*/

}

/**************************************************************************/
Expand Down
7 changes: 3 additions & 4 deletions src/provisioning/tinyusb/Wippersnapper_FS_V2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*/
#if defined(ARDUINO_MAGTAG29_ESP32S2) || defined(ARDUINO_METRO_ESP32S2) || \
defined(ARDUINO_FUNHOUSE_ESP32S2) || \
defined(ARDUINO_METRO_ESP32S3) || defined(ARDUINO_FUNHOUSE_ESP32S2) || \
defined(ADAFRUIT_PYPORTAL_M4_TITANO) || \
defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE) || defined(ADAFRUIT_PYPORTAL) || \
defined(ARDUINO_ADAFRUIT_FEATHER_ESP32S2) || \
Expand Down Expand Up @@ -129,9 +129,6 @@ Wippersnapper_FS_V2::Wippersnapper_FS_V2() {
fsHalt("FATAL ERROR: Could not write filesystem contents!");
}

// Initialize USB-MSC
initUSBMSC();

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

/************************************************************/
Expand Down
4 changes: 2 additions & 2 deletions src/provisioning/tinyusb/Wippersnapper_FS_V2.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include "Adafruit_TinyUSB.h"
#include "SdFat.h"
// using f_mkfs() for formatting
#include "fatfs/diskio.h"
#include "fatfs/ff.h" // NOTE: This should be #included before fatfs/diskio.h!!!
#include "fatfs/diskio.h"

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

// forward decl.
class Wippersnapper_V2;
Expand Down

0 comments on commit 192ff1a

Please sign in to comment.