-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add missing README for usb-logger
- Loading branch information
Ulf Lilleengen
committed
Nov 21, 2022
1 parent
a444a65
commit 06fb3e4
Showing
1 changed file
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# embassy-usb-logger | ||
|
||
USB implementation of the `log` crate. This logger can be used by any device that implements `embassy-usb`. When running, | ||
it will output all logging done through the `log` facade to the USB serial peripheral. | ||
|
||
## Usage | ||
|
||
Add the following embassy task to your application. The `Driver` type is different depending on which HAL you use. | ||
|
||
```rust | ||
#[embassy_executor::task] | ||
async fn logger_task(driver: Driver<'static, USB>) { | ||
embassy_usb_logger::run!(1024, log::LevelFilter::Info, driver); | ||
} | ||
``` |