Skip to content

Commit a35a228

Browse files
committed
Use embedded-hal 1.0 in examples.
1 parent 8f4fe47 commit a35a228

28 files changed

Lines changed: 26 additions & 96 deletions

File tree

examples/blinky-button-demo/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ edition = "2018"
99
[dependencies]
1010
cortex-m = "0.7.3"
1111
cortex-m-rt = "0.7.0"
12+
embedded-hal = "1.0.0"
1213
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
1314
nrf52832-hal = { features = ["rt"], path = "../../nrf52832-hal" }
14-
15-
[dependencies.embedded-hal]
16-
version = "0.2.3"
17-
features = ["unproven"]

examples/blinky-button-demo/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#![no_main]
22
#![no_std]
33

4-
use embedded_hal::digital::v2::InputPin;
5-
use embedded_hal::digital::v2::OutputPin;
4+
use embedded_hal::digital::InputPin;
5+
use embedded_hal::digital::OutputPin;
66
use nrf52832_hal as hal;
77
use nrf52832_hal::gpio::Level;
88
use rtt_target::{rprintln, rtt_init_print};
@@ -19,7 +19,7 @@ fn main() -> ! {
1919
rtt_init_print!();
2020
let p = hal::pac::Peripherals::take().unwrap();
2121
let port0 = hal::gpio::p0::Parts::new(p.P0);
22-
let button = port0.p0_13.into_pullup_input();
22+
let mut button = port0.p0_13.into_pullup_input();
2323
let mut led = port0.p0_17.into_push_pull_output(Level::Low);
2424

2525
rprintln!("Blinky button demo starting");

examples/comp-demo/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ publish = false
1111
cortex-m = "0.7.3"
1212
cortex-m-rt = { version = "0.7.0", features = ["device"] }
1313
cortex-m-rtic = { version = "1.0.0", default-features = false }
14+
embedded-hal = "1.0.0"
1415
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
1516
nrf52840-hal = { features = ["rt"], path = "../../nrf52840-hal" }
16-
17-
[dependencies.embedded-hal]
18-
version = "0.2.3"
19-
features = ["unproven"]

examples/comp-demo/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use {core::panic::PanicInfo, rtt_target::rprintln};
55

66
#[rtic::app(device = nrf52840_hal::pac, peripherals = true)]
77
mod app {
8-
use embedded_hal::digital::v2::OutputPin;
8+
use embedded_hal::digital::OutputPin;
99
use nrf52840_hal::clocks::Clocks;
1010
use nrf52840_hal::comp::*;
1111
use nrf52840_hal::gpio::{self, Level, Output, Pin, PushPull};

examples/gpiote-demo/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ edition = "2018"
1010
cortex-m = "0.7.3"
1111
cortex-m-rt = { version = "0.7.0", features = ["device"] }
1212
cortex-m-rtic = { version = "1.0.0", default-features = false }
13+
embedded-hal = "1.0.0"
1314
systick-monotonic = "1.0.0"
1415
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
1516
nrf52840-hal = { features = ["rt"], path = "../../nrf52840-hal" }
16-
17-
[dependencies.embedded-hal]
18-
version = "0.2.3"
19-
features = ["unproven"]

examples/gpiote-demo/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use {core::panic::PanicInfo, nrf52840_hal as hal, rtt_target::rprintln};
55

66
#[rtic::app(device = crate::hal::pac, peripherals = true, dispatchers = [SWI0_EGU0])]
77
mod app {
8-
use embedded_hal::digital::v2::InputPin;
8+
use embedded_hal::digital::InputPin;
99
use systick_monotonic::*;
1010
use {
1111
hal::{

examples/hello-world/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ publish = false
1111
cortex-m = "0.7.3"
1212
cortex-m-rt = "0.7.0"
1313

14-
[dependencies.embedded-hal]
15-
version = "0.2.3"
16-
features = ["unproven"]
17-
1814
[dependencies.nrf9160-hal]
1915
features = ["rt"]
2016
path = "../../nrf9160-hal"

examples/i2s-controller-demo/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ publish = false
1111
cortex-m = "0.7.3"
1212
cortex-m-rt = { version = "0.7.0", features = ["device"] }
1313
cortex-m-rtic = { version = "1.0.0", default-features = false }
14+
embedded-hal = "1.0.0"
1415
systick-monotonic = "1.0.0"
1516
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
1617
nrf52840-hal = { features = ["rt"], path = "../../nrf52840-hal" }
1718
heapless = "0.7.10"
1819
small_morse = "0.1.0"
19-
20-
[dependencies.embedded-hal]
21-
version = "0.2.3"
22-
features = ["unproven"]

examples/i2s-controller-demo/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct Aligned<T: ?Sized>(T);
1313
#[rtic::app(device = crate::hal::pac, peripherals = true, dispatchers = [SWI0_EGU0, SWI1_EGU1])]
1414
mod app {
1515
use crate::{hal, triangle_wave, Aligned};
16-
use embedded_hal::digital::v2::{InputPin, OutputPin};
16+
use embedded_hal::digital::{InputPin, OutputPin};
1717
use heapless::spsc::{Consumer, Producer, Queue};
1818
use small_morse::{encode, State};
1919
use systick_monotonic::*;

examples/i2s-peripheral-demo/Cargo.toml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ publish = false
1111
cortex-m = "0.7.3"
1212
cortex-m-rt = { version = "0.7.0", features = ["device"] }
1313
cortex-m-rtic = { version = "1.0.0", default-features = false }
14+
embedded-hal = "1.0.0"
1415
rtt-target = { version = "0.3.1", features = ["cortex-m"] }
1516
nrf52840-hal = { features = ["rt"], path = "../../nrf52840-hal" }
16-
17-
[dependencies.embedded-hal]
18-
version = "0.2.3"
19-
features = ["unproven"]

0 commit comments

Comments
 (0)