mirror of
https://github.com/Anshorei/epd-waveshare.git
synced 2026-10-03 22:06:43 +00:00
Started a new example for 1.54 in
This commit is contained in:
@@ -61,10 +61,11 @@ impl<'a> InputPin for HackInputPin<'a> {
|
||||
fn main() {
|
||||
|
||||
// Configure SPI
|
||||
// Settings are taken from
|
||||
let mut spi = Spidev::open("/dev/spidev0.0").expect("spidev directory");
|
||||
let options = SpidevOptions::new()
|
||||
.bits_per_word(8)
|
||||
.max_speed_hz(1_000_000)
|
||||
.max_speed_hz(4_000_000)
|
||||
.mode(spidev::SPI_MODE_0)
|
||||
.build();
|
||||
spi.configure(&options).expect("spi configuration");
|
||||
|
||||
Reference in New Issue
Block a user