Skip to main content

compare

Function compare 

Source
pub fn compare(written: &[u8], read_back: &[u8]) -> Result<(), LoadError>
Expand description

Compares what was read back with what was written.

§Arguments

  • written - the image that went out.
  • read_back - the same span read from the chip.

§Returns

Ok(()) when every byte matches.

§Errors

Returns LoadError::ReadBackDiffers naming the first byte that does not, which says where on the bus the trouble starts rather than only that there is some.