4 releases

0.1.3 Feb 5, 2022
0.1.2 Oct 16, 2020
0.1.1 Sep 6, 2020
0.1.0 Jul 9, 2020

#2297 in Embedded development

Download history 22/week @ 2024-12-06 18/week @ 2024-12-13 1/week @ 2024-12-20 6/week @ 2025-01-10 10/week @ 2025-01-17 4/week @ 2025-01-24 37/week @ 2025-01-31 22/week @ 2025-02-07 14/week @ 2025-02-14 19/week @ 2025-02-21 22/week @ 2025-02-28 8/week @ 2025-03-07 23/week @ 2025-03-14 1/week @ 2025-03-21

58 downloads per month
Used in 4 crates (3 directly)

MIT license

3KB

BlockDevice trait

pub trait BlockDevice {
    const BLOCK_SIZE: u32 = 512;

    type Error;
    fn read(&self, buf: &mut [u8], address: usize, number_of_blocks: usize) -> Result<(), Self::Error>;
    fn write(&self, buf: &[u8], address: usize, number_of_blocks: usize) -> Result<(), Self::Error>;
}

BlockDevice trait

pub trait BlockDevice {
    const BLOCK_SIZE: u32 = 512;
    
    type Error;
    fn read(&self, buf: &mut [u8], address: usize, number_of_blocks: usize) -> Result<(), Self::Error>;
    fn write(&self, buf: &[u8], address: usize, number_of_blocks: usize) -> Result<(), Self::Error>;
}

No runtime deps