Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirbaio committed Mar 1, 2021
1 parent 67a6c4f commit f8c4344
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 1 addition & 3 deletions embassy-nrf-examples/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ rustflags = [
"-C", "link-arg=-Tdefmt.x",

# Code-size optimizations.
"-Z", "trap-unreachable=no",
"-C", "inline-threshold=5",
"-C", "no-vectorize-loops",
"-C", "force-frame-pointers=no",
]

[build]
Expand Down
2 changes: 1 addition & 1 deletion embassy-nrf-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt",
defmt = "0.2.0"
defmt-rtt = "0.2.0"

cortex-m = { version = "0.7.1", features = ["inline-asm"] }
cortex-m = { version = "0.7.1" }
cortex-m-rt = "0.6.13"
embedded-hal = { version = "0.2.4" }
panic-probe = "0.1.0"
Expand Down
6 changes: 6 additions & 0 deletions embassy-nrf-examples/src/bin/rtc_async.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![no_std]
#![no_main]
#![feature(type_alias_impl_trait)]
#![feature(asm)]

#[path = "../example_common.rs"]
mod example_common;
Expand All @@ -20,6 +21,7 @@ async fn run1() {
loop {
info!("BIG INFREQUENT TICK");
Timer::after(Duration::from_ticks(64000)).await;
unsafe { asm!("udf 0xfe") }
}
}

Expand All @@ -39,6 +41,10 @@ static EXECUTOR: Forever<Executor> = Forever::new();
fn main() -> ! {
info!("Hello World!");

real_main();
}

fn real_main() -> ! {
let p = unwrap!(embassy_nrf::pac::Peripherals::take());

clocks::Clocks::new(p.CLOCK)
Expand Down

0 comments on commit f8c4344

Please # to comment.