Update embedded-hal to 1.0.0-rc.3

This commit is contained in:
Dario Nieuwenhuis
2023-12-14 16:01:51 +01:00
parent 7b9b22d7f8
commit 9d8dbd67fe
41 changed files with 238 additions and 203 deletions

View File

@ -63,8 +63,8 @@ defmt-rtt = "0.4"
cortex-m = { version = "0.7.6", features = ["critical-section-single-core"] }
cortex-m-rt = "0.7.0"
embedded-hal = "0.2.6"
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.2" }
embedded-hal-async = { version = "=1.0.0-rc.2" }
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.3" }
embedded-hal-async = { version = "=1.0.0-rc.3" }
micromath = "2.0.0"
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
rand_core = { version = "0.6", default-features = false }

View File

@ -20,10 +20,10 @@ async fn main(_spawner: Spawner) {
// Test initial output
{
let b = Input::new(&mut b, Pull::None);
let mut b = Input::new(&mut b, Pull::None);
{
let a = Output::new(&mut a, Level::Low, Speed::Low);
let mut a = Output::new(&mut a, Level::Low, Speed::Low);
delay();
assert!(b.is_low());
assert!(!b.is_high());
@ -68,7 +68,7 @@ async fn main(_spawner: Spawner) {
// Test input no pull
{
let b = Input::new(&mut b, Pull::None);
let mut b = Input::new(&mut b, Pull::None);
// no pull, the status is undefined
let mut a = Output::new(&mut a, Level::Low, Speed::Low);
@ -81,7 +81,7 @@ async fn main(_spawner: Spawner) {
// Test input pulldown
{
let b = Input::new(&mut b, Pull::Down);
let mut b = Input::new(&mut b, Pull::Down);
delay();
assert!(b.is_low());
@ -95,7 +95,7 @@ async fn main(_spawner: Spawner) {
// Test input pullup
{
let b = Input::new(&mut b, Pull::Up);
let mut b = Input::new(&mut b, Pull::Up);
delay();
assert!(b.is_high());
@ -109,7 +109,7 @@ async fn main(_spawner: Spawner) {
// Test output open drain
{
let b = Input::new(&mut b, Pull::Down);
let mut b = Input::new(&mut b, Pull::Down);
// no pull, the status is undefined
let mut a = OutputOpenDrain::new(&mut a, Level::Low, Speed::Low, Pull::None);