macro_rules! algorithm {
($type:ty, {
device_name: $device_name:expr,
device_type: $device_type:expr,
flash_address: $flash_address:expr,
flash_size: $flash_size:expr,
page_size: $page_size:expr,
empty_value: $empty_value:expr,
program_time_out: $program_time_out:expr,
erase_time_out: $erase_time_out: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.