Worked around some of the error checking warnings

This commit is contained in:
Sebastian 2020-12-24 00:12:53 +01:00
parent fedcb6629d
commit 8ff6642aa7
1 changed files with 2 additions and 2 deletions

View File

@ -8,9 +8,9 @@ where
{
let mut buffer = [0u8, 0u8];
nss_pin.set_low();
nss_pin.set_low().map_err(|_| "Unable to set pin low")?;
let res = spi.transfer(&mut buffer);
nss_pin.set_high();
nss_pin.set_high().map_err(|_| "Unable to set pin high")?;
let raw_result = match res {
Ok(value) => (value[0] as u16) << 8 | (value[1] as u16),