Skip to content

Commit 642e174

Browse files
committed
change default layout to use cpy compatible format for rp2040
1 parent 368478c commit 642e174

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

Mini_GIF_Players/Mini_GIF_Players.ino

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,20 @@
2525
Adafruit_FlashTransport_ESP32 flashTransport;
2626

2727
#elif defined(ARDUINO_ARCH_RP2040)
28-
// RP2040 use same flash device that store code.
29-
// Therefore there is no need to specify the SPI and SS
30-
// Use default (no-args) constructor to be compatible with CircuitPython partition scheme
31-
Adafruit_FlashTransport_RP2040 flashTransport;
28+
// RP2040 use same flash device that store code for file system. Therefore we
29+
// only need to specify start address and size (no need SPI or SS)
30+
// By default (start=0, size=0), values that match file system setting in
31+
// 'Tools->Flash Size' menu selection will be used.
32+
// Adafruit_FlashTransport_RP2040 flashTransport;
3233

33-
// For generic usage: Adafruit_FlashTransport_RP2040(start_address, size)
34-
// If start_address and size are both 0, value that match filesystem setting in
35-
// 'Tools->Flash Size' menu selection will be used
34+
// To be compatible with CircuitPython partition scheme (start_address = 1 MB,
35+
// size = total flash - 1 MB) use const value (CPY_START_ADDR, CPY_SIZE) or
36+
// subclass Adafruit_FlashTransport_RP2040_CPY. Un-comment either of the
37+
// following line:
38+
// Adafruit_FlashTransport_RP2040
39+
// flashTransport(Adafruit_FlashTransport_RP2040::CPY_START_ADDR,
40+
// Adafruit_FlashTransport_RP2040::CPY_SIZE);
41+
Adafruit_FlashTransport_RP2040_CPY flashTransport;
3642

3743
#else
3844
// On-board external flash (QSPI or SPI) macros should already

0 commit comments

Comments
 (0)