ad7172: delint, doc

This commit is contained in:
Astro 2020-03-21 00:34:22 +01:00
parent e7782c9cb3
commit dcf7babf32

View File

@ -186,8 +186,9 @@ impl<SPI: Transfer<u8, Error = E>, NSS: OutputPin, E: fmt::Debug> Adc<SPI, NSS>
let checksum_out = checksum.result(); let checksum_out = checksum.result();
let mut data = reg_data.clone(); let mut data = reg_data.clone();
let checksum_in = self.transfer(address, data.as_mut(), checksum_out)?; self.transfer(address, data.as_mut(), checksum_out)?;
// Verification
let readback_data = self.read_reg(reg)?; let readback_data = self.read_reg(reg)?;
if *readback_data == **reg_data { if *readback_data == **reg_data {
return Ok(()); return Ok(());