diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 0000000..5d10902 --- /dev/null +++ b/.cargo/config @@ -0,0 +1,2 @@ +[build] +target = "thumbv7em-none-eabihf" diff --git a/Cargo.toml b/Cargo.toml index 9009d26..566d8f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,12 +9,12 @@ version = "0.0.1" edition = "2018" [dependencies] -nrf52832-hal = "0.10.0" +nrf52832-hal = "0.15.0" [dev-dependencies] -cortex-m-rt = "0.6.12" +cortex-m-rt = "0.7.1" panic-halt = "0.2.0" -nb = "~0.1" +nb = "1.0.0" [features] rt = ["nrf52832-hal/rt"] diff --git a/src/lib.rs b/src/lib.rs index 91d0268..498fb51 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,17 +1,17 @@ #![no_std] -pub mod prelude { - pub use nrf52832_hal::prelude::*; -} - use nrf52832_hal::{ - gpio::{p0, Floating, Input, Level, Output, Pin, PushPull}, + gpio::{Level, Output, p0, Pin, PushPull}, pac::{self as pac, CorePeripherals, Peripherals}, uarte, Uarte, }; - +use nrf52832_hal::gpio::Disconnected; use nrf52832_hal::prelude::OutputPin; +pub mod prelude { + pub use nrf52832_hal::prelude::*; +} + #[allow(non_snake_case)] pub struct Board { pub pins: Pins, @@ -389,29 +389,29 @@ impl Led { /// Maps the pins to the names printed on the device pub struct Pins { - pub a0: p0::P0_02>, - pub a1: p0::P0_03>, - pub a2: p0::P0_04>, - pub a3: p0::P0_05>, - pub a4: p0::P0_28>, - pub a5: p0::P0_29>, - pub sck: p0::P0_12>, - pub mosi: p0::P0_13>, - pub miso: p0::P0_14>, - pub dfu: p0::P0_20>, - pub frst: p0::P0_22>, - pub d16: p0::P0_16>, - pub d15: p0::P0_15>, - pub d7: p0::P0_07>, - pub d11: p0::P0_11>, - pub a7: p0::P0_31>, - pub a6: p0::P0_30>, - pub d27: p0::P0_27>, - pub scl: p0::P0_26>, - pub sda: p0::P0_25>, + pub a0: p0::P0_02, + pub a1: p0::P0_03, + pub a2: p0::P0_04, + pub a3: p0::P0_05, + pub a4: p0::P0_28, + pub a5: p0::P0_29, + pub sck: p0::P0_12, + pub mosi: p0::P0_13, + pub miso: p0::P0_14, + pub dfu: p0::P0_20, + pub frst: p0::P0_22, + pub d16: p0::P0_16, + pub d15: p0::P0_15, + pub d7: p0::P0_07, + pub d11: p0::P0_11, + pub a7: p0::P0_31, + pub a6: p0::P0_30, + pub d27: p0::P0_27, + pub scl: p0::P0_26, + pub sda: p0::P0_25, } pub struct NFC { - pub nfc1: p0::P0_09>, - pub nfc2: p0::P0_10>, + pub nfc1: p0::P0_09, + pub nfc2: p0::P0_10, }