mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 08:15:36 +00:00
correct logging
This commit is contained in:
parent
1449e1a019
commit
74bdeb3665
3 changed files with 9 additions and 16 deletions
|
@ -34,12 +34,11 @@ opt-level = 3
|
|||
overflow-checks = false
|
||||
|
||||
[features]
|
||||
# set defmt logging levels here
|
||||
default = [
|
||||
"defmt-default",
|
||||
# "dependency-a/defmt-trace",
|
||||
]
|
||||
|
||||
default = [
|
||||
"other-feature"
|
||||
]
|
||||
other-feature = []
|
||||
# do NOT modify these features
|
||||
defmt-default = []
|
||||
defmt-trace = []
|
||||
|
|
|
@ -18,11 +18,10 @@ defmt-rtt = "0.3.1"
|
|||
advanced = []
|
||||
beginner = []
|
||||
|
||||
# set defmt logging levels here
|
||||
default = [
|
||||
"defmt-info",
|
||||
# "dependency-a/defmt-trace",
|
||||
"other-feature"
|
||||
]
|
||||
other-feature = []
|
||||
|
||||
# do NOT modify these features
|
||||
defmt-default = []
|
||||
|
|
|
@ -28,15 +28,10 @@ $ cargo doc -p dk --open
|
|||
|
||||
✅ Check the API docs of the `Led` abstraction. Change the `led` program, so that the bottom two LEDs are turned on, and the top two are turned off.
|
||||
|
||||
🔎 If you want to see logs from Led API of the `dk` Hardware Abstraction Layer, go to `boards/dk/Cargo.toml` and change the log level of the `dk` crate:
|
||||
🔎 If you want to see logs from Led API of the `dk` Hardware Abstraction Layer, flash the dk with the following environment variable:
|
||||
|
||||
```diff
|
||||
# set defmt logging levels here
|
||||
default = [
|
||||
- "defmt-debug",
|
||||
+ "defmt-trace",
|
||||
# "dependency-a/defmt-trace",
|
||||
]
|
||||
```console
|
||||
$ DEFMT_LOG=trace cargo run --bin led
|
||||
```
|
||||
|
||||
Among the logs you'll find the line "I/O pins have been configured for digital output". At this point the electrical pins of the nRF52840 microcontroller have been configured to drive the 4 LEDs on the board.
|
||||
|
|
Loading…
Reference in a new issue