From 06fb3e425198609131e149c39a2db25aaa8c273c Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Mon, 21 Nov 2022 11:24:53 +0100 Subject: [PATCH] docs: add missing README for usb-logger --- embassy-usb-logger/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 embassy-usb-logger/README.md 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 @@ +# 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); +} +```