Skip to content

Commit d0340d5

Browse files
committed
boards: qemu: cortex_m0: use portable IRQ pending API
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by the NVIC on the Nordic hardware targets and by the POSIX-arch board interface on the simulated bsim targets, so the CMSIS emulation layer is no longer involved. Assisted-by: Claude:claude-opus-5 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
1 parent 0811368 commit d0340d5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

boards/qemu/cortex_m0/nrf_timer_timer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static void prevent_false_prev_evt(void)
9090
/* Clear interrupt that may have fired as we were setting the
9191
* comparator.
9292
*/
93-
NVIC_ClearPendingIRQ(TIMER0_IRQn);
93+
k_irq_clear_pending(TIMER0_IRQn);
9494
}
9595

9696
/* If settings is next tick from now, function attempts to set next tick. If
@@ -207,7 +207,7 @@ void sys_clock_set_timeout(uint32_t ticks, bool idle)
207207
* QEMU.
208208
*/
209209
event_clear();
210-
NVIC_ClearPendingIRQ(TIMER0_IRQn);
210+
k_irq_clear_pending(TIMER0_IRQn);
211211

212212
uint32_t now = counter();
213213

@@ -255,7 +255,7 @@ static int sys_clock_driver_init(void)
255255
}
256256

257257
event_clear();
258-
NVIC_ClearPendingIRQ(TIMER0_IRQn);
258+
k_irq_clear_pending(TIMER0_IRQn);
259259
int_enable();
260260

261261
return 0;

0 commit comments

Comments
 (0)