mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 16:25:37 +00:00
add notes to bsc exercise
This commit is contained in:
parent
e98ddd23e5
commit
028a850596
1 changed files with 13 additions and 2 deletions
|
@ -1,16 +1,19 @@
|
||||||
# BSC Exercise
|
# BSC Exercise
|
||||||
|
|
||||||
In this exercise you will learn how to write a board support crate.
|
In this exercise you will learn how to write a board support crate.
|
||||||
|
The bsc template will already contain the led and timer implementation.
|
||||||
|
The radio and USB/Power implementations will be deleted, because that just takes up unnecessary space and adds to confusion.
|
||||||
|
|
||||||
|
|
||||||
## Learning goals
|
## Learning goals
|
||||||
* implement buttons functionality
|
* implement buttons functionality
|
||||||
|
* uarte implementation
|
||||||
* impl blocks, associated functions, methods
|
* impl blocks, associated functions, methods
|
||||||
* generate docs!
|
* generate docs!
|
||||||
|
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
|
### Write a button implementation
|
||||||
* add field in the board struct
|
* add field in the board struct
|
||||||
* add struct for all buttons
|
* add struct for all buttons
|
||||||
* add struct for the single button
|
* add struct for the single button
|
||||||
|
@ -21,6 +24,14 @@ In this exercise you will learn how to write a board support crate.
|
||||||
* add doc lines every where!
|
* add doc lines every where!
|
||||||
* add methods in impl block:
|
* add methods in impl block:
|
||||||
* detect button push
|
* detect button push
|
||||||
* add another... look at knurling book for inspiration
|
* debounce button function? like in knurling session, requires implementation of a second timer, just for this?
|
||||||
|
|
||||||
|
### Write Uarte implementation
|
||||||
|
* add field to the board struct
|
||||||
|
* add struct for the instance, how to figure out what the type of the inner field is
|
||||||
|
* create instance in init, add baudrate, parity etc.
|
||||||
|
* add to instantiation of board struct
|
||||||
|
* impl fmt::Write for the Uarte struct, simple write does not work because of dma
|
||||||
|
* example code with button is not a good idea for the simple button implementation.
|
||||||
|
|
||||||
|
I think this is plenty for an hour.
|
Loading…
Reference in a new issue