// This will build the SPI device communication for us
This will build the SPI device communication for us
This will build the SPI device communication for us
fn build_spi() -> io::Result<Spidev> {
	let mut spi = Spidev::open(SPI_DEVICE)?;
	let opts = SpidevOptions::new()
		.bits_per_word(8)
		.max_speed_hz(SPI_SPEED)
		.mode(SPI_MODE_3)
		.build();
	spi.configure(&opts)?;
	Ok(spi)
}
fn build_spi ( ) -> io :: Result < Spidev > { let mut spi = Spidev :: open ( SPI_DEVICE ) ? ; let opts = SpidevOptions :: new ( ) . bits_per_word ( 8 ) . max_speed_hz ( SPI_SPEED ) . mode ( SPI_MODE_3 ) . build ( ) ; spi . configure ( & opts ) ? ; Ok ( spi ) }
This will build the SPI device communication for us
This will build the SPI device communication for us