Fix outdated mention of interface in README
This commit is contained in:
parent
c85373174b
commit
f559047c8c
1 changed files with 8 additions and 3 deletions
11
README.md
11
README.md
|
|
@ -33,9 +33,14 @@ of the SPI implementation. It must be set up to work as the W5500 chip requires
|
||||||
let mut spi = ...; // SPI interface to use
|
let mut spi = ...; // SPI interface to use
|
||||||
let mut cs : OutputPin = ...; // chip select
|
let mut cs : OutputPin = ...; // chip select
|
||||||
|
|
||||||
let device = UninitializedDevice::new(FourWire::new(spi, cs));
|
// alternative FourWireRef::new(&mut spi, &mut spi)
|
||||||
let device = device.initialize_manual(MacAddress::new(0, 1, 2, 3, 4, 5), Ipv4Addr::new(192, 168, 86, 79), Mode::default()).unwrap();
|
let device = UninitializedDevice::new(FourWire::new(spi, cs))
|
||||||
let socket = interface.socket();
|
.initialize_manual(
|
||||||
|
MacAddress::new(0, 1, 2, 3, 4, 5),
|
||||||
|
Ipv4Addr::new(192, 168, 86, 79),
|
||||||
|
Mode::default()
|
||||||
|
).unwrap();
|
||||||
|
let socket = device.socket();
|
||||||
socket.connect(
|
socket.connect(
|
||||||
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(192, 168, 86, 38)), 8000),
|
SocketAddr::new(IpAddr::V4(Ipv4Addr::new(192, 168, 86, 38)), 8000),
|
||||||
).unwrap();
|
).unwrap();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue