embassy-usb-logger

Crates.ioembassy-usb-logger
lib.rsembassy-usb-logger
version0.2.0
sourcesrc
created_at2023-01-03 19:05:34.915646
updated_at2024-05-20 13:51:32.924436
description`log` implementation for USB serial using `embassy-usb`.
homepage
repositoryhttps://github.com/embassy-rs/embassy
max_upload_size
id750339
size10,529
Dario Nieuwenhuis (Dirbaio)

documentation

https://docs.embassy.dev/embassy-usb-logger

README

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.

#[embassy_executor::task]
async fn logger_task(driver: Driver<'static, USB>) {
   embassy_usb_logger::run!(1024, log::LevelFilter::Info, driver);
}
Commit count: 8990

cargo fmt