polyfs 0.1.1

Minimal, extensible, no_std, no_alloc FAT32 file system driver for SD cards.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 Olivér Pirger

pub mod sdcard;

use crate::Result;

#[trait_variant::make(Storage: Send)]
pub trait BlockDevice {
    /// Reads a 512 byte block from the device.
    async fn read(&mut self, i: u32, buf: &mut [u8; 512]) -> Result<()>;

    /// Writes a 512 byte block to the device.
    async fn write(&mut self, i: u32, buf: &[u8; 512]) -> Result<()>;
}