Merge pull request #3161 from diondokter/hsem

Add function to get the active HSEM interrupt
This commit is contained in:
Ulf Lilleengen 2024-07-31 14:34:11 +00:00 committed by GitHub
commit 91f135e25b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -158,6 +158,11 @@ impl<'d, T: Instance> HardwareSemaphore<'d, T> {
.modify(|w| w.set_ise(sem_x, enable));
}
/// Gets the interrupt flag for the semaphore.
pub fn is_interrupt_active(&mut self, core_id: CoreId, sem_x: usize) -> bool {
T::regs().isr(core_id_to_index(core_id)).read().isf(sem_x)
}
/// Clears the interrupt flag for the semaphore.
pub fn clear_interrupt(&mut self, core_id: CoreId, sem_x: usize) {
T::regs()