// If you need to use an alternate pin for cable select, uncomment the relevant bits
// and pass the pin into psp's new() function.
//const SPI_ENABLE_PIN: u64 = 4; 
If you need to use an alternate pin for cable select, uncomment the relevant bits
and pass the pin into psp's new() function.
const SPI_ENABLE_PIN: u64 = 4.
If you need to use an alternate pin for cable select uncomment the relevant bits and pass the pin into psp ' s new () function . const SPI_ENABLE_PIN : u64 = 4 .
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 ) }
If you need to use an alternate pin for cable select, uncomment the relevant bits
and pass the pin into psp's new() function.
If you need to use an alternate pin for cable select uncomment the relevant bits and pass the pin into psp ' s new () function .