diff options
-rw-r--r-- | os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.c | 19 | ||||
-rw-r--r-- | os/hal/ports/NRF5/NRF52832/nrf52_isr.c | 16 |
2 files changed, 13 insertions, 22 deletions
diff --git a/os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.c b/os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.c index 4966007..bca8855 100644 --- a/os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.c +++ b/os/hal/ports/NRF5/LLD/TIMERv1/hal_icu_lld.c @@ -301,25 +301,6 @@ static void start_channels(ICUDriver *icup) { /* Driver interrupt handlers. */ /*===========================================================================*/ -#if NRF5_ICU_USE_GPIOTE_PPI -/** - * @brief GPIOTE events interrupt handler. - * @note It is assumed that the various sources are only activated if the - * associated callback pointer is not equal to @p NULL in order to not - * perform an extra check in a potentially critical interrupt handler. - * - * @isr - */ -OSAL_IRQ_HANDLER(Vector58) { - - OSAL_IRQ_PROLOGUE(); - - icu_lld_serve_gpiote_interrupt(&ICUD1); - - OSAL_IRQ_EPILOGUE(); -} -#endif /* NRF5_ICU_USE_GPIOTE_PPI */ - #if NRF5_ICU_USE_TIMER0 /** * @brief TIMER0 compare interrupt handler. diff --git a/os/hal/ports/NRF5/NRF52832/nrf52_isr.c b/os/hal/ports/NRF5/NRF52832/nrf52_isr.c index 7374f36..431bb3b 100644 --- a/os/hal/ports/NRF5/NRF52832/nrf52_isr.c +++ b/os/hal/ports/NRF5/NRF52832/nrf52_isr.c @@ -41,6 +41,10 @@ /* Driver local functions. */
/*===========================================================================*/
+#if (HAL_USE_ICU && NRF5_ICU_USE_GPIOTE_PPI)
+extern void icu_lld_serve_gpiote_interrupt(ICUDriver *icup);
+#endif
+
/*===========================================================================*/
/* Driver interrupt handlers. */
/*===========================================================================*/
@@ -53,15 +57,21 @@ OSAL_IRQ_HANDLER(Vector58) {
OSAL_IRQ_PROLOGUE();
-
+
+#if (HAL_USE_ICU && NRF5_ICU_USE_GPIOTE_PPI)
+ icu_lld_serve_gpiote_interrupt(&ICUD1);
+#endif
+
+#if (HAL_USE_PAL && (PAL_USE_WAIT || PAL_USE_CALLBACKS))
for (int ch = 0; ch < NRF5_GPIOTE_NUM_CHANNELS; ch++)
{
if (NRF_GPIOTE->EVENTS_IN[ch])
{
- NRF_GPIOTE->EVENTS_IN[ch] = 0;
- _pal_isr_code(ch);
+ NRF_GPIOTE->EVENTS_IN[ch] = 0;
+ _pal_isr_code(ch);
}
}
+#endif
OSAL_IRQ_EPILOGUE();
}
|