Add SPI and CS initialisation
This commit is contained in:
parent
123c44b385
commit
a1e402de7e
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue