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.
Volume
,Directory
andFile
are 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.- Renamed the old types to
RawVolume
,RawDirectory
andRawFile
- New method
make_dir_in_dir
- Fixed long-standing bug that caused an integer overflow when a FAT32 directory was longer than one cluster (#74)
- Updated 'shell' example to support
mkdir
,tree
and relative/absolute paths - Renamed
Error::FileNotFound
toError::NotFound
- New API
change_dir
which changes a directory to point to some child directory (or the parent) without opening a new directory. - Empty strings and
"."
convert toShortFileName::this_dir()
- You can now open directories multiple times without error
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_type
will now perform card initialisation (#87 and #90). - Removed warning about unused arguments.
- Types are now documented at the top level (#86).
- Renamed
Cluster
toClusterId
and 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:
Controller
alias forVolumeManager
removed. - Breaking Change:
VolumeManager::open_dir_entry
removed, 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
Controller
toVolumeManager
, to better describe what it does. - Breaking Change: Renamed
SdMmcSpi
toSdCard
- Breaking Change:
AcquireOpts
now 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::new
now requires an object that implements the embedded-halDelayUs
trait - Breaking Change: Renamed
card_size_bytes
tonum_bytes
, to matchnum_blocks
- More robust card intialisation procedure, with added retries
- Supports building with neither
defmt
norlog
logging
- Added
mark_card_as_init
method, if you know the card is initialised and want to skip the initialisation step
- Breaking Change: Removed
BlockSpi
type - 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-log
feature flag. - Breaking Change: Use SPI blocking traits instead to ease SPI peripheral sharing. See: rust-embedded-community#28
- Added
Controller::has_open_handles
andController::free
methods. - Breaking Change: Changed interface to enforce correct SD state at compile time.
- Breaking Change: Added custom error type for
File
operations. - Fix
env_logger
pulling in thestd
feature inlog
in library builds. - Raise the minimum supported Rust version to 1.56.0.
- Code tidy-ups and more documentation.
- Add
MAX_DIRS
andMAX_FILES
generics toController
to 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 aController
with custom limits.
Version 0.3.0 - 2019-12-16
- Updated to
v2
embedded-hal traits. - Added open support for all modes.
- Added write support for files.
- Added
Info_Sector
tracking for FAT32. - Change directory iteration to look in all the directory's clusters.
- Added
write_test
andcreate_test
. - De-duplicated FAT16 and FAT32 code (rust-embedded-community#10)
Version 0.2.1 - 2019-02-19
- Added
readme=README.md
toCargo.toml
Version 0.2.0 - 2019-01-24
- Reduce delay waiting for response. Big speed improvements.
- Can read blocks from an SD Card using an
embedded_hal::SPI
device and aembedded_hal::OutputPin
for 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.