mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 16:25:37 +00:00
rm button from example
This commit is contained in:
parent
a142d1579d
commit
16fbd1c39c
1 changed files with 6 additions and 4 deletions
|
@ -4,6 +4,7 @@
|
|||
use cortex_m::asm;
|
||||
use cortex_m_rt::entry;
|
||||
use core::fmt::Write;
|
||||
|
||||
// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||
use apps as _;
|
||||
|
||||
|
@ -14,16 +15,17 @@ fn main() -> ! {
|
|||
|
||||
let board = dk_bsc::init().unwrap();
|
||||
|
||||
let button_1 = board.buttons.b_1;
|
||||
let mut uarte = board.uarte;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let tx_buffer = "Hello\n";
|
||||
uarte.write_str(tx_buffer).unwrap();
|
||||
|
||||
// this program does not `exit`; use Ctrl+C to terminate it
|
||||
loop {
|
||||
if button_1.is_pushed() {
|
||||
uarte.write_str(tx_buffer).unwrap();
|
||||
}
|
||||
asm::nop();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue