Add function to get the active HSEM interrupt
This commit is contained in:
parent
462daeeb49
commit
4972dbd91b
1 changed files with 5 additions and 0 deletions
|
@ -158,6 +158,11 @@ impl<'d, T: Instance> HardwareSemaphore<'d, T> {
|
||||||
.modify(|w| w.set_ise(sem_x, enable));
|
.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.
|
/// Clears the interrupt flag for the semaphore.
|
||||||
pub fn clear_interrupt(&mut self, core_id: CoreId, sem_x: usize) {
|
pub fn clear_interrupt(&mut self, core_id: CoreId, sem_x: usize) {
|
||||||
T::regs()
|
T::regs()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue