Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update SdFat to v2 #13

Merged
merged 0 commits into from
Oct 14, 2022
Merged

update SdFat to v2 #13

merged 0 commits into from
Oct 14, 2022

Conversation

hathach
Copy link
Member

@hathach hathach commented Oct 13, 2022

update current SdFat to v2 based on https://github.com/greiman/SdFat/releases/tag/2.2.0 . With following backward-compatible modification

  • support 1 FAT table (in addition to 2 FAT mirroring). Which is needed to mount file system formatted by elm-chan fatfs (micropython/circuitpython)
  • enable define SDFAT_FILE_TYPE = 1, USE_BLOCK_DEVICE_INTERFACE = 1, FAT12_SUPPORT = 1
  • disable warnings on FS.h availability (File not defined) on platform such as rp2040 and esp32/esp8266
  • Add File32::name() for compiling purpose
  • Add SharedSpiCard::cardSize() for compiling (which is renamed to sectorCount())
  • Add FsBlockDeviceInterface::syncBlock/readBlock(s)/writeBlock(s) for compiling (these are renamed to syncDevice/read_writeSector(s)
  • Add define ENABLE_EXTENDED_TRANSFER_CLASS, BaseBlockDriver, FatFileSystem, SdFatEX (these are renamed in v2)
  • Update FatVolume::begin() to also support mounting super floopy disk (SFD i.e no MBR) by default. Which is useful to work with floopy disk and also some of existing board that is formatted previously with SdFormat sketch (use SFD to save space).

SdFat v2 is safe to deploy since our modification allow it to work with existing v1 API.

Note: due to local changes from v1, it is probably better to push-force to master than merged via this PR. I have already backup current main as https://github.com/adafruit/SdFat/tree/legacy_v1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant