mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 08:15:36 +00:00
advanced/common/usb: move to defmt
This commit is contained in:
parent
9c1a7e5ee1
commit
c1d7072b7f
2 changed files with 18 additions and 2 deletions
|
@ -6,4 +6,19 @@ name = "usb"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.8"
|
defmt = "0.2.0"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
# set defmt logging levels here
|
||||||
|
default = [
|
||||||
|
"defmt-default",
|
||||||
|
# "dependency-a/defmt-trace",
|
||||||
|
]
|
||||||
|
|
||||||
|
# do NOT modify these features
|
||||||
|
defmt-default = []
|
||||||
|
defmt-trace = []
|
||||||
|
defmt-debug = []
|
||||||
|
defmt-info = []
|
||||||
|
defmt-warn = []
|
||||||
|
defmt-error = []
|
|
@ -5,6 +5,7 @@
|
||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
use core::num::NonZeroU8;
|
use core::num::NonZeroU8;
|
||||||
|
use defmt;
|
||||||
|
|
||||||
/// Device address assigned by the host; will be in the range 1..=127
|
/// Device address assigned by the host; will be in the range 1..=127
|
||||||
pub type Address = NonZeroU8;
|
pub type Address = NonZeroU8;
|
||||||
|
@ -78,7 +79,7 @@ impl Request {
|
||||||
Err(())
|
Err(())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log::warn!("unhandled case in `Request` parser");
|
defmt::warn!("unhandled case in `Request` parser");
|
||||||
Err(())
|
Err(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue