Commit Graph
168 Commits
Author SHA1 Message Date
Sosthène Guédon d0ebffac28 Allow showing hex content of littlefs files 2025-06-18 15:26:17 +02:00
Sosthène Guédon 4f055aab12 Make list accept dynamic Filesystem parameters without recompilation 2025-06-18 15:26:17 +02:00
Sosthène Guédon 7e94b3d8b0 Remove need for generic array and typenum constants
This will also allow for more flexible `Storage` implementations
that use `Vec<u8>` as a cache buffer and are not fixed to a single block size
2025-06-18 15:26:01 +02:00
Sosthène Guédonandsosthene-nitrokey b3a7371d84 Add tests that files can still be read after and before shrinknig v0.6.1-nitrokey.1 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 5ab86b5c7a Add tests 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey aeae7a0a54 Use tagged commit 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey b25c9262b6 Update littlefs2-sys to use trussed version of littlefs 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 9eaca6732b Fix avr compilation 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 4c320aea25 mount_or_else: ensure that allocation has not been overwritten in the else clause 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 6653300ce3 core: add debug-error feature to have a proper debug implementation of errors 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 4f86dc4f8f mount_or_else: give access to allocation in callback 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey a37ba04ce8 fixup! Add support for littlefs opening flags 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey f0cac435dd Fix clippy warnings 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 3b3f5ac9bc Fix avr CI 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey 214131dcee Add support for shrinking/growing filesystems 2025-05-14 10:16:21 +02:00
Sosthène Guédonandsosthene-nitrokey e09f0a44dc Add support for littlefs opening flags 2025-05-14 10:16:21 +02:00
Sosthène Guédon 5bb11851a3 core: Make io::Result alias accept generic error type 2025-03-11 11:51:15 +01:00
Sosthène Guédonandsosthene-nitrokey 8ed1c5cf50 Fix list panic when last block of the filesystem is used 2025-03-07 17:01:15 +01:00
Robin Krahl 53bbcd4f7b Release v0.6.1 0.6.1 2025-03-04 20:21:53 +01:00
Robin Krahl 9680d4f583 Add DynStorageAlloc using FnOnce
Our DynStorage trait uses a &mut dyn FnMut as a callback for
implementing mount_and_then (instead of a FnOnce like Filesystem).  This
is because there is no no-std way to pass a FnOnce in an dyn compatible
trait method.

If alloc is available, this limitation can be avoided by using a
Box<dyn FnOnce>.  This patch adds an alloc feature to the crate and a
DynStorageAlloc trait behind that feature that provides mount_and_then
functions using a boxed FnOnce instead of a reference to an FnMut.
2025-03-04 20:21:53 +01:00
Robin Krahl bc4b4543f1 Release v0.6.0 0.6.0 2025-02-28 13:38:54 +01:00
Robin Krahl 9fdeadcf0f Remove trait and result arguments from macros
The const_ram_storage! and ram_storage! macros used to have trait and
result arguments to set the storage trait to implement and the result
type to use.  As this defaulted to relative paths, it made the result of
the macro dependent on the context and could cause confusion.  At the
same time, there is no real use case for substituting these types.

This patch removes the arguments for good and just uses
$crate::driver::Storage and $crate::io::Result instead.
2025-02-28 13:18:15 +01:00
Robin Krahl 49d15bc0cf Introduce version constants and use correct disk version
This patch replaces the version function with two constants,
BACKEND_VERSION and DISK_VERSION, and changes the Version struct to be
a wrapper for a littlefs version number.  DISK_VERSION is now the disk
version used by this crate, not the newest version supported by the
backend.
2025-02-27 16:36:03 +01:00
Sosthène GuédonandRobin Krahl 3bd9e1743b Bump littlefs to version 2.9 2025-02-27 16:36:03 +01:00
Robin Krahl 25c88f8093 ci: Use avr-none target for avr build
avr-none is now a supported Tier 3 target so we no longer need the
custom target definition.
2025-02-26 14:56:48 +01:00