Skip to main content

program

Function program 

fn program(
    flash: &dyn Flash,
    next: &mut u32,
    wear: &mut WearCheck,
    data: &[u8],
) -> Result<(), DeviceError>
Expand description

Writes data to the first good block at or after next.

next moves past a block once it holds the data or failed like a worn block. After any other error, a retry starts at the same block again.