Skip to content

Commit

Permalink
itm: add busy check
Browse files Browse the repository at this point in the history
  • Loading branch information
tmplt committed Jan 4, 2022
1 parent 7c3173f commit 34ff684
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/peripheral/itm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down

0 comments on commit 34ff684

Please sign in to comment.