Add MSC example with internal flash example, implement #145 . The example is pretty much the same as External Flash one, except for the Adafruit_InternalFlash declaration instead of Adafruit_SPIFlash. This PR requires
newly created library (not yet released and submitted to Arduino index) https://github.com/adafruit/Adafruit_InternalFlash . Please download/clone it to your lib folder in the meanwhile. Adafruit_InternalFlash is compatible with filesystem created by CircuitPython (switch between CP and Arduino will keep the FS intact) provided that the FS start address and size is configured correctly. For Adafruit SAMD21 board it should be
// Start address and size should matches value in the CircuitPython (INTERNAL_FLASH_FILESYSTEM = 1)
// to make it easier to switch between Arduino and CircuitPython
#define INTERNAL_FLASH_FILESYSTEM_START_ADDR (0x00040000 - 256 - 0 - INTERNAL_FLASH_FILESYSTEM_SIZE)
#define INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024)
Note: Like SPIFlash, InternalFlash library implement BlockDeviceAPI and reply on SdFat to provide FATFS support. This allow us to have common API with FatFileSystemFatFile object and switching between Internal and External flash easy enough (similar to external flash and SD card). The drawback is SdFat requires SPI object to compile --> we need to fake the SPI interface even though board does not have it.
Add MSC example with internal flash example, implement #145 . The example is pretty much the same as External Flash one, except for the Adafruit_InternalFlash declaration instead of Adafruit_SPIFlash. This PR requires
Note: Like SPIFlash, InternalFlash library implement BlockDeviceAPI and reply on SdFat to provide FATFS support. This allow us to have common API with
FatFileSystem
FatFile
object and switching between Internal and External flash easy enough (similar to external flash and SD card). The drawback is SdFat requires SPI object to compile --> we need to fake the SPI interface even though board does not have it.