Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update libs #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[build]
target = "thumbv7em-none-eabihf"
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
56 changes: 28 additions & 28 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -389,29 +389,29 @@ impl Led {

/// Maps the pins to the names printed on the device
pub struct Pins {
pub a0: p0::P0_02<Input<Floating>>,
pub a1: p0::P0_03<Input<Floating>>,
pub a2: p0::P0_04<Input<Floating>>,
pub a3: p0::P0_05<Input<Floating>>,
pub a4: p0::P0_28<Input<Floating>>,
pub a5: p0::P0_29<Input<Floating>>,
pub sck: p0::P0_12<Input<Floating>>,
pub mosi: p0::P0_13<Input<Floating>>,
pub miso: p0::P0_14<Input<Floating>>,
pub dfu: p0::P0_20<Input<Floating>>,
pub frst: p0::P0_22<Input<Floating>>,
pub d16: p0::P0_16<Input<Floating>>,
pub d15: p0::P0_15<Input<Floating>>,
pub d7: p0::P0_07<Input<Floating>>,
pub d11: p0::P0_11<Input<Floating>>,
pub a7: p0::P0_31<Input<Floating>>,
pub a6: p0::P0_30<Input<Floating>>,
pub d27: p0::P0_27<Input<Floating>>,
pub scl: p0::P0_26<Input<Floating>>,
pub sda: p0::P0_25<Input<Floating>>,
pub a0: p0::P0_02<Disconnected>,
pub a1: p0::P0_03<Disconnected>,
pub a2: p0::P0_04<Disconnected>,
pub a3: p0::P0_05<Disconnected>,
pub a4: p0::P0_28<Disconnected>,
pub a5: p0::P0_29<Disconnected>,
pub sck: p0::P0_12<Disconnected>,
pub mosi: p0::P0_13<Disconnected>,
pub miso: p0::P0_14<Disconnected>,
pub dfu: p0::P0_20<Disconnected>,
pub frst: p0::P0_22<Disconnected>,
pub d16: p0::P0_16<Disconnected>,
pub d15: p0::P0_15<Disconnected>,
pub d7: p0::P0_07<Disconnected>,
pub d11: p0::P0_11<Disconnected>,
pub a7: p0::P0_31<Disconnected>,
pub a6: p0::P0_30<Disconnected>,
pub d27: p0::P0_27<Disconnected>,
pub scl: p0::P0_26<Disconnected>,
pub sda: p0::P0_25<Disconnected>,
}

pub struct NFC {
pub nfc1: p0::P0_09<Input<Floating>>,
pub nfc2: p0::P0_10<Input<Floating>>,
pub nfc1: p0::P0_09<Disconnected>,
pub nfc2: p0::P0_10<Disconnected>,
}