diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-06-07 03:15:05 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-06-07 03:15:05 +0200 |
| commit | ef1ebefec0c682553213406b3e59a30a79520291 (patch) | |
| tree | 023a3ebc473783f2422594182e575ed8cd46d125 | |
| parent | e7dc5c0939d30ccba98418c42799c4e39f646d23 (diff) | |
fmt: use absolute paths
| -rw-r--r-- | embassy-extras/src/fmt.rs | 58 | ||||
| -rw-r--r-- | embassy-net/src/fmt.rs | 58 | ||||
| -rw-r--r-- | embassy-nrf/src/fmt.rs | 58 | ||||
| -rw-r--r-- | embassy-rp/src/fmt.rs | 58 | ||||
| -rw-r--r-- | embassy-stm32/src/fmt.rs | 58 | ||||
| -rw-r--r-- | embassy/src/fmt.rs | 58 |
6 files changed, 174 insertions, 174 deletions
diff --git a/embassy-extras/src/fmt.rs b/embassy-extras/src/fmt.rs index 6c5063f7c..2646c57ab 100644 --- a/embassy-extras/src/fmt.rs +++ b/embassy-extras/src/fmt.rs | |||
| @@ -8,9 +8,9 @@ macro_rules! assert { | |||
| 8 | ($($x:tt)*) => { | 8 | ($($x:tt)*) => { |
| 9 | { | 9 | { |
| 10 | #[cfg(not(feature = "defmt"))] | 10 | #[cfg(not(feature = "defmt"))] |
| 11 | core::assert!($($x)*); | 11 | ::core::assert!($($x)*); |
| 12 | #[cfg(feature = "defmt")] | 12 | #[cfg(feature = "defmt")] |
| 13 | defmt::assert!($($x)*); | 13 | ::defmt::assert!($($x)*); |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | } | 16 | } |
| @@ -19,9 +19,9 @@ macro_rules! assert_eq { | |||
| 19 | ($($x:tt)*) => { | 19 | ($($x:tt)*) => { |
| 20 | { | 20 | { |
| 21 | #[cfg(not(feature = "defmt"))] | 21 | #[cfg(not(feature = "defmt"))] |
| 22 | core::assert_eq!($($x)*); | 22 | ::core::assert_eq!($($x)*); |
| 23 | #[cfg(feature = "defmt")] | 23 | #[cfg(feature = "defmt")] |
| 24 | defmt::assert_eq!($($x)*); | 24 | ::defmt::assert_eq!($($x)*); |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } |
| @@ -30,9 +30,9 @@ macro_rules! assert_ne { | |||
| 30 | ($($x:tt)*) => { | 30 | ($($x:tt)*) => { |
| 31 | { | 31 | { |
| 32 | #[cfg(not(feature = "defmt"))] | 32 | #[cfg(not(feature = "defmt"))] |
| 33 | core::assert_ne!($($x)*); | 33 | ::core::assert_ne!($($x)*); |
| 34 | #[cfg(feature = "defmt")] | 34 | #[cfg(feature = "defmt")] |
| 35 | defmt::assert_ne!($($x)*); | 35 | ::defmt::assert_ne!($($x)*); |
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | } | 38 | } |
| @@ -41,9 +41,9 @@ macro_rules! debug_assert { | |||
| 41 | ($($x:tt)*) => { | 41 | ($($x:tt)*) => { |
| 42 | { | 42 | { |
| 43 | #[cfg(not(feature = "defmt"))] | 43 | #[cfg(not(feature = "defmt"))] |
| 44 | core::debug_assert!($($x)*); | 44 | ::core::debug_assert!($($x)*); |
| 45 | #[cfg(feature = "defmt")] | 45 | #[cfg(feature = "defmt")] |
| 46 | defmt::debug_assert!($($x)*); | 46 | ::defmt::debug_assert!($($x)*); |
| 47 | } | 47 | } |
| 48 | }; | 48 | }; |
| 49 | } | 49 | } |
| @@ -52,9 +52,9 @@ macro_rules! debug_assert_eq { | |||
| 52 | ($($x:tt)*) => { | 52 | ($($x:tt)*) => { |
| 53 | { | 53 | { |
| 54 | #[cfg(not(feature = "defmt"))] | 54 | #[cfg(not(feature = "defmt"))] |
| 55 | core::debug_assert_eq!($($x)*); | 55 | ::core::debug_assert_eq!($($x)*); |
| 56 | #[cfg(feature = "defmt")] | 56 | #[cfg(feature = "defmt")] |
| 57 | defmt::debug_assert_eq!($($x)*); | 57 | ::defmt::debug_assert_eq!($($x)*); |
| 58 | } | 58 | } |
| 59 | }; | 59 | }; |
| 60 | } | 60 | } |
| @@ -63,9 +63,9 @@ macro_rules! debug_assert_ne { | |||
| 63 | ($($x:tt)*) => { | 63 | ($($x:tt)*) => { |
| 64 | { | 64 | { |
| 65 | #[cfg(not(feature = "defmt"))] | 65 | #[cfg(not(feature = "defmt"))] |
| 66 | core::debug_assert_ne!($($x)*); | 66 | ::core::debug_assert_ne!($($x)*); |
| 67 | #[cfg(feature = "defmt")] | 67 | #[cfg(feature = "defmt")] |
| 68 | defmt::debug_assert_ne!($($x)*); | 68 | ::defmt::debug_assert_ne!($($x)*); |
| 69 | } | 69 | } |
| 70 | }; | 70 | }; |
| 71 | } | 71 | } |
| @@ -74,9 +74,9 @@ macro_rules! todo { | |||
| 74 | ($($x:tt)*) => { | 74 | ($($x:tt)*) => { |
| 75 | { | 75 | { |
| 76 | #[cfg(not(feature = "defmt"))] | 76 | #[cfg(not(feature = "defmt"))] |
| 77 | core::todo!($($x)*); | 77 | ::core::todo!($($x)*); |
| 78 | #[cfg(feature = "defmt")] | 78 | #[cfg(feature = "defmt")] |
| 79 | defmt::todo!($($x)*); | 79 | ::defmt::todo!($($x)*); |
| 80 | } | 80 | } |
| 81 | }; | 81 | }; |
| 82 | } | 82 | } |
| @@ -85,9 +85,9 @@ macro_rules! unreachable { | |||
| 85 | ($($x:tt)*) => { | 85 | ($($x:tt)*) => { |
| 86 | { | 86 | { |
| 87 | #[cfg(not(feature = "defmt"))] | 87 | #[cfg(not(feature = "defmt"))] |
| 88 | core::unreachable!($($x)*); | 88 | ::core::unreachable!($($x)*); |
| 89 | #[cfg(feature = "defmt")] | 89 | #[cfg(feature = "defmt")] |
| 90 | defmt::unreachable!($($x)*); | 90 | ::defmt::unreachable!($($x)*); |
| 91 | } | 91 | } |
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| @@ -96,9 +96,9 @@ macro_rules! panic { | |||
| 96 | ($($x:tt)*) => { | 96 | ($($x:tt)*) => { |
| 97 | { | 97 | { |
| 98 | #[cfg(not(feature = "defmt"))] | 98 | #[cfg(not(feature = "defmt"))] |
| 99 | core::panic!($($x)*); | 99 | ::core::panic!($($x)*); |
| 100 | #[cfg(feature = "defmt")] | 100 | #[cfg(feature = "defmt")] |
| 101 | defmt::panic!($($x)*); | 101 | ::defmt::panic!($($x)*); |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| @@ -107,9 +107,9 @@ macro_rules! trace { | |||
| 107 | ($($x:tt)*) => { | 107 | ($($x:tt)*) => { |
| 108 | { | 108 | { |
| 109 | #[cfg(feature = "log")] | 109 | #[cfg(feature = "log")] |
| 110 | log::trace!($($x)*); | 110 | ::log::trace!($($x)*); |
| 111 | #[cfg(feature = "defmt")] | 111 | #[cfg(feature = "defmt")] |
| 112 | defmt::trace!($($x)*); | 112 | ::defmt::trace!($($x)*); |
| 113 | } | 113 | } |
| 114 | }; | 114 | }; |
| 115 | } | 115 | } |
| @@ -118,9 +118,9 @@ macro_rules! debug { | |||
| 118 | ($($x:tt)*) => { | 118 | ($($x:tt)*) => { |
| 119 | { | 119 | { |
| 120 | #[cfg(fevature = "log")] | 120 | #[cfg(fevature = "log")] |
| 121 | log::debug!($($x)*); | 121 | ::log::debug!($($x)*); |
| 122 | #[cfg(feature = "defmt")] | 122 | #[cfg(feature = "defmt")] |
| 123 | defmt::debug!($($x)*); | 123 | ::defmt::debug!($($x)*); |
| 124 | } | 124 | } |
| 125 | }; | 125 | }; |
| 126 | } | 126 | } |
| @@ -129,9 +129,9 @@ macro_rules! info { | |||
| 129 | ($($x:tt)*) => { | 129 | ($($x:tt)*) => { |
| 130 | { | 130 | { |
| 131 | #[cfg(feature = "log")] | 131 | #[cfg(feature = "log")] |
| 132 | log::info!($($x)*); | 132 | ::log::info!($($x)*); |
| 133 | #[cfg(feature = "defmt")] | 133 | #[cfg(feature = "defmt")] |
| 134 | defmt::info!($($x)*); | 134 | ::defmt::info!($($x)*); |
| 135 | } | 135 | } |
| 136 | }; | 136 | }; |
| 137 | } | 137 | } |
| @@ -140,9 +140,9 @@ macro_rules! warn { | |||
| 140 | ($($x:tt)*) => { | 140 | ($($x:tt)*) => { |
| 141 | { | 141 | { |
| 142 | #[cfg(feature = "log")] | 142 | #[cfg(feature = "log")] |
| 143 | log::warn!($($x)*); | 143 | ::log::warn!($($x)*); |
| 144 | #[cfg(feature = "defmt")] | 144 | #[cfg(feature = "defmt")] |
| 145 | defmt::warn!($($x)*); | 145 | ::defmt::warn!($($x)*); |
| 146 | } | 146 | } |
| 147 | }; | 147 | }; |
| 148 | } | 148 | } |
| @@ -151,9 +151,9 @@ macro_rules! error { | |||
| 151 | ($($x:tt)*) => { | 151 | ($($x:tt)*) => { |
| 152 | { | 152 | { |
| 153 | #[cfg(feature = "log")] | 153 | #[cfg(feature = "log")] |
| 154 | log::error!($($x)*); | 154 | ::log::error!($($x)*); |
| 155 | #[cfg(feature = "defmt")] | 155 | #[cfg(feature = "defmt")] |
| 156 | defmt::error!($($x)*); | 156 | ::defmt::error!($($x)*); |
| 157 | } | 157 | } |
| 158 | }; | 158 | }; |
| 159 | } | 159 | } |
| @@ -161,7 +161,7 @@ macro_rules! error { | |||
| 161 | #[cfg(feature = "defmt")] | 161 | #[cfg(feature = "defmt")] |
| 162 | macro_rules! unwrap { | 162 | macro_rules! unwrap { |
| 163 | ($($x:tt)*) => { | 163 | ($($x:tt)*) => { |
| 164 | defmt::unwrap!($($x)*) | 164 | ::defmt::unwrap!($($x)*) |
| 165 | }; | 165 | }; |
| 166 | } | 166 | } |
| 167 | 167 | ||
diff --git a/embassy-net/src/fmt.rs b/embassy-net/src/fmt.rs index 6c5063f7c..2646c57ab 100644 --- a/embassy-net/src/fmt.rs +++ b/embassy-net/src/fmt.rs | |||
| @@ -8,9 +8,9 @@ macro_rules! assert { | |||
| 8 | ($($x:tt)*) => { | 8 | ($($x:tt)*) => { |
| 9 | { | 9 | { |
| 10 | #[cfg(not(feature = "defmt"))] | 10 | #[cfg(not(feature = "defmt"))] |
| 11 | core::assert!($($x)*); | 11 | ::core::assert!($($x)*); |
| 12 | #[cfg(feature = "defmt")] | 12 | #[cfg(feature = "defmt")] |
| 13 | defmt::assert!($($x)*); | 13 | ::defmt::assert!($($x)*); |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | } | 16 | } |
| @@ -19,9 +19,9 @@ macro_rules! assert_eq { | |||
| 19 | ($($x:tt)*) => { | 19 | ($($x:tt)*) => { |
| 20 | { | 20 | { |
| 21 | #[cfg(not(feature = "defmt"))] | 21 | #[cfg(not(feature = "defmt"))] |
| 22 | core::assert_eq!($($x)*); | 22 | ::core::assert_eq!($($x)*); |
| 23 | #[cfg(feature = "defmt")] | 23 | #[cfg(feature = "defmt")] |
| 24 | defmt::assert_eq!($($x)*); | 24 | ::defmt::assert_eq!($($x)*); |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } |
| @@ -30,9 +30,9 @@ macro_rules! assert_ne { | |||
| 30 | ($($x:tt)*) => { | 30 | ($($x:tt)*) => { |
| 31 | { | 31 | { |
| 32 | #[cfg(not(feature = "defmt"))] | 32 | #[cfg(not(feature = "defmt"))] |
| 33 | core::assert_ne!($($x)*); | 33 | ::core::assert_ne!($($x)*); |
| 34 | #[cfg(feature = "defmt")] | 34 | #[cfg(feature = "defmt")] |
| 35 | defmt::assert_ne!($($x)*); | 35 | ::defmt::assert_ne!($($x)*); |
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | } | 38 | } |
| @@ -41,9 +41,9 @@ macro_rules! debug_assert { | |||
| 41 | ($($x:tt)*) => { | 41 | ($($x:tt)*) => { |
| 42 | { | 42 | { |
| 43 | #[cfg(not(feature = "defmt"))] | 43 | #[cfg(not(feature = "defmt"))] |
| 44 | core::debug_assert!($($x)*); | 44 | ::core::debug_assert!($($x)*); |
| 45 | #[cfg(feature = "defmt")] | 45 | #[cfg(feature = "defmt")] |
| 46 | defmt::debug_assert!($($x)*); | 46 | ::defmt::debug_assert!($($x)*); |
| 47 | } | 47 | } |
| 48 | }; | 48 | }; |
| 49 | } | 49 | } |
| @@ -52,9 +52,9 @@ macro_rules! debug_assert_eq { | |||
| 52 | ($($x:tt)*) => { | 52 | ($($x:tt)*) => { |
| 53 | { | 53 | { |
| 54 | #[cfg(not(feature = "defmt"))] | 54 | #[cfg(not(feature = "defmt"))] |
| 55 | core::debug_assert_eq!($($x)*); | 55 | ::core::debug_assert_eq!($($x)*); |
| 56 | #[cfg(feature = "defmt")] | 56 | #[cfg(feature = "defmt")] |
| 57 | defmt::debug_assert_eq!($($x)*); | 57 | ::defmt::debug_assert_eq!($($x)*); |
| 58 | } | 58 | } |
| 59 | }; | 59 | }; |
| 60 | } | 60 | } |
| @@ -63,9 +63,9 @@ macro_rules! debug_assert_ne { | |||
| 63 | ($($x:tt)*) => { | 63 | ($($x:tt)*) => { |
| 64 | { | 64 | { |
| 65 | #[cfg(not(feature = "defmt"))] | 65 | #[cfg(not(feature = "defmt"))] |
| 66 | core::debug_assert_ne!($($x)*); | 66 | ::core::debug_assert_ne!($($x)*); |
| 67 | #[cfg(feature = "defmt")] | 67 | #[cfg(feature = "defmt")] |
| 68 | defmt::debug_assert_ne!($($x)*); | 68 | ::defmt::debug_assert_ne!($($x)*); |
| 69 | } | 69 | } |
| 70 | }; | 70 | }; |
| 71 | } | 71 | } |
| @@ -74,9 +74,9 @@ macro_rules! todo { | |||
| 74 | ($($x:tt)*) => { | 74 | ($($x:tt)*) => { |
| 75 | { | 75 | { |
| 76 | #[cfg(not(feature = "defmt"))] | 76 | #[cfg(not(feature = "defmt"))] |
| 77 | core::todo!($($x)*); | 77 | ::core::todo!($($x)*); |
| 78 | #[cfg(feature = "defmt")] | 78 | #[cfg(feature = "defmt")] |
| 79 | defmt::todo!($($x)*); | 79 | ::defmt::todo!($($x)*); |
| 80 | } | 80 | } |
| 81 | }; | 81 | }; |
| 82 | } | 82 | } |
| @@ -85,9 +85,9 @@ macro_rules! unreachable { | |||
| 85 | ($($x:tt)*) => { | 85 | ($($x:tt)*) => { |
| 86 | { | 86 | { |
| 87 | #[cfg(not(feature = "defmt"))] | 87 | #[cfg(not(feature = "defmt"))] |
| 88 | core::unreachable!($($x)*); | 88 | ::core::unreachable!($($x)*); |
| 89 | #[cfg(feature = "defmt")] | 89 | #[cfg(feature = "defmt")] |
| 90 | defmt::unreachable!($($x)*); | 90 | ::defmt::unreachable!($($x)*); |
| 91 | } | 91 | } |
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| @@ -96,9 +96,9 @@ macro_rules! panic { | |||
| 96 | ($($x:tt)*) => { | 96 | ($($x:tt)*) => { |
| 97 | { | 97 | { |
| 98 | #[cfg(not(feature = "defmt"))] | 98 | #[cfg(not(feature = "defmt"))] |
| 99 | core::panic!($($x)*); | 99 | ::core::panic!($($x)*); |
| 100 | #[cfg(feature = "defmt")] | 100 | #[cfg(feature = "defmt")] |
| 101 | defmt::panic!($($x)*); | 101 | ::defmt::panic!($($x)*); |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| @@ -107,9 +107,9 @@ macro_rules! trace { | |||
| 107 | ($($x:tt)*) => { | 107 | ($($x:tt)*) => { |
| 108 | { | 108 | { |
| 109 | #[cfg(feature = "log")] | 109 | #[cfg(feature = "log")] |
| 110 | log::trace!($($x)*); | 110 | ::log::trace!($($x)*); |
| 111 | #[cfg(feature = "defmt")] | 111 | #[cfg(feature = "defmt")] |
| 112 | defmt::trace!($($x)*); | 112 | ::defmt::trace!($($x)*); |
| 113 | } | 113 | } |
| 114 | }; | 114 | }; |
| 115 | } | 115 | } |
| @@ -118,9 +118,9 @@ macro_rules! debug { | |||
| 118 | ($($x:tt)*) => { | 118 | ($($x:tt)*) => { |
| 119 | { | 119 | { |
| 120 | #[cfg(fevature = "log")] | 120 | #[cfg(fevature = "log")] |
| 121 | log::debug!($($x)*); | 121 | ::log::debug!($($x)*); |
| 122 | #[cfg(feature = "defmt")] | 122 | #[cfg(feature = "defmt")] |
| 123 | defmt::debug!($($x)*); | 123 | ::defmt::debug!($($x)*); |
| 124 | } | 124 | } |
| 125 | }; | 125 | }; |
| 126 | } | 126 | } |
| @@ -129,9 +129,9 @@ macro_rules! info { | |||
| 129 | ($($x:tt)*) => { | 129 | ($($x:tt)*) => { |
| 130 | { | 130 | { |
| 131 | #[cfg(feature = "log")] | 131 | #[cfg(feature = "log")] |
| 132 | log::info!($($x)*); | 132 | ::log::info!($($x)*); |
| 133 | #[cfg(feature = "defmt")] | 133 | #[cfg(feature = "defmt")] |
| 134 | defmt::info!($($x)*); | 134 | ::defmt::info!($($x)*); |
| 135 | } | 135 | } |
| 136 | }; | 136 | }; |
| 137 | } | 137 | } |
| @@ -140,9 +140,9 @@ macro_rules! warn { | |||
| 140 | ($($x:tt)*) => { | 140 | ($($x:tt)*) => { |
| 141 | { | 141 | { |
| 142 | #[cfg(feature = "log")] | 142 | #[cfg(feature = "log")] |
| 143 | log::warn!($($x)*); | 143 | ::log::warn!($($x)*); |
| 144 | #[cfg(feature = "defmt")] | 144 | #[cfg(feature = "defmt")] |
| 145 | defmt::warn!($($x)*); | 145 | ::defmt::warn!($($x)*); |
| 146 | } | 146 | } |
| 147 | }; | 147 | }; |
| 148 | } | 148 | } |
| @@ -151,9 +151,9 @@ macro_rules! error { | |||
| 151 | ($($x:tt)*) => { | 151 | ($($x:tt)*) => { |
| 152 | { | 152 | { |
| 153 | #[cfg(feature = "log")] | 153 | #[cfg(feature = "log")] |
| 154 | log::error!($($x)*); | 154 | ::log::error!($($x)*); |
| 155 | #[cfg(feature = "defmt")] | 155 | #[cfg(feature = "defmt")] |
| 156 | defmt::error!($($x)*); | 156 | ::defmt::error!($($x)*); |
| 157 | } | 157 | } |
| 158 | }; | 158 | }; |
| 159 | } | 159 | } |
| @@ -161,7 +161,7 @@ macro_rules! error { | |||
| 161 | #[cfg(feature = "defmt")] | 161 | #[cfg(feature = "defmt")] |
| 162 | macro_rules! unwrap { | 162 | macro_rules! unwrap { |
| 163 | ($($x:tt)*) => { | 163 | ($($x:tt)*) => { |
| 164 | defmt::unwrap!($($x)*) | 164 | ::defmt::unwrap!($($x)*) |
| 165 | }; | 165 | }; |
| 166 | } | 166 | } |
| 167 | 167 | ||
diff --git a/embassy-nrf/src/fmt.rs b/embassy-nrf/src/fmt.rs index 6c5063f7c..2646c57ab 100644 --- a/embassy-nrf/src/fmt.rs +++ b/embassy-nrf/src/fmt.rs | |||
| @@ -8,9 +8,9 @@ macro_rules! assert { | |||
| 8 | ($($x:tt)*) => { | 8 | ($($x:tt)*) => { |
| 9 | { | 9 | { |
| 10 | #[cfg(not(feature = "defmt"))] | 10 | #[cfg(not(feature = "defmt"))] |
| 11 | core::assert!($($x)*); | 11 | ::core::assert!($($x)*); |
| 12 | #[cfg(feature = "defmt")] | 12 | #[cfg(feature = "defmt")] |
| 13 | defmt::assert!($($x)*); | 13 | ::defmt::assert!($($x)*); |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | } | 16 | } |
| @@ -19,9 +19,9 @@ macro_rules! assert_eq { | |||
| 19 | ($($x:tt)*) => { | 19 | ($($x:tt)*) => { |
| 20 | { | 20 | { |
| 21 | #[cfg(not(feature = "defmt"))] | 21 | #[cfg(not(feature = "defmt"))] |
| 22 | core::assert_eq!($($x)*); | 22 | ::core::assert_eq!($($x)*); |
| 23 | #[cfg(feature = "defmt")] | 23 | #[cfg(feature = "defmt")] |
| 24 | defmt::assert_eq!($($x)*); | 24 | ::defmt::assert_eq!($($x)*); |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } |
| @@ -30,9 +30,9 @@ macro_rules! assert_ne { | |||
| 30 | ($($x:tt)*) => { | 30 | ($($x:tt)*) => { |
| 31 | { | 31 | { |
| 32 | #[cfg(not(feature = "defmt"))] | 32 | #[cfg(not(feature = "defmt"))] |
| 33 | core::assert_ne!($($x)*); | 33 | ::core::assert_ne!($($x)*); |
| 34 | #[cfg(feature = "defmt")] | 34 | #[cfg(feature = "defmt")] |
| 35 | defmt::assert_ne!($($x)*); | 35 | ::defmt::assert_ne!($($x)*); |
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | } | 38 | } |
| @@ -41,9 +41,9 @@ macro_rules! debug_assert { | |||
| 41 | ($($x:tt)*) => { | 41 | ($($x:tt)*) => { |
| 42 | { | 42 | { |
| 43 | #[cfg(not(feature = "defmt"))] | 43 | #[cfg(not(feature = "defmt"))] |
| 44 | core::debug_assert!($($x)*); | 44 | ::core::debug_assert!($($x)*); |
| 45 | #[cfg(feature = "defmt")] | 45 | #[cfg(feature = "defmt")] |
| 46 | defmt::debug_assert!($($x)*); | 46 | ::defmt::debug_assert!($($x)*); |
| 47 | } | 47 | } |
| 48 | }; | 48 | }; |
| 49 | } | 49 | } |
| @@ -52,9 +52,9 @@ macro_rules! debug_assert_eq { | |||
| 52 | ($($x:tt)*) => { | 52 | ($($x:tt)*) => { |
| 53 | { | 53 | { |
| 54 | #[cfg(not(feature = "defmt"))] | 54 | #[cfg(not(feature = "defmt"))] |
| 55 | core::debug_assert_eq!($($x)*); | 55 | ::core::debug_assert_eq!($($x)*); |
| 56 | #[cfg(feature = "defmt")] | 56 | #[cfg(feature = "defmt")] |
| 57 | defmt::debug_assert_eq!($($x)*); | 57 | ::defmt::debug_assert_eq!($($x)*); |
| 58 | } | 58 | } |
| 59 | }; | 59 | }; |
| 60 | } | 60 | } |
| @@ -63,9 +63,9 @@ macro_rules! debug_assert_ne { | |||
| 63 | ($($x:tt)*) => { | 63 | ($($x:tt)*) => { |
| 64 | { | 64 | { |
| 65 | #[cfg(not(feature = "defmt"))] | 65 | #[cfg(not(feature = "defmt"))] |
| 66 | core::debug_assert_ne!($($x)*); | 66 | ::core::debug_assert_ne!($($x)*); |
| 67 | #[cfg(feature = "defmt")] | 67 | #[cfg(feature = "defmt")] |
| 68 | defmt::debug_assert_ne!($($x)*); | 68 | ::defmt::debug_assert_ne!($($x)*); |
| 69 | } | 69 | } |
| 70 | }; | 70 | }; |
| 71 | } | 71 | } |
| @@ -74,9 +74,9 @@ macro_rules! todo { | |||
| 74 | ($($x:tt)*) => { | 74 | ($($x:tt)*) => { |
| 75 | { | 75 | { |
| 76 | #[cfg(not(feature = "defmt"))] | 76 | #[cfg(not(feature = "defmt"))] |
| 77 | core::todo!($($x)*); | 77 | ::core::todo!($($x)*); |
| 78 | #[cfg(feature = "defmt")] | 78 | #[cfg(feature = "defmt")] |
| 79 | defmt::todo!($($x)*); | 79 | ::defmt::todo!($($x)*); |
| 80 | } | 80 | } |
| 81 | }; | 81 | }; |
| 82 | } | 82 | } |
| @@ -85,9 +85,9 @@ macro_rules! unreachable { | |||
| 85 | ($($x:tt)*) => { | 85 | ($($x:tt)*) => { |
| 86 | { | 86 | { |
| 87 | #[cfg(not(feature = "defmt"))] | 87 | #[cfg(not(feature = "defmt"))] |
| 88 | core::unreachable!($($x)*); | 88 | ::core::unreachable!($($x)*); |
| 89 | #[cfg(feature = "defmt")] | 89 | #[cfg(feature = "defmt")] |
| 90 | defmt::unreachable!($($x)*); | 90 | ::defmt::unreachable!($($x)*); |
| 91 | } | 91 | } |
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| @@ -96,9 +96,9 @@ macro_rules! panic { | |||
| 96 | ($($x:tt)*) => { | 96 | ($($x:tt)*) => { |
| 97 | { | 97 | { |
| 98 | #[cfg(not(feature = "defmt"))] | 98 | #[cfg(not(feature = "defmt"))] |
| 99 | core::panic!($($x)*); | 99 | ::core::panic!($($x)*); |
| 100 | #[cfg(feature = "defmt")] | 100 | #[cfg(feature = "defmt")] |
| 101 | defmt::panic!($($x)*); | 101 | ::defmt::panic!($($x)*); |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| @@ -107,9 +107,9 @@ macro_rules! trace { | |||
| 107 | ($($x:tt)*) => { | 107 | ($($x:tt)*) => { |
| 108 | { | 108 | { |
| 109 | #[cfg(feature = "log")] | 109 | #[cfg(feature = "log")] |
| 110 | log::trace!($($x)*); | 110 | ::log::trace!($($x)*); |
| 111 | #[cfg(feature = "defmt")] | 111 | #[cfg(feature = "defmt")] |
| 112 | defmt::trace!($($x)*); | 112 | ::defmt::trace!($($x)*); |
| 113 | } | 113 | } |
| 114 | }; | 114 | }; |
| 115 | } | 115 | } |
| @@ -118,9 +118,9 @@ macro_rules! debug { | |||
| 118 | ($($x:tt)*) => { | 118 | ($($x:tt)*) => { |
| 119 | { | 119 | { |
| 120 | #[cfg(fevature = "log")] | 120 | #[cfg(fevature = "log")] |
| 121 | log::debug!($($x)*); | 121 | ::log::debug!($($x)*); |
| 122 | #[cfg(feature = "defmt")] | 122 | #[cfg(feature = "defmt")] |
| 123 | defmt::debug!($($x)*); | 123 | ::defmt::debug!($($x)*); |
| 124 | } | 124 | } |
| 125 | }; | 125 | }; |
| 126 | } | 126 | } |
| @@ -129,9 +129,9 @@ macro_rules! info { | |||
| 129 | ($($x:tt)*) => { | 129 | ($($x:tt)*) => { |
| 130 | { | 130 | { |
| 131 | #[cfg(feature = "log")] | 131 | #[cfg(feature = "log")] |
| 132 | log::info!($($x)*); | 132 | ::log::info!($($x)*); |
| 133 | #[cfg(feature = "defmt")] | 133 | #[cfg(feature = "defmt")] |
| 134 | defmt::info!($($x)*); | 134 | ::defmt::info!($($x)*); |
| 135 | } | 135 | } |
| 136 | }; | 136 | }; |
| 137 | } | 137 | } |
| @@ -140,9 +140,9 @@ macro_rules! warn { | |||
| 140 | ($($x:tt)*) => { | 140 | ($($x:tt)*) => { |
| 141 | { | 141 | { |
| 142 | #[cfg(feature = "log")] | 142 | #[cfg(feature = "log")] |
| 143 | log::warn!($($x)*); | 143 | ::log::warn!($($x)*); |
| 144 | #[cfg(feature = "defmt")] | 144 | #[cfg(feature = "defmt")] |
| 145 | defmt::warn!($($x)*); | 145 | ::defmt::warn!($($x)*); |
| 146 | } | 146 | } |
| 147 | }; | 147 | }; |
| 148 | } | 148 | } |
| @@ -151,9 +151,9 @@ macro_rules! error { | |||
| 151 | ($($x:tt)*) => { | 151 | ($($x:tt)*) => { |
| 152 | { | 152 | { |
| 153 | #[cfg(feature = "log")] | 153 | #[cfg(feature = "log")] |
| 154 | log::error!($($x)*); | 154 | ::log::error!($($x)*); |
| 155 | #[cfg(feature = "defmt")] | 155 | #[cfg(feature = "defmt")] |
| 156 | defmt::error!($($x)*); | 156 | ::defmt::error!($($x)*); |
| 157 | } | 157 | } |
| 158 | }; | 158 | }; |
| 159 | } | 159 | } |
| @@ -161,7 +161,7 @@ macro_rules! error { | |||
| 161 | #[cfg(feature = "defmt")] | 161 | #[cfg(feature = "defmt")] |
| 162 | macro_rules! unwrap { | 162 | macro_rules! unwrap { |
| 163 | ($($x:tt)*) => { | 163 | ($($x:tt)*) => { |
| 164 | defmt::unwrap!($($x)*) | 164 | ::defmt::unwrap!($($x)*) |
| 165 | }; | 165 | }; |
| 166 | } | 166 | } |
| 167 | 167 | ||
diff --git a/embassy-rp/src/fmt.rs b/embassy-rp/src/fmt.rs index 6c5063f7c..2646c57ab 100644 --- a/embassy-rp/src/fmt.rs +++ b/embassy-rp/src/fmt.rs | |||
| @@ -8,9 +8,9 @@ macro_rules! assert { | |||
| 8 | ($($x:tt)*) => { | 8 | ($($x:tt)*) => { |
| 9 | { | 9 | { |
| 10 | #[cfg(not(feature = "defmt"))] | 10 | #[cfg(not(feature = "defmt"))] |
| 11 | core::assert!($($x)*); | 11 | ::core::assert!($($x)*); |
| 12 | #[cfg(feature = "defmt")] | 12 | #[cfg(feature = "defmt")] |
| 13 | defmt::assert!($($x)*); | 13 | ::defmt::assert!($($x)*); |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | } | 16 | } |
| @@ -19,9 +19,9 @@ macro_rules! assert_eq { | |||
| 19 | ($($x:tt)*) => { | 19 | ($($x:tt)*) => { |
| 20 | { | 20 | { |
| 21 | #[cfg(not(feature = "defmt"))] | 21 | #[cfg(not(feature = "defmt"))] |
| 22 | core::assert_eq!($($x)*); | 22 | ::core::assert_eq!($($x)*); |
| 23 | #[cfg(feature = "defmt")] | 23 | #[cfg(feature = "defmt")] |
| 24 | defmt::assert_eq!($($x)*); | 24 | ::defmt::assert_eq!($($x)*); |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } |
| @@ -30,9 +30,9 @@ macro_rules! assert_ne { | |||
| 30 | ($($x:tt)*) => { | 30 | ($($x:tt)*) => { |
| 31 | { | 31 | { |
| 32 | #[cfg(not(feature = "defmt"))] | 32 | #[cfg(not(feature = "defmt"))] |
| 33 | core::assert_ne!($($x)*); | 33 | ::core::assert_ne!($($x)*); |
| 34 | #[cfg(feature = "defmt")] | 34 | #[cfg(feature = "defmt")] |
| 35 | defmt::assert_ne!($($x)*); | 35 | ::defmt::assert_ne!($($x)*); |
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | } | 38 | } |
| @@ -41,9 +41,9 @@ macro_rules! debug_assert { | |||
| 41 | ($($x:tt)*) => { | 41 | ($($x:tt)*) => { |
| 42 | { | 42 | { |
| 43 | #[cfg(not(feature = "defmt"))] | 43 | #[cfg(not(feature = "defmt"))] |
| 44 | core::debug_assert!($($x)*); | 44 | ::core::debug_assert!($($x)*); |
| 45 | #[cfg(feature = "defmt")] | 45 | #[cfg(feature = "defmt")] |
| 46 | defmt::debug_assert!($($x)*); | 46 | ::defmt::debug_assert!($($x)*); |
| 47 | } | 47 | } |
| 48 | }; | 48 | }; |
| 49 | } | 49 | } |
| @@ -52,9 +52,9 @@ macro_rules! debug_assert_eq { | |||
| 52 | ($($x:tt)*) => { | 52 | ($($x:tt)*) => { |
| 53 | { | 53 | { |
| 54 | #[cfg(not(feature = "defmt"))] | 54 | #[cfg(not(feature = "defmt"))] |
| 55 | core::debug_assert_eq!($($x)*); | 55 | ::core::debug_assert_eq!($($x)*); |
| 56 | #[cfg(feature = "defmt")] | 56 | #[cfg(feature = "defmt")] |
| 57 | defmt::debug_assert_eq!($($x)*); | 57 | ::defmt::debug_assert_eq!($($x)*); |
| 58 | } | 58 | } |
| 59 | }; | 59 | }; |
| 60 | } | 60 | } |
| @@ -63,9 +63,9 @@ macro_rules! debug_assert_ne { | |||
| 63 | ($($x:tt)*) => { | 63 | ($($x:tt)*) => { |
| 64 | { | 64 | { |
| 65 | #[cfg(not(feature = "defmt"))] | 65 | #[cfg(not(feature = "defmt"))] |
| 66 | core::debug_assert_ne!($($x)*); | 66 | ::core::debug_assert_ne!($($x)*); |
| 67 | #[cfg(feature = "defmt")] | 67 | #[cfg(feature = "defmt")] |
| 68 | defmt::debug_assert_ne!($($x)*); | 68 | ::defmt::debug_assert_ne!($($x)*); |
| 69 | } | 69 | } |
| 70 | }; | 70 | }; |
| 71 | } | 71 | } |
| @@ -74,9 +74,9 @@ macro_rules! todo { | |||
| 74 | ($($x:tt)*) => { | 74 | ($($x:tt)*) => { |
| 75 | { | 75 | { |
| 76 | #[cfg(not(feature = "defmt"))] | 76 | #[cfg(not(feature = "defmt"))] |
| 77 | core::todo!($($x)*); | 77 | ::core::todo!($($x)*); |
| 78 | #[cfg(feature = "defmt")] | 78 | #[cfg(feature = "defmt")] |
| 79 | defmt::todo!($($x)*); | 79 | ::defmt::todo!($($x)*); |
| 80 | } | 80 | } |
| 81 | }; | 81 | }; |
| 82 | } | 82 | } |
| @@ -85,9 +85,9 @@ macro_rules! unreachable { | |||
| 85 | ($($x:tt)*) => { | 85 | ($($x:tt)*) => { |
| 86 | { | 86 | { |
| 87 | #[cfg(not(feature = "defmt"))] | 87 | #[cfg(not(feature = "defmt"))] |
| 88 | core::unreachable!($($x)*); | 88 | ::core::unreachable!($($x)*); |
| 89 | #[cfg(feature = "defmt")] | 89 | #[cfg(feature = "defmt")] |
| 90 | defmt::unreachable!($($x)*); | 90 | ::defmt::unreachable!($($x)*); |
| 91 | } | 91 | } |
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| @@ -96,9 +96,9 @@ macro_rules! panic { | |||
| 96 | ($($x:tt)*) => { | 96 | ($($x:tt)*) => { |
| 97 | { | 97 | { |
| 98 | #[cfg(not(feature = "defmt"))] | 98 | #[cfg(not(feature = "defmt"))] |
| 99 | core::panic!($($x)*); | 99 | ::core::panic!($($x)*); |
| 100 | #[cfg(feature = "defmt")] | 100 | #[cfg(feature = "defmt")] |
| 101 | defmt::panic!($($x)*); | 101 | ::defmt::panic!($($x)*); |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| @@ -107,9 +107,9 @@ macro_rules! trace { | |||
| 107 | ($($x:tt)*) => { | 107 | ($($x:tt)*) => { |
| 108 | { | 108 | { |
| 109 | #[cfg(feature = "log")] | 109 | #[cfg(feature = "log")] |
| 110 | log::trace!($($x)*); | 110 | ::log::trace!($($x)*); |
| 111 | #[cfg(feature = "defmt")] | 111 | #[cfg(feature = "defmt")] |
| 112 | defmt::trace!($($x)*); | 112 | ::defmt::trace!($($x)*); |
| 113 | } | 113 | } |
| 114 | }; | 114 | }; |
| 115 | } | 115 | } |
| @@ -118,9 +118,9 @@ macro_rules! debug { | |||
| 118 | ($($x:tt)*) => { | 118 | ($($x:tt)*) => { |
| 119 | { | 119 | { |
| 120 | #[cfg(fevature = "log")] | 120 | #[cfg(fevature = "log")] |
| 121 | log::debug!($($x)*); | 121 | ::log::debug!($($x)*); |
| 122 | #[cfg(feature = "defmt")] | 122 | #[cfg(feature = "defmt")] |
| 123 | defmt::debug!($($x)*); | 123 | ::defmt::debug!($($x)*); |
| 124 | } | 124 | } |
| 125 | }; | 125 | }; |
| 126 | } | 126 | } |
| @@ -129,9 +129,9 @@ macro_rules! info { | |||
| 129 | ($($x:tt)*) => { | 129 | ($($x:tt)*) => { |
| 130 | { | 130 | { |
| 131 | #[cfg(feature = "log")] | 131 | #[cfg(feature = "log")] |
| 132 | log::info!($($x)*); | 132 | ::log::info!($($x)*); |
| 133 | #[cfg(feature = "defmt")] | 133 | #[cfg(feature = "defmt")] |
| 134 | defmt::info!($($x)*); | 134 | ::defmt::info!($($x)*); |
| 135 | } | 135 | } |
| 136 | }; | 136 | }; |
| 137 | } | 137 | } |
| @@ -140,9 +140,9 @@ macro_rules! warn { | |||
| 140 | ($($x:tt)*) => { | 140 | ($($x:tt)*) => { |
| 141 | { | 141 | { |
| 142 | #[cfg(feature = "log")] | 142 | #[cfg(feature = "log")] |
| 143 | log::warn!($($x)*); | 143 | ::log::warn!($($x)*); |
| 144 | #[cfg(feature = "defmt")] | 144 | #[cfg(feature = "defmt")] |
| 145 | defmt::warn!($($x)*); | 145 | ::defmt::warn!($($x)*); |
| 146 | } | 146 | } |
| 147 | }; | 147 | }; |
| 148 | } | 148 | } |
| @@ -151,9 +151,9 @@ macro_rules! error { | |||
| 151 | ($($x:tt)*) => { | 151 | ($($x:tt)*) => { |
| 152 | { | 152 | { |
| 153 | #[cfg(feature = "log")] | 153 | #[cfg(feature = "log")] |
| 154 | log::error!($($x)*); | 154 | ::log::error!($($x)*); |
| 155 | #[cfg(feature = "defmt")] | 155 | #[cfg(feature = "defmt")] |
| 156 | defmt::error!($($x)*); | 156 | ::defmt::error!($($x)*); |
| 157 | } | 157 | } |
| 158 | }; | 158 | }; |
| 159 | } | 159 | } |
| @@ -161,7 +161,7 @@ macro_rules! error { | |||
| 161 | #[cfg(feature = "defmt")] | 161 | #[cfg(feature = "defmt")] |
| 162 | macro_rules! unwrap { | 162 | macro_rules! unwrap { |
| 163 | ($($x:tt)*) => { | 163 | ($($x:tt)*) => { |
| 164 | defmt::unwrap!($($x)*) | 164 | ::defmt::unwrap!($($x)*) |
| 165 | }; | 165 | }; |
| 166 | } | 166 | } |
| 167 | 167 | ||
diff --git a/embassy-stm32/src/fmt.rs b/embassy-stm32/src/fmt.rs index 6c5063f7c..2646c57ab 100644 --- a/embassy-stm32/src/fmt.rs +++ b/embassy-stm32/src/fmt.rs | |||
| @@ -8,9 +8,9 @@ macro_rules! assert { | |||
| 8 | ($($x:tt)*) => { | 8 | ($($x:tt)*) => { |
| 9 | { | 9 | { |
| 10 | #[cfg(not(feature = "defmt"))] | 10 | #[cfg(not(feature = "defmt"))] |
| 11 | core::assert!($($x)*); | 11 | ::core::assert!($($x)*); |
| 12 | #[cfg(feature = "defmt")] | 12 | #[cfg(feature = "defmt")] |
| 13 | defmt::assert!($($x)*); | 13 | ::defmt::assert!($($x)*); |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | } | 16 | } |
| @@ -19,9 +19,9 @@ macro_rules! assert_eq { | |||
| 19 | ($($x:tt)*) => { | 19 | ($($x:tt)*) => { |
| 20 | { | 20 | { |
| 21 | #[cfg(not(feature = "defmt"))] | 21 | #[cfg(not(feature = "defmt"))] |
| 22 | core::assert_eq!($($x)*); | 22 | ::core::assert_eq!($($x)*); |
| 23 | #[cfg(feature = "defmt")] | 23 | #[cfg(feature = "defmt")] |
| 24 | defmt::assert_eq!($($x)*); | 24 | ::defmt::assert_eq!($($x)*); |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } |
| @@ -30,9 +30,9 @@ macro_rules! assert_ne { | |||
| 30 | ($($x:tt)*) => { | 30 | ($($x:tt)*) => { |
| 31 | { | 31 | { |
| 32 | #[cfg(not(feature = "defmt"))] | 32 | #[cfg(not(feature = "defmt"))] |
| 33 | core::assert_ne!($($x)*); | 33 | ::core::assert_ne!($($x)*); |
| 34 | #[cfg(feature = "defmt")] | 34 | #[cfg(feature = "defmt")] |
| 35 | defmt::assert_ne!($($x)*); | 35 | ::defmt::assert_ne!($($x)*); |
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | } | 38 | } |
| @@ -41,9 +41,9 @@ macro_rules! debug_assert { | |||
| 41 | ($($x:tt)*) => { | 41 | ($($x:tt)*) => { |
| 42 | { | 42 | { |
| 43 | #[cfg(not(feature = "defmt"))] | 43 | #[cfg(not(feature = "defmt"))] |
| 44 | core::debug_assert!($($x)*); | 44 | ::core::debug_assert!($($x)*); |
| 45 | #[cfg(feature = "defmt")] | 45 | #[cfg(feature = "defmt")] |
| 46 | defmt::debug_assert!($($x)*); | 46 | ::defmt::debug_assert!($($x)*); |
| 47 | } | 47 | } |
| 48 | }; | 48 | }; |
| 49 | } | 49 | } |
| @@ -52,9 +52,9 @@ macro_rules! debug_assert_eq { | |||
| 52 | ($($x:tt)*) => { | 52 | ($($x:tt)*) => { |
| 53 | { | 53 | { |
| 54 | #[cfg(not(feature = "defmt"))] | 54 | #[cfg(not(feature = "defmt"))] |
| 55 | core::debug_assert_eq!($($x)*); | 55 | ::core::debug_assert_eq!($($x)*); |
| 56 | #[cfg(feature = "defmt")] | 56 | #[cfg(feature = "defmt")] |
| 57 | defmt::debug_assert_eq!($($x)*); | 57 | ::defmt::debug_assert_eq!($($x)*); |
| 58 | } | 58 | } |
| 59 | }; | 59 | }; |
| 60 | } | 60 | } |
| @@ -63,9 +63,9 @@ macro_rules! debug_assert_ne { | |||
| 63 | ($($x:tt)*) => { | 63 | ($($x:tt)*) => { |
| 64 | { | 64 | { |
| 65 | #[cfg(not(feature = "defmt"))] | 65 | #[cfg(not(feature = "defmt"))] |
| 66 | core::debug_assert_ne!($($x)*); | 66 | ::core::debug_assert_ne!($($x)*); |
| 67 | #[cfg(feature = "defmt")] | 67 | #[cfg(feature = "defmt")] |
| 68 | defmt::debug_assert_ne!($($x)*); | 68 | ::defmt::debug_assert_ne!($($x)*); |
| 69 | } | 69 | } |
| 70 | }; | 70 | }; |
| 71 | } | 71 | } |
| @@ -74,9 +74,9 @@ macro_rules! todo { | |||
| 74 | ($($x:tt)*) => { | 74 | ($($x:tt)*) => { |
| 75 | { | 75 | { |
| 76 | #[cfg(not(feature = "defmt"))] | 76 | #[cfg(not(feature = "defmt"))] |
| 77 | core::todo!($($x)*); | 77 | ::core::todo!($($x)*); |
| 78 | #[cfg(feature = "defmt")] | 78 | #[cfg(feature = "defmt")] |
| 79 | defmt::todo!($($x)*); | 79 | ::defmt::todo!($($x)*); |
| 80 | } | 80 | } |
| 81 | }; | 81 | }; |
| 82 | } | 82 | } |
| @@ -85,9 +85,9 @@ macro_rules! unreachable { | |||
| 85 | ($($x:tt)*) => { | 85 | ($($x:tt)*) => { |
| 86 | { | 86 | { |
| 87 | #[cfg(not(feature = "defmt"))] | 87 | #[cfg(not(feature = "defmt"))] |
| 88 | core::unreachable!($($x)*); | 88 | ::core::unreachable!($($x)*); |
| 89 | #[cfg(feature = "defmt")] | 89 | #[cfg(feature = "defmt")] |
| 90 | defmt::unreachable!($($x)*); | 90 | ::defmt::unreachable!($($x)*); |
| 91 | } | 91 | } |
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| @@ -96,9 +96,9 @@ macro_rules! panic { | |||
| 96 | ($($x:tt)*) => { | 96 | ($($x:tt)*) => { |
| 97 | { | 97 | { |
| 98 | #[cfg(not(feature = "defmt"))] | 98 | #[cfg(not(feature = "defmt"))] |
| 99 | core::panic!($($x)*); | 99 | ::core::panic!($($x)*); |
| 100 | #[cfg(feature = "defmt")] | 100 | #[cfg(feature = "defmt")] |
| 101 | defmt::panic!($($x)*); | 101 | ::defmt::panic!($($x)*); |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| @@ -107,9 +107,9 @@ macro_rules! trace { | |||
| 107 | ($($x:tt)*) => { | 107 | ($($x:tt)*) => { |
| 108 | { | 108 | { |
| 109 | #[cfg(feature = "log")] | 109 | #[cfg(feature = "log")] |
| 110 | log::trace!($($x)*); | 110 | ::log::trace!($($x)*); |
| 111 | #[cfg(feature = "defmt")] | 111 | #[cfg(feature = "defmt")] |
| 112 | defmt::trace!($($x)*); | 112 | ::defmt::trace!($($x)*); |
| 113 | } | 113 | } |
| 114 | }; | 114 | }; |
| 115 | } | 115 | } |
| @@ -118,9 +118,9 @@ macro_rules! debug { | |||
| 118 | ($($x:tt)*) => { | 118 | ($($x:tt)*) => { |
| 119 | { | 119 | { |
| 120 | #[cfg(fevature = "log")] | 120 | #[cfg(fevature = "log")] |
| 121 | log::debug!($($x)*); | 121 | ::log::debug!($($x)*); |
| 122 | #[cfg(feature = "defmt")] | 122 | #[cfg(feature = "defmt")] |
| 123 | defmt::debug!($($x)*); | 123 | ::defmt::debug!($($x)*); |
| 124 | } | 124 | } |
| 125 | }; | 125 | }; |
| 126 | } | 126 | } |
| @@ -129,9 +129,9 @@ macro_rules! info { | |||
| 129 | ($($x:tt)*) => { | 129 | ($($x:tt)*) => { |
| 130 | { | 130 | { |
| 131 | #[cfg(feature = "log")] | 131 | #[cfg(feature = "log")] |
| 132 | log::info!($($x)*); | 132 | ::log::info!($($x)*); |
| 133 | #[cfg(feature = "defmt")] | 133 | #[cfg(feature = "defmt")] |
| 134 | defmt::info!($($x)*); | 134 | ::defmt::info!($($x)*); |
| 135 | } | 135 | } |
| 136 | }; | 136 | }; |
| 137 | } | 137 | } |
| @@ -140,9 +140,9 @@ macro_rules! warn { | |||
| 140 | ($($x:tt)*) => { | 140 | ($($x:tt)*) => { |
| 141 | { | 141 | { |
| 142 | #[cfg(feature = "log")] | 142 | #[cfg(feature = "log")] |
| 143 | log::warn!($($x)*); | 143 | ::log::warn!($($x)*); |
| 144 | #[cfg(feature = "defmt")] | 144 | #[cfg(feature = "defmt")] |
| 145 | defmt::warn!($($x)*); | 145 | ::defmt::warn!($($x)*); |
| 146 | } | 146 | } |
| 147 | }; | 147 | }; |
| 148 | } | 148 | } |
| @@ -151,9 +151,9 @@ macro_rules! error { | |||
| 151 | ($($x:tt)*) => { | 151 | ($($x:tt)*) => { |
| 152 | { | 152 | { |
| 153 | #[cfg(feature = "log")] | 153 | #[cfg(feature = "log")] |
| 154 | log::error!($($x)*); | 154 | ::log::error!($($x)*); |
| 155 | #[cfg(feature = "defmt")] | 155 | #[cfg(feature = "defmt")] |
| 156 | defmt::error!($($x)*); | 156 | ::defmt::error!($($x)*); |
| 157 | } | 157 | } |
| 158 | }; | 158 | }; |
| 159 | } | 159 | } |
| @@ -161,7 +161,7 @@ macro_rules! error { | |||
| 161 | #[cfg(feature = "defmt")] | 161 | #[cfg(feature = "defmt")] |
| 162 | macro_rules! unwrap { | 162 | macro_rules! unwrap { |
| 163 | ($($x:tt)*) => { | 163 | ($($x:tt)*) => { |
| 164 | defmt::unwrap!($($x)*) | 164 | ::defmt::unwrap!($($x)*) |
| 165 | }; | 165 | }; |
| 166 | } | 166 | } |
| 167 | 167 | ||
diff --git a/embassy/src/fmt.rs b/embassy/src/fmt.rs index 6c5063f7c..2646c57ab 100644 --- a/embassy/src/fmt.rs +++ b/embassy/src/fmt.rs | |||
| @@ -8,9 +8,9 @@ macro_rules! assert { | |||
| 8 | ($($x:tt)*) => { | 8 | ($($x:tt)*) => { |
| 9 | { | 9 | { |
| 10 | #[cfg(not(feature = "defmt"))] | 10 | #[cfg(not(feature = "defmt"))] |
| 11 | core::assert!($($x)*); | 11 | ::core::assert!($($x)*); |
| 12 | #[cfg(feature = "defmt")] | 12 | #[cfg(feature = "defmt")] |
| 13 | defmt::assert!($($x)*); | 13 | ::defmt::assert!($($x)*); |
| 14 | } | 14 | } |
| 15 | }; | 15 | }; |
| 16 | } | 16 | } |
| @@ -19,9 +19,9 @@ macro_rules! assert_eq { | |||
| 19 | ($($x:tt)*) => { | 19 | ($($x:tt)*) => { |
| 20 | { | 20 | { |
| 21 | #[cfg(not(feature = "defmt"))] | 21 | #[cfg(not(feature = "defmt"))] |
| 22 | core::assert_eq!($($x)*); | 22 | ::core::assert_eq!($($x)*); |
| 23 | #[cfg(feature = "defmt")] | 23 | #[cfg(feature = "defmt")] |
| 24 | defmt::assert_eq!($($x)*); | 24 | ::defmt::assert_eq!($($x)*); |
| 25 | } | 25 | } |
| 26 | }; | 26 | }; |
| 27 | } | 27 | } |
| @@ -30,9 +30,9 @@ macro_rules! assert_ne { | |||
| 30 | ($($x:tt)*) => { | 30 | ($($x:tt)*) => { |
| 31 | { | 31 | { |
| 32 | #[cfg(not(feature = "defmt"))] | 32 | #[cfg(not(feature = "defmt"))] |
| 33 | core::assert_ne!($($x)*); | 33 | ::core::assert_ne!($($x)*); |
| 34 | #[cfg(feature = "defmt")] | 34 | #[cfg(feature = "defmt")] |
| 35 | defmt::assert_ne!($($x)*); | 35 | ::defmt::assert_ne!($($x)*); |
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | } | 38 | } |
| @@ -41,9 +41,9 @@ macro_rules! debug_assert { | |||
| 41 | ($($x:tt)*) => { | 41 | ($($x:tt)*) => { |
| 42 | { | 42 | { |
| 43 | #[cfg(not(feature = "defmt"))] | 43 | #[cfg(not(feature = "defmt"))] |
| 44 | core::debug_assert!($($x)*); | 44 | ::core::debug_assert!($($x)*); |
| 45 | #[cfg(feature = "defmt")] | 45 | #[cfg(feature = "defmt")] |
| 46 | defmt::debug_assert!($($x)*); | 46 | ::defmt::debug_assert!($($x)*); |
| 47 | } | 47 | } |
| 48 | }; | 48 | }; |
| 49 | } | 49 | } |
| @@ -52,9 +52,9 @@ macro_rules! debug_assert_eq { | |||
| 52 | ($($x:tt)*) => { | 52 | ($($x:tt)*) => { |
| 53 | { | 53 | { |
| 54 | #[cfg(not(feature = "defmt"))] | 54 | #[cfg(not(feature = "defmt"))] |
| 55 | core::debug_assert_eq!($($x)*); | 55 | ::core::debug_assert_eq!($($x)*); |
| 56 | #[cfg(feature = "defmt")] | 56 | #[cfg(feature = "defmt")] |
| 57 | defmt::debug_assert_eq!($($x)*); | 57 | ::defmt::debug_assert_eq!($($x)*); |
| 58 | } | 58 | } |
| 59 | }; | 59 | }; |
| 60 | } | 60 | } |
| @@ -63,9 +63,9 @@ macro_rules! debug_assert_ne { | |||
| 63 | ($($x:tt)*) => { | 63 | ($($x:tt)*) => { |
| 64 | { | 64 | { |
| 65 | #[cfg(not(feature = "defmt"))] | 65 | #[cfg(not(feature = "defmt"))] |
| 66 | core::debug_assert_ne!($($x)*); | 66 | ::core::debug_assert_ne!($($x)*); |
| 67 | #[cfg(feature = "defmt")] | 67 | #[cfg(feature = "defmt")] |
| 68 | defmt::debug_assert_ne!($($x)*); | 68 | ::defmt::debug_assert_ne!($($x)*); |
| 69 | } | 69 | } |
| 70 | }; | 70 | }; |
| 71 | } | 71 | } |
| @@ -74,9 +74,9 @@ macro_rules! todo { | |||
| 74 | ($($x:tt)*) => { | 74 | ($($x:tt)*) => { |
| 75 | { | 75 | { |
| 76 | #[cfg(not(feature = "defmt"))] | 76 | #[cfg(not(feature = "defmt"))] |
| 77 | core::todo!($($x)*); | 77 | ::core::todo!($($x)*); |
| 78 | #[cfg(feature = "defmt")] | 78 | #[cfg(feature = "defmt")] |
| 79 | defmt::todo!($($x)*); | 79 | ::defmt::todo!($($x)*); |
| 80 | } | 80 | } |
| 81 | }; | 81 | }; |
| 82 | } | 82 | } |
| @@ -85,9 +85,9 @@ macro_rules! unreachable { | |||
| 85 | ($($x:tt)*) => { | 85 | ($($x:tt)*) => { |
| 86 | { | 86 | { |
| 87 | #[cfg(not(feature = "defmt"))] | 87 | #[cfg(not(feature = "defmt"))] |
| 88 | core::unreachable!($($x)*); | 88 | ::core::unreachable!($($x)*); |
| 89 | #[cfg(feature = "defmt")] | 89 | #[cfg(feature = "defmt")] |
| 90 | defmt::unreachable!($($x)*); | 90 | ::defmt::unreachable!($($x)*); |
| 91 | } | 91 | } |
| 92 | }; | 92 | }; |
| 93 | } | 93 | } |
| @@ -96,9 +96,9 @@ macro_rules! panic { | |||
| 96 | ($($x:tt)*) => { | 96 | ($($x:tt)*) => { |
| 97 | { | 97 | { |
| 98 | #[cfg(not(feature = "defmt"))] | 98 | #[cfg(not(feature = "defmt"))] |
| 99 | core::panic!($($x)*); | 99 | ::core::panic!($($x)*); |
| 100 | #[cfg(feature = "defmt")] | 100 | #[cfg(feature = "defmt")] |
| 101 | defmt::panic!($($x)*); | 101 | ::defmt::panic!($($x)*); |
| 102 | } | 102 | } |
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| @@ -107,9 +107,9 @@ macro_rules! trace { | |||
| 107 | ($($x:tt)*) => { | 107 | ($($x:tt)*) => { |
| 108 | { | 108 | { |
| 109 | #[cfg(feature = "log")] | 109 | #[cfg(feature = "log")] |
| 110 | log::trace!($($x)*); | 110 | ::log::trace!($($x)*); |
| 111 | #[cfg(feature = "defmt")] | 111 | #[cfg(feature = "defmt")] |
| 112 | defmt::trace!($($x)*); | 112 | ::defmt::trace!($($x)*); |
| 113 | } | 113 | } |
| 114 | }; | 114 | }; |
| 115 | } | 115 | } |
| @@ -118,9 +118,9 @@ macro_rules! debug { | |||
| 118 | ($($x:tt)*) => { | 118 | ($($x:tt)*) => { |
| 119 | { | 119 | { |
| 120 | #[cfg(fevature = "log")] | 120 | #[cfg(fevature = "log")] |
| 121 | log::debug!($($x)*); | 121 | ::log::debug!($($x)*); |
| 122 | #[cfg(feature = "defmt")] | 122 | #[cfg(feature = "defmt")] |
| 123 | defmt::debug!($($x)*); | 123 | ::defmt::debug!($($x)*); |
| 124 | } | 124 | } |
| 125 | }; | 125 | }; |
| 126 | } | 126 | } |
| @@ -129,9 +129,9 @@ macro_rules! info { | |||
| 129 | ($($x:tt)*) => { | 129 | ($($x:tt)*) => { |
| 130 | { | 130 | { |
| 131 | #[cfg(feature = "log")] | 131 | #[cfg(feature = "log")] |
| 132 | log::info!($($x)*); | 132 | ::log::info!($($x)*); |
| 133 | #[cfg(feature = "defmt")] | 133 | #[cfg(feature = "defmt")] |
| 134 | defmt::info!($($x)*); | 134 | ::defmt::info!($($x)*); |
| 135 | } | 135 | } |
| 136 | }; | 136 | }; |
| 137 | } | 137 | } |
| @@ -140,9 +140,9 @@ macro_rules! warn { | |||
| 140 | ($($x:tt)*) => { | 140 | ($($x:tt)*) => { |
| 141 | { | 141 | { |
| 142 | #[cfg(feature = "log")] | 142 | #[cfg(feature = "log")] |
| 143 | log::warn!($($x)*); | 143 | ::log::warn!($($x)*); |
| 144 | #[cfg(feature = "defmt")] | 144 | #[cfg(feature = "defmt")] |
| 145 | defmt::warn!($($x)*); | 145 | ::defmt::warn!($($x)*); |
| 146 | } | 146 | } |
| 147 | }; | 147 | }; |
| 148 | } | 148 | } |
| @@ -151,9 +151,9 @@ macro_rules! error { | |||
| 151 | ($($x:tt)*) => { | 151 | ($($x:tt)*) => { |
| 152 | { | 152 | { |
| 153 | #[cfg(feature = "log")] | 153 | #[cfg(feature = "log")] |
| 154 | log::error!($($x)*); | 154 | ::log::error!($($x)*); |
| 155 | #[cfg(feature = "defmt")] | 155 | #[cfg(feature = "defmt")] |
| 156 | defmt::error!($($x)*); | 156 | ::defmt::error!($($x)*); |
| 157 | } | 157 | } |
| 158 | }; | 158 | }; |
| 159 | } | 159 | } |
| @@ -161,7 +161,7 @@ macro_rules! error { | |||
| 161 | #[cfg(feature = "defmt")] | 161 | #[cfg(feature = "defmt")] |
| 162 | macro_rules! unwrap { | 162 | macro_rules! unwrap { |
| 163 | ($($x:tt)*) => { | 163 | ($($x:tt)*) => { |
| 164 | defmt::unwrap!($($x)*) | 164 | ::defmt::unwrap!($($x)*) |
| 165 | }; | 165 | }; |
| 166 | } | 166 | } |
| 167 | 167 | ||
