diff options
| author | Ulf Lilleengen <[email protected]> | 2022-11-21 11:24:53 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2022-11-21 11:24:53 +0100 |
| commit | 06fb3e425198609131e149c39a2db25aaa8c273c (patch) | |
| tree | 303140f860d56290106ae96679eefb17a43f8005 /embassy-usb-logger/README.md | |
| parent | a444a65ebfcea674e74dcedc7f26a7aa37f59c69 (diff) | |
docs: add missing README for usb-logger
Diffstat (limited to 'embassy-usb-logger/README.md')
| -rw-r--r-- | embassy-usb-logger/README.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/embassy-usb-logger/README.md b/embassy-usb-logger/README.md new file mode 100644 index 000000000..81b0dcd0e --- /dev/null +++ b/embassy-usb-logger/README.md | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # embassy-usb-logger | ||
| 2 | |||
| 3 | USB implementation of the `log` crate. This logger can be used by any device that implements `embassy-usb`. When running, | ||
| 4 | it will output all logging done through the `log` facade to the USB serial peripheral. | ||
| 5 | |||
| 6 | ## Usage | ||
| 7 | |||
| 8 | Add the following embassy task to your application. The `Driver` type is different depending on which HAL you use. | ||
| 9 | |||
| 10 | ```rust | ||
| 11 | #[embassy_executor::task] | ||
| 12 | async fn logger_task(driver: Driver<'static, USB>) { | ||
| 13 | embassy_usb_logger::run!(1024, log::LevelFilter::Info, driver); | ||
| 14 | } | ||
| 15 | ``` | ||
