diff --git a/src/peripheral/itm.rs b/src/peripheral/itm.rs index c58ceefd..0d133fca 100644 --- a/src/peripheral/itm.rs +++ b/src/peripheral/itm.rs @@ -196,6 +196,13 @@ impl ITM { unsafe { self.lar.write(0xC5AC_CE55) } } + /// Indicates whether the ITM is currently processing events. + /// Returns `true` if ITM events are present and are being drained. + #[inline] + pub fn busy(&self) -> bool { + self.tcr.read().busy() + } + /// Configures the ITM with the passed [ITMSettings]. Returns `true` /// if the configuration was successfully applied. pub fn configure(&mut self, settings: ITMSettings) -> Result<(), ITMConfigurationError> {