Update embedded-hal to 1.0.0-rc.3
This commit is contained in:
@ -16,8 +16,8 @@ embedded-io-async = { version = "0.6.1", features = ["defmt-03"] }
|
||||
embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] }
|
||||
embassy-net-esp-hosted = { version = "0.1.0", path = "../../embassy-net-esp-hosted", features = ["defmt"] }
|
||||
embassy-net-enc28j60 = { version = "0.1.0", path = "../../embassy-net-enc28j60", features = ["defmt"] }
|
||||
embedded-hal-async = { version = "1.0.0-rc.2" }
|
||||
embedded-hal-bus = { version = "0.1.0-rc.2", features = ["async"] }
|
||||
embedded-hal-async = { version = "1.0.0-rc.3" }
|
||||
embedded-hal-bus = { version = "0.1.0-rc.3", features = ["async"] }
|
||||
static_cell = { version = "2", features = [ "nightly" ] }
|
||||
perf-client = { path = "../perf-client" }
|
||||
|
||||
|
@ -24,9 +24,9 @@ defmt-rtt = "0.4"
|
||||
cortex-m = { version = "0.7.6" }
|
||||
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-bus = { version = "=0.1.0-rc.2", features = ["async"] }
|
||||
embedded-hal-1 = { package = "embedded-hal", version = "=1.0.0-rc.3" }
|
||||
embedded-hal-async = { version = "=1.0.0-rc.3" }
|
||||
embedded-hal-bus = { version = "=0.1.0-rc.3", features = ["async"] }
|
||||
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
|
||||
futures = { version = "0.3.17", default-features = false, features = ["async-await"] }
|
||||
embedded-io-async = { version = "0.6.1" }
|
||||
|
@ -16,10 +16,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);
|
||||
let mut a = Output::new(&mut a, Level::Low);
|
||||
delay();
|
||||
assert!(b.is_low());
|
||||
assert!(!b.is_high());
|
||||
@ -64,7 +64,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);
|
||||
@ -77,7 +77,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());
|
||||
|
||||
@ -91,7 +91,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());
|
||||
|
||||
|
@ -45,7 +45,7 @@ async fn main(_spawner: Spawner) {
|
||||
|
||||
// Test output from A
|
||||
{
|
||||
let pin1 = Input::new(&mut p9, Pull::None);
|
||||
let mut pin1 = Input::new(&mut p9, Pull::None);
|
||||
let _pwm = Pwm::new_output_a(&mut p.PWM_CH3, &mut p6, cfg.clone());
|
||||
Timer::after_millis(1).await;
|
||||
assert_eq!(pin1.is_low(), invert_a);
|
||||
@ -59,7 +59,7 @@ async fn main(_spawner: Spawner) {
|
||||
|
||||
// Test output from B
|
||||
{
|
||||
let pin2 = Input::new(&mut p11, Pull::None);
|
||||
let mut pin2 = Input::new(&mut p11, Pull::None);
|
||||
let _pwm = Pwm::new_output_b(&mut p.PWM_CH3, &mut p7, cfg.clone());
|
||||
Timer::after_millis(1).await;
|
||||
assert_ne!(pin2.is_low(), invert_a);
|
||||
@ -73,8 +73,8 @@ async fn main(_spawner: Spawner) {
|
||||
|
||||
// Test output from A+B
|
||||
{
|
||||
let pin1 = Input::new(&mut p9, Pull::None);
|
||||
let pin2 = Input::new(&mut p11, Pull::None);
|
||||
let mut pin1 = Input::new(&mut p9, Pull::None);
|
||||
let mut pin2 = Input::new(&mut p11, Pull::None);
|
||||
let _pwm = Pwm::new_output_ab(&mut p.PWM_CH3, &mut p6, &mut p7, cfg.clone());
|
||||
Timer::after_millis(1).await;
|
||||
assert_eq!(pin1.is_low(), invert_a);
|
||||
|
@ -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 }
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user