embedded-trainings-2020/embedded-workshop-book/src/bsc-exercise.md
2023-02-14 18:46:54 +01:00

555 B

BSC Exercise

In this exercise you will learn how to write a board support crate.

Learning goals

  • implement buttons functionality
  • impl blocks, associated functions, methods
  • generate docs!

Steps

  • add field in the board struct

  • add struct for all buttons

  • add struct for the single button

  • Read docs, section 8.7 for info about pins and pin configuration

  • add button bring up to board init

  • add doc lines every where!

  • add methods in impl block:

    • detect button push
    • add another... look at knurling book for inspiration