Removed socket ownership checking, giving up on that effort for now

This commit is contained in:
Jonah Dahlquist 2019-09-19 10:00:36 -05:00 committed by Jonah Dahlquist
commit b6a52cbf8e
10 changed files with 81 additions and 171 deletions

View file

@ -51,14 +51,14 @@ impl<Spi: FullDuplex<u8>, ChipSelect: OutputPin> ActiveBus for ActiveFourWire<Sp
self.cs
.set_high()
.map_err(|e| Self::Error::ChipSelectError(e))?;
.map_err(|e| FourWireError::ChipSelectError(e))?;
block!(Self::transfer_bytes(&mut self.spi, &mut address_phase)
.and_then(|_| Self::transfer_byte(&mut self.spi, &mut control_phase))
.and_then(|_| Self::transfer_bytes(&mut self.spi, data_phase)))
.map_err(|e| Self::Error::SpiError(e))?;
.map_err(|e| FourWireError::SpiError(e))?;
self.cs
.set_low()
.map_err(|e| Self::Error::ChipSelectError(e))?;
.map_err(|e| FourWireError::ChipSelectError(e))?;
Ok(data_phase)
}