mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-26 07:48:06 +00:00
clarifications after test
This commit is contained in:
parent
5b11a4de97
commit
38c963e8b0
5 changed files with 11 additions and 7 deletions
|
@ -1,12 +1,14 @@
|
||||||
#![no_main]
|
#![no_main]
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
use cortex_m::asm;
|
|
||||||
use cortex_m_rt::entry;
|
use cortex_m_rt::entry;
|
||||||
use core::fmt::Write;
|
|
||||||
// this imports `down-the-stack/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 _;
|
use apps as _;
|
||||||
|
|
||||||
|
// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️
|
||||||
|
|
||||||
#[entry]
|
#[entry]
|
||||||
fn main() -> ! {
|
fn main() -> ! {
|
||||||
// to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels
|
// 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
|
// this imports `down-the-stack/apps/lib.rs` to retrieve our global logger + panicking-behavior
|
||||||
use apps as _;
|
use apps as _;
|
||||||
|
|
||||||
|
// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️
|
||||||
|
|
||||||
#[entry]
|
#[entry]
|
||||||
fn main() -> ! {
|
fn main() -> ! {
|
||||||
// to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels
|
// to enable more verbose logs, go to your `Cargo.toml` and set defmt logging levels
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
// ⚠️ ⚠️ ⚠️ Don't change this file! ⚠️ ⚠️ ⚠️
|
||||||
use panic_probe as _;
|
use panic_probe as _;
|
||||||
|
|
||||||
// same panicking *behavior* as `panic-probe` but doesn't print a panic message
|
// 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.
|
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`
|
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.
|
### Step 5: Add everything to the board struct.
|
||||||
|
|
||||||
In the definition of the board struct add a field for the `struct Buttons`
|
In the definition of the `struct Board` 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 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 -->
|
<!-- Solution Code Snippet -->
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue