Skip to content

Commit 1c75408

Browse files
aescolarfabiobaltieri
authored andcommitted
boards nrf_bsim: Add NVIC_GetPendingIRQ() equivalent
Add a substitute for NVIC_GetPendingIRQ() Signed-off-by: Alberto Escolar Piedras <[email protected]>
1 parent c4e6ec8 commit 1c75408

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

boards/native/nrf_bsim/common/cmsis/cmsis.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ void NVIC_DisableIRQ(IRQn_Type IRQn)
3030
hw_irq_ctrl_disable_irq(CONFIG_NATIVE_SIMULATOR_MCU_N, IRQn);
3131
}
3232

33+
uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn)
34+
{
35+
return hw_irq_ctrl_is_irq_pending(CONFIG_NATIVE_SIMULATOR_MCU_N, IRQn);
36+
}
37+
3338
void NVIC_EnableIRQ(IRQn_Type IRQn)
3439
{
3540
hw_irq_ctrl_enable_irq(CONFIG_NATIVE_SIMULATOR_MCU_N, IRQn);

boards/native/nrf_bsim/common/cmsis/cmsis.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ void __set_PRIMASK(uint32_t primask);
3030
void NVIC_SetPendingIRQ(IRQn_Type IRQn);
3131
void NVIC_ClearPendingIRQ(IRQn_Type IRQn);
3232
void NVIC_DisableIRQ(IRQn_Type IRQn);
33+
uint32_t NVIC_GetPendingIRQ(IRQn_Type IRQn);
3334
void NVIC_EnableIRQ(IRQn_Type IRQn);
3435
void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority);
3536
uint32_t NVIC_GetPriority(IRQn_Type IRQn);

0 commit comments

Comments
 (0)