From 348a17f24ab63f41ba7bb4b714e47775c079a6bf Mon Sep 17 00:00:00 2001 From: kellerkindt Date: Wed, 10 Jun 2020 17:29:38 +0200 Subject: [PATCH 1/3] Add CHANGELOG for upcoming 0.3.0 release --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dfe780c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# 0.3.0 (June 10, 2020) + +### Breaking changes +- Require [`v2::OutputPins`](https://github.com/rust-embedded/embedded-hal/blob/9e6ab5a1ee8900830bd4fe56f0a84ddb0bccda3f/src/digital/v2.rs) +- [`OutputPin` is now taken by ownership](https://github.com/kellerkindt/w5500/blob/d02bbf7e5cc837e658671d1467305523136376cc/src/lib.rs#L131) instead of mut refs [#13](https://github.com/kellerkindt/w5500/issues/13) + +### Changes +- Upgrade to Rust 2018 Edition +- Many doc updates, thanks @jonahbron From a8909816bc48389d2b9fb86b7abdfe7a0d4e3310 Mon Sep 17 00:00:00 2001 From: kellerkindt Date: Wed, 10 Jun 2020 17:32:30 +0200 Subject: [PATCH 2/3] Fix usage of inactive w5500 instance --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f6c056c..3735f23 100644 --- a/README.md +++ b/README.md @@ -65,14 +65,14 @@ of the SPI implementation. It must be set up to work as the W5500 chip requires active.set_subnet(IpAddress::new(255, 255, 255, 0)).unwrap(); active.set_gateway(IpAddress::new(192, 168, 0, 1)).unwrap(); - let socket0: UninitializedSocket = w5500.take_socket(Socket::Socket0).unwrap(); - let udp_server_socket = (&mut w5500, socket0).try_into_udp_server_socket(1234).unwrap(); + let socket0: UninitializedSocket = active.take_socket(Socket::Socket0).unwrap(); + let udp_server_socket = (&mut active, socket0).try_into_udp_server_socket(1234).unwrap(); let mut buffer = [0u8; 256]; let response = [104, 101, 108, 108, 111, 10];// "hello" as ASCII loop { - if let Ok(Some((ip, port, len))) = udp_server_socket.receive(&mut buffer[..]) { - udp_server_socket.blocking_send(ip, port, response[..]).unwrap(); + if let Ok(Some((ip, port, len))) = (&mut active, udp_server_socket).receive(&mut buffer[..]) { + (&mut active, udp_server_socket).blocking_send(ip, port, response[..]).unwrap(); } } ``` @@ -87,4 +87,3 @@ In no particular order, things to do to improve this driver. * Make reset safe by requiring that all sockets be returned to the pool first * Support a 3-wire SPI bus * Sane defaults for IP/Gateway/Subnet -* Improve documentation From 8f39a1a9569e3c79e065a7d4f53d50b6991226ec Mon Sep 17 00:00:00 2001 From: Michael Watzko Date: Wed, 10 Jun 2020 17:34:22 +0200 Subject: [PATCH 3/3] Version 0.3.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 529ca33..c79ae53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "w5500" -version = "0.2.1" +version = "0.3.0" authors = ["Michael Watzko "] repository = "https://github.com/kellerkindt/w5500.git" description = "W5500 IoT Controller implementation. Currently UDP sending and receiving is working. WIP"