Skip to content

Commit e1a84c7

Browse files
committed
itm: add busy check
1 parent 8a2ab27 commit e1a84c7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/peripheral/itm.rs

+7
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,13 @@ impl ITM {
204204
unsafe { self.lar.write(0xC5AC_CE55) }
205205
}
206206

207+
/// Indicates whether the ITM is currently processing events.
208+
/// Returns `true` if ITM events are present and are being drained.
209+
#[inline]
210+
pub fn busy(&self) -> bool {
211+
self.tcr.read().busy()
212+
}
213+
207214
/// Configures the ITM with the passed [ITMSettings]. Returns `true`
208215
/// if the configuration was successfully applied.
209216
#[allow(clippy::missing_inline_in_public_items)]

0 commit comments

Comments
 (0)