mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-25 07:18:08 +00:00
commit
25cd0faf70
6 changed files with 12 additions and 21 deletions
|
@ -8,7 +8,7 @@ version = "0.0.0"
|
|||
[dependencies]
|
||||
cortex-m = {version = "0.7.6", features = ["critical-section-single-core"]}
|
||||
cortex-m-rt = "0.7.2"
|
||||
dk_template = { path = "../dk_bsc" }
|
||||
dk_bsc = { path = "../dk_bsc" }
|
||||
heapless = "0.7.16"
|
||||
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
|
||||
defmt = "0.3.2"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
use cortex_m::asm;
|
||||
use cortex_m_rt::entry;
|
||||
use core::fmt::Write;
|
||||
// this imports `beginner/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||
// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||
use apps as _;
|
||||
|
||||
#[entry]
|
||||
|
@ -26,7 +26,4 @@ fn main() -> ! {
|
|||
}
|
||||
|
||||
// this program does not `exit`; use Ctrl+C to terminate it
|
||||
loop {
|
||||
asm::nop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
use cortex_m::asm;
|
||||
use cortex_m_rt::entry;
|
||||
use core::fmt::Write;
|
||||
// this imports `beginner/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||
// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||
use apps as _;
|
||||
|
||||
#[entry]
|
||||
|
@ -20,7 +20,7 @@ fn main() -> ! {
|
|||
|
||||
let tx_buffer = "Hello\n";
|
||||
|
||||
|
||||
// this program does not `exit`; use Ctrl+C to terminate it
|
||||
loop {
|
||||
if button_1.is_pushed() {
|
||||
uarte.write_str(tx_buffer).unwrap();
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
authors = ["Jorge Aparicio <jorge.aparicio@ferrous-systems.com>", "Tanks Transfeld <tanks.transfeld@ferrous-systems.com"]
|
||||
edition = "2018"
|
||||
license = "MIT OR Apache-2.0"
|
||||
name = "dk_template"
|
||||
name = "dk_bsc"
|
||||
version = "0.0.0"
|
||||
|
||||
[dependencies]
|
||||
cortex-m = {version = "0.7.6", features = ["critical-section-single-core"]}
|
||||
cortex-m-rt = "0.7.2"
|
||||
embedded-hal = "0.2.7"
|
||||
hal = { package = "nrf52840-hal", version = "0.14.0" }
|
||||
nrf52840-hal = "0.14.0"
|
||||
panic-probe = { version = "0.3.0", features = ["print-defmt"] }
|
||||
defmt = "0.3.2"
|
||||
defmt-rtt = "0.3.2"
|
||||
|
@ -22,11 +22,3 @@ default = [
|
|||
"other-feature"
|
||||
]
|
||||
other-feature = []
|
||||
|
||||
# do NOT modify these features
|
||||
defmt-default = []
|
||||
defmt-trace = []
|
||||
defmt-debug = []
|
||||
defmt-info = []
|
||||
defmt-warn = []
|
||||
defmt-error = []
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//! Hardware Abstraction Layer (HAL) for the nRF52840 Development Kit
|
||||
//! Board Support Crate (BSC) for the nRF52840 Development Kit
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![deny(warnings)]
|
||||
#![no_std]
|
||||
|
||||
use core::{
|
||||
|
@ -13,6 +12,7 @@ use core::{
|
|||
use cortex_m::asm;
|
||||
use embedded_hal::digital::v2::{OutputPin as _, StatefulOutputPin};
|
||||
|
||||
use nrf52840_hal as hal;
|
||||
use hal::{
|
||||
gpio::{p0, Level, Output, Pin, Port, PushPull},
|
||||
timer::OneShot,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
//! Hardware Abstraction Layer (HAL) for the nRF52840 Development Kit
|
||||
//! Board Support Crate (BSC) for the nRF52840 Development Kit
|
||||
|
||||
#![deny(missing_docs)]
|
||||
#![deny(warnings)]
|
||||
#![no_std]
|
||||
|
||||
use core::{
|
||||
|
@ -13,9 +12,12 @@ use core::{
|
|||
|
||||
use cortex_m::asm;
|
||||
use embedded_hal::digital::v2::{OutputPin as _, StatefulOutputPin};
|
||||
use nrf52840_hal as hal;
|
||||
pub use hal::pac::{
|
||||
UARTE1, uarte0::{
|
||||
baudrate::BAUDRATE_A as Baudrate, config::PARITY_A as Parity}};
|
||||
|
||||
|
||||
use hal::{
|
||||
gpio::{p0, Level, Output, Input, PullUp, Pin, Port, PushPull},
|
||||
timer::OneShot, prelude::InputPin,
|
||||
|
|
Loading…
Reference in a new issue