clarifications after test

This commit is contained in:
Mirabellensaft 2023-03-10 17:13:28 +01:00
parent b953d4a35f
commit 480f15fbcd
5 changed files with 11 additions and 7 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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`
```
@ -10,7 +10,7 @@ cargo run --bin hello
```
This program will not call any of the functions you are implementing, so it does not matter if they are incomplete. It will refuse to build if there are errors present in the `lib.rs`!
`down-the-stack/dk_bsc/src/lib_solution.rs` contains the full solution code.
`down-the-stack/dk_bsc/src/lib_solution.rs` contains the full solution code.
Note for trainer: Introduction to the exercise is a guided tour through the template, and it's architecture. Make the participants aware of the placeholders for their implementations. run the hello example on the unmodified lib.

View file

@ -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 -->