We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bec5093 commit 495c09aCopy full SHA for 495c09a
src/macros.rs
@@ -0,0 +1,24 @@
1
+#[cfg(feature = "log")]
2
+macro_rules! usb_log {
3
+ (trace, $($arg:expr),*) => { log::trace!($($arg),*) };
4
+ (debug, $($arg:expr),*) => { log::trace!($($arg),*) };
5
+}
6
+
7
+#[cfg(feature = "defmt")]
8
+macro_rules! net_log {
9
+ (trace, $($arg:expr),*) => { defmt::trace!($($arg),*) };
10
+ (debug, $($arg:expr),*) => { defmt::debug!($($arg),*) };
11
12
13
+#[cfg(not(any(feature = "log", feature = "defmt")))]
14
15
+ ($level:ident, $($arg:expr),*) => {{ $( let _ = $arg; )* }}
16
17
18
+macro_rules! usb_trace {
19
+ ($($arg:expr),*) => (usb_log!(trace, $($arg),*));
20
21
22
+macro_rules! usb_debug {
23
+ ($($arg:expr),*) => (usb_log!(debug, $($arg),*));
24
0 commit comments