Adafruit_ImageReader icon indicating copy to clipboard operation
Adafruit_ImageReader copied to clipboard

Add support for reading from LittleFS

Open ardnew opened this issue 2 years ago • 1 comments

  • Arduino board:

Adafruit MagTag

  • Arduino IDE version (found in Arduino -> About Arduino menu):

arduino-cli Version: 0.30.0 Commit: 83700ca2 Date: 2023-02-09T21:03:27Z

  • List the steps to reproduce the problem below (if possible attach a sketch or copy the sketch code in too):
  1. Format the internal 4MB flash with an SPIFFS or LittleFS data partition (example partitions.csv)
  2. Upload properly-formatted .bmp images to the data partition
  3. Try to draw them (e.g., examples/ThinkInkDisplays)

Note this is for the internal QSPI flash interface – the MagTag does not have an SD card reader!

It seems the examples do not handle SPI flash on ESP32 at all (should be using Adafruit_FlashTransport_ESP32 from the Adafruit_SPIFlash library).

I am working on a fix for this issue, but it is requiring a sort of "filesystem" wrapper class to replace the FatVolume and File32 members of Adafruit_ImageReader. Since this is an extensive change, would like some feedback on preferred approach here before continuing or submitting a PR.

ardnew avatar Mar 03 '23 23:03 ardnew

I'd love to collaborate, because SPIFFS is going to be deprecated at some time (at least that's the docs say about the ESP8266 Arduino Core) and this would be quite helpful. But I don't even know where to start...

zedee avatar Dec 16 '23 16:12 zedee