mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 08:12:30 +00:00
Add function to get the active HSEM interrupt
This commit is contained in:
parent
462daeeb49
commit
4972dbd91b
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user