Add SPI and CS initialisation

This commit is contained in:
Michael Watzko 2019-02-17 14:30:39 +01:00
commit a1e402de7e

View file

@ -3,6 +3,9 @@
Below some really basic usage how I am ca using it: Below some really basic usage how I am ca using it:
```rust ```rust
let mut spi = ...; // SPI interface to use
let mut cs_w5500 : OutputPin = ...; // chip select
let mut w5500: Option<W5500> = W5500::with_initialisation( let mut w5500: Option<W5500> = W5500::with_initialisation(
&mut cs_w5500, // borrowed for whole W5500 lifetime &mut cs_w5500, // borrowed for whole W5500 lifetime
&mut spi, // borrowed for call to `with_initialisation` only &mut spi, // borrowed for call to `with_initialisation` only