mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Fix formatting
This commit is contained in:
parent
03bf72f690
commit
2c6b475f4e
@ -111,7 +111,7 @@ impl<const N: usize> UsbLogger<N> {
|
|||||||
|
|
||||||
/// Creates the futures needed for the logger from a given class
|
/// Creates the futures needed for the logger from a given class
|
||||||
/// This can be used in cases where the usb device is already in use for another connection
|
/// This can be used in cases where the usb device is already in use for another connection
|
||||||
pub async fn create_future_from_class<'d, D>(&'d self, class: CdcAcmClass<'d, D> )
|
pub async fn create_future_from_class<'d, D>(&'d self, class: CdcAcmClass<'d, D>)
|
||||||
where
|
where
|
||||||
D: Driver<'d>,
|
D: Driver<'d>,
|
||||||
{
|
{
|
||||||
@ -204,13 +204,11 @@ macro_rules! run {
|
|||||||
/// This macro should only be invoked only once since it is setting the global logging state of the application.
|
/// This macro should only be invoked only once since it is setting the global logging state of the application.
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! with_class {
|
macro_rules! with_class {
|
||||||
( $x:expr, $l:expr, $p:ident ) => {
|
( $x:expr, $l:expr, $p:ident ) => {{
|
||||||
{
|
|
||||||
static LOGGER: ::embassy_usb_logger::UsbLogger<$x> = ::embassy_usb_logger::UsbLogger::new();
|
static LOGGER: ::embassy_usb_logger::UsbLogger<$x> = ::embassy_usb_logger::UsbLogger::new();
|
||||||
unsafe {
|
unsafe {
|
||||||
let _ = ::log::set_logger_racy(&LOGGER).map(|()| log::set_max_level_racy($l));
|
let _ = ::log::set_logger_racy(&LOGGER).map(|()| log::set_max_level_racy($l));
|
||||||
}
|
}
|
||||||
LOGGER.create_future_from_class($p)
|
LOGGER.create_future_from_class($p)
|
||||||
}
|
}};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user