diff options
Diffstat (limited to 'bsps/arm/atsam/include/libchip/include/pio_it.h')
-rw-r--r-- | bsps/arm/atsam/include/libchip/include/pio_it.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bsps/arm/atsam/include/libchip/include/pio_it.h b/bsps/arm/atsam/include/libchip/include/pio_it.h index b03973caa1..e3b6221205 100644 --- a/bsps/arm/atsam/include/libchip/include/pio_it.h +++ b/bsps/arm/atsam/include/libchip/include/pio_it.h @@ -66,6 +66,7 @@ */ #include "pio.h" +#include <rtems.h> #ifdef __cplusplus extern "C" { @@ -80,6 +81,8 @@ extern void PIO_InitializeInterrupts(uint32_t dwPriority); extern void PIO_ConfigureIt(const Pin *pPin, void (*handler)(const Pin *, void *arg), void *arg); +extern rtems_status_code PIO_RemoveIt(const Pin *pPin, + void (*handler)(const Pin *, void *arg), void *arg); /** * Enables the given interrupt source if it has been configured. The status @@ -103,6 +106,16 @@ static inline void PIO_DisableIt(const Pin *pPin) pPin->pio->PIO_IDR = pPin->mask; } +/** + * Check whether a given interrupt source is active. + * + * \param pPin Interrupt source to check. + */ +static inline bool PIO_ItIsActive(const Pin *pPin) +{ + return ((pPin->pio->PIO_IMR & pPin->mask) != 0); +} + extern void PIO_IT_InterruptHandler(void); extern void PioInterruptHandler(uint32_t id, Pio *pPio); |