macro_rules! algorithm {
    ($type:ty, {
        flash_address: $flash_address:expr,
        flash_size: $flash_size:expr,
        page_size: $page_size:expr,
        sectors: [$({
            size: $size:expr,
            address: $address:expr,
        }),+]
    }) => { ... };
}
Expand description

A macro to define a new flash algoritm.

It takes care of placing the functions in the correct linker sections and checking the flash algorithm initialization status.