|
25 | 25 | Adafruit_FlashTransport_ESP32 flashTransport; |
26 | 26 |
|
27 | 27 | #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; |
32 | 33 |
|
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; |
36 | 42 |
|
37 | 43 | #else |
38 | 44 | // On-board external flash (QSPI or SPI) macros should already |
|
0 commit comments