LittleFS on SD card
I'm currently trying to implement a little fs on a SD card. I even got it running already, but only with a nasty hack. I'm fetching the device with device_get_binding, casting the const away and set the API. This works most of the time, but sometimes this setting gets overriden again. Which is absolutely fine, removing const from the return value is a subtle hint that you are doing something wrong ;-).
Now I would like to go for a proper solution and before I push a pull request I would like to ask if it has a chance to get approved upstream at all.
My proposal is reusing the already existing properties lfs_config.read, lfs_config.prog and lfs_config.erase. If they are already set, do not override them in littlefs_mount. On top of that I would also have to handle the calls to flash_area_open, flash_area_get_device, ... and so on differently. Maybe providing them as properties of lfs_config as well?
As you can see, I'm not really dead sure which would be the best approach, therefore I would be glad about inputs which changes have a chance to get approved for upstream.
Embedded Software Engineer
SILA Embedded Solutions GmbH
+43 512 319492
FN 408741s, HG St. Pölten