mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Merge pull request #3161 from diondokter/hsem
Add function to get the active HSEM interrupt
This commit is contained in:
commit
91f135e25b
@ -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