mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2024-05-19 00:38:10 +00:00
clarifications after test
This commit is contained in:
parent
b953d4a35f
commit
480f15fbcd
|
@ -1,12 +1,14 @@
|
|||
#![no_main]
|
||||
#![no_std]
|
||||
|
||||
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 _;
|
||||
|
||||
// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
// to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels
|
||||
|
|
|
@ -8,6 +8,8 @@ use core::fmt::Write;
|
|||
// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||
use apps as _;
|
||||
|
||||
// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
// to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#![no_std]
|
||||
|
||||
// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️
|
||||
use panic_probe as _;
|
||||
|
||||
// same panicking *behavior* as `panic-probe` but doesn't print a panic message
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
In this exercise you will learn how to write a board support crate by implementing buttons and the UARTE peripheral.
|
||||
|
||||
The template `down-the-stack/dk_bsc/src/lib.rs` already contains the LED and Timer implementations.
|
||||
The template `down-the-stack/dk_bsc/src/lib.rs` already contains the LED and Timer implementations. Add your code to the designated lines. You'll find a //todo! there.
|
||||
|
||||
You can test after each step by running the following command out of `down-the-stack/apps`
|
||||
```
|
||||
|
|
|
@ -38,8 +38,8 @@ Building this code brings up warnings about unused variables.
|
|||
|
||||
### Step 5: Add everything to the board struct.
|
||||
|
||||
In the definition of the board struct add a field for the `struct Buttons`
|
||||
In the pub `fn init()` function. Add the button field to the instantiation of the Board struct, assigning the pins you defined earlier to the respective buttons.
|
||||
In the definition of the `struct Board` add a field for the `struct Buttons`.
|
||||
In the pub `fn init()` function, where `Board` is instantiated, add the button field, assigning the pins you defined earlier to the respective buttons.
|
||||
|
||||
<!-- Solution Code Snippet -->
|
||||
|
||||
|
|
Loading…
Reference in a new issue