From cd33832ea347eef0f2380964eddcd2e3744339ba Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 5 Jan 2019 19:24:22 +0000 Subject: Event enable check API added to PAL driver. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12530 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h') diff --git a/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h b/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h index 1d9033753..d6dd4df72 100644 --- a/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h +++ b/os/hal/ports/STM32/LLD/GPIOv2/hal_pal_lld.h @@ -472,6 +472,20 @@ typedef uint32_t iopadid_t; #define pal_lld_get_line_event(line) \ &_pal_events[PAL_PAD(line)] +/** + * @brief Pad event enable check. + * + * @param[in] port port identifier + * @param[in] pad pad number within the port + * @return Pad event status. + * @retval false if the pad event is disabled. + * @retval true if the pad event is enabled. + * + * @notapi + */ +#define pal_lld_ispadeventenabled(port, pad) \ + (bool)((EXTI->IMR & (1U << (uint32_t)pad)) != 0U) + #if !defined(__DOXYGEN__) extern palevent_t _pal_events[16]; #endif -- cgit v1.2.3