Trait FlashParameters

Source
pub trait FlashParameters {
    const PAGE_SIZE: usize;
    const SECTOR_SIZE: usize;
    const BLOCK_SIZE: usize;
    const CHIP_SIZE: usize;
}
Expand description

Trait for defining the size of a flash.

Required Associated Constants§

Source

const PAGE_SIZE: usize

The page write size in bytes.

Source

const SECTOR_SIZE: usize

The sector erase size in bytes.

Source

const BLOCK_SIZE: usize

The block erase size in bytes.

Source

const CHIP_SIZE: usize

The total chip size in bytes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<SPI, FlashParams, Delay> FlashParameters for Flash<SPI, FlashParams, Delay>
where FlashParams: FlashParameters,

Source§

const PAGE_SIZE: usize = FlashParams::PAGE_SIZE

Source§

const SECTOR_SIZE: usize = FlashParams::SECTOR_SIZE

Source§

const BLOCK_SIZE: usize = FlashParams::BLOCK_SIZE

Source§

const CHIP_SIZE: usize = FlashParams::CHIP_SIZE