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.
- Breaking Change:
VolumeManager
now uses interior-mutability (with aRefCell
) and so most methods are now&self
. This also makes it easier to open multipleFile
,Directory
orVolume
objects at once. - Breaking Change: The
VolumeManager
,File
,Directory
andVolume
no longer implementSend
or `Sync. VolumeManager
uses 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::device
method now takes a callback rather than giving you a reference to the underlyingBlockDevice
- Breaking Change:
Error:LockError
variant added. - Breaking Change:
SearchId
was renamed toHandle
File
now implements theembedded-io
Read
,Write
andSeek
traits.- New
iterate_dir_lfn
method onVolumeManager
andDirectory
- provides decoded Long File Names asOption<&str>
- Breaking Change: Removed the
reason: &str
argument fromBlockDevice
Version 0.8.0 - 2024-07-12
- Fixed a bug when seeking backwards through files.
- Updated to
heapless-0.8
andembedded-hal-bus-0.2
. - No longer panics if the close fails when a
Volume
is dropped - the failure is instead ignored.
File
now has aflush()
method.File
now has aclose()
method.
- Breaking Change: Removed
CS
type-param onSdCard
- now we use theSpiDevice
chip-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
,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. - Breaking Change: Renamed the old types to
RawVolume
,RawDirectory
andRawFile
- Breaking Change: Renamed
Error::FileNotFound
toError::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
,RawDirectory
andRawFile
types (like the oldVolume
,Directory
andFile
types)- New method
make_dir_in_dir
- Empty strings and
"."
convert toShortFileName::this_dir()
- New API
change_dir
which changes a directory to point to some child directory (or the parent) without opening a new directory. - Updated 'shell' example to support
mkdir
,tree
and 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_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: #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 (#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.
Version 0.1.1 - 2018-12-23
- 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.