All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Updated to
defmt1.0.1,embedded-hal-bus0.3.0,env_logger0.11.8,heapless0.9.1, andhex-literal1.0.0. - Raised the minimum supported Rust version to 1.87.0.
- Removed
core-errorfeature as MSRV is now above 1.81 - Set edition to 2024
- Removed
Error::DeleteDirAsFile(breaking change) - Renamed
delete_file_in_dirtodelete_entry_in_dirbecause it can now delete empty directories (breaking change) - Added
open_long_name_file_in_dirAPI, to open files using their Long File Name - Updated directory iterator callback, to allow bailing out early (breaking change)
crc7function now returns the actual CRC7 value without left-shifting by and XOR-ing by/with 1.- Bumped
embedded-ioto 0.7 CardType::SDHCrenamed toCardType::SdhcSdxcCardTypeis now inside thesdcardmodule
- Added
CsdV3data structure. Csd::newconstructor which creates the CSD from a raw&[u8; 16]and also performs a CRC7 check.- Added
verify_crc7function on CSD structures. - Added
core::error::Errorbounds to device driver error type
Version 0.9.0 - 2025-06-08
- Breaking Change:
VolumeManagernow uses interior-mutability (with aRefCell) and so most methods are now&self. This also makes it easier to open multipleFile,DirectoryorVolumeobjects at once. - Breaking Change: The
VolumeManager,File,DirectoryandVolumeno longer implementSendorSync. VolumeManageruses an interior block cache of 512 bytes, increasing its size by about 520 bytes but hugely reducing stack space required at run-time.- Breaking Change: The
VolumeManager::devicemethod now takes a callback rather than giving you a reference to the underlyingBlockDevice - Breaking Change:
Error:LockErrorvariant added. - Breaking Change:
SearchIdwas renamed toHandle - Fixed writing at block start mid-file (previously overwrote subsequent file data with zeros up to the end of the block)
Filenow implements theembedded-ioRead,WriteandSeektraits.- New
iterate_dir_lfnmethod onVolumeManagerandDirectory- provides decoded Long File Names asOption<&str> - Implement
core::error::Errorfor all error types (behind crate featurecore-erroras this raises the MSRV to 1.81)
- Breaking Change: Removed the
reason: &strargument fromBlockDevice
Version 0.8.2 - 2025-06-07
- Fixed writing at block start mid-file (previously overwrote subsequent file data with zeros up to the end of the block)
Version 0.8.1 - 2024-11-03
- Second FAT is now updated, if it is present
- When creating a directory
..now points at the root directory correctly - The info block containing the free cluster count is now updated when unmounting a FAT32 volume.
Version 0.8.0 - 2024-07-12
- Fixed a bug when seeking backwards through files.
- Updated to
heapless-0.8andembedded-hal-bus-0.2. - No longer panics if the close fails when a
Volumeis dropped - the failure is instead ignored.
Filenow has aflush()method.Filenow has aclose()method.
- Breaking Change: Removed
CStype-param onSdCard- now we use theSpiDevicechip-select (closing #126) - Breaking Change: Removed the 74 clock cycle 'init' sequence - now applications must do this
Version 0.7.0 - 2024-02-04
- Breaking Change:
Volume,DirectoryandFileare now smart! They hold references to the thing they were made from, and will clean themselves up when dropped. The trade-off is you can can't open multiple volumes, directories or files at the same time. - Breaking Change: Renamed the old types to
RawVolume,RawDirectoryandRawFile - Breaking Change: Renamed
Error::FileNotFoundtoError::NotFound - Fixed long-standing bug that caused an integer overflow when a FAT32 directory was longer than one cluster (#74)
- You can now open directories multiple times without error
- Updated to embedded-hal 1.0
RawVolume,RawDirectoryandRawFiletypes (like the oldVolume,DirectoryandFiletypes)- New method
make_dir_in_dir - Empty strings and
"."convert toShortFileName::this_dir() - New API
change_dirwhich changes a directory to point to some child directory (or the parent) without opening a new directory. - Updated 'shell' example to support
mkdir,treeand relative/absolute paths
- None
Version 0.6.0 - 2023-10-20
- Writing to a file no longer flushes file metadata to the Directory Entry. Instead closing a file now flushes file metadata to the Directory Entry. Requires mutable access to the Volume (#94).
- Files now have the correct length when modified, not appended (#72).
- Calling
SdCard::get_card_typewill now perform card initialisation (#87 and #90). - Removed warning about unused arguments.
- Types are now documented at the top level (#86).
- Renamed
ClustertoClusterIdand stopped you adding two together
- New examples,
append_file,create_file,delete_file,list_dir,shell - New test cases
tests/directories.rs,tests/read_file.rs
- Breaking Change:
Controlleralias forVolumeManagerremoved. - Breaking Change:
VolumeManager::open_dir_entryremoved, as it was unsafe to the user to randomly pick a starting cluster. - Old examples
create_test,test_mount,write_test,delete_test
Version 0.5.0 - 2023-05-20
- Breaking Change: Renamed
ControllertoVolumeManager, to better describe what it does. - Breaking Change: Renamed
SdMmcSpitoSdCard - Breaking Change:
AcquireOptsnow hasuse_crc(which makes it ask for CRCs to be enabled) instead ofrequire_crc(which simply allowed the enable-CRC command to fail) - Breaking Change:
SdCard::newnow requires an object that implements the embedded-halDelayUstrait - Breaking Change: Renamed
card_size_bytestonum_bytes, to matchnum_blocks - More robust card intialisation procedure, with added retries
- Supports building with neither
defmtnorloglogging
- Added
mark_card_as_initmethod, if you know the card is initialised and want to skip the initialisation step
- Breaking Change: Removed
BlockSpitype - card initialisation now handled as an internal state variable
Version 0.4.0 - 2023-01-18
- Optionally use [defmt] s/defmt) for logging.
Controlled by
defmt-logfeature flag. - Breaking Change: Use SPI blocking traits instead to ease SPI peripheral sharing. See: #28
- Added
Controller::has_open_handlesandController::freemethods. - Breaking Change: Changed interface to enforce correct SD state at compile time.
- Breaking Change: Added custom error type for
Fileoperations. - Fix
env_loggerpulling in thestdfeature inlogin library builds. - Raise the minimum supported Rust version to 1.56.0.
- Code tidy-ups and more documentation.
- Add
MAX_DIRSandMAX_FILESgenerics toControllerto allow an arbitrary numbers of concurrent open directories and files. - Add new constructor method
Controller::new_with_limits(block_device: D, timesource: T) -> Controller<D, T, MAX_DIRS, MAX_FILES>to create aControllerwith custom limits.
Version 0.3.0 - 2019-12-16
- Updated to
v2embedded-hal traits. - Added open support for all modes.
- Added write support for files.
- Added
Info_Sectortracking for FAT32. - Change directory iteration to look in all the directory's clusters.
- Added
write_testandcreate_test. - De-duplicated FAT16 and FAT32 code (#10)
Version 0.2.1 - 2019-02-19
- Added
readme=README.mdtoCargo.toml
Version 0.2.0 - 2019-01-24
- Reduce delay waiting for response. Big speed improvements.
Version 0.1.1 - 2018-12-23
- Can read blocks from an SD Card using an
embedded_hal::SPIdevice and aembedded_hal::OutputPinfor Chip Select. - Can read partition tables and open a FAT32 or FAT16 formatted partition.
- Can open and iterate the root directory of a FAT16 formatted partition.