From 6dc1071c9f5f470dc4956ce78d59040499b76e07 Mon Sep 17 00:00:00 2001 From: "Konstantin K. Oblaukhov" Date: Tue, 9 Apr 2019 13:40:54 +0700 Subject: EXT test rewritten. Add default value for NRF5_PAL_PAD_TO_EVENT macro. --- os/hal/ports/NRF5/LLD/GPIOv1/hal_pal_lld.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'os/hal') diff --git a/os/hal/ports/NRF5/LLD/GPIOv1/hal_pal_lld.h b/os/hal/ports/NRF5/LLD/GPIOv1/hal_pal_lld.h index 2df3fd3..e9021eb 100644 --- a/os/hal/ports/NRF5/LLD/GPIOv1/hal_pal_lld.h +++ b/os/hal/ports/NRF5/LLD/GPIOv1/hal_pal_lld.h @@ -155,6 +155,14 @@ typedef uint32_t iopadid_t; #define NRF5_GPIOTE_NUM_CHANNELS (8) #endif +/** + * @brief Pad to event number + * @details Converts pad to GPIOTE peripheral pad event number + */ +#if !defined(NRF5_PAL_PAD_TO_EVENT) || defined(__DOXYGEN__) +#define NRF5_PAL_PAD_TO_EVENT(pad) ((pad) % NRF5_GPIOTE_NUM_CHANNELS) +#endif + /*===========================================================================*/ /* Implementation, some of the following macros could be implemented as */ /* functions, if so please put them in pal_lld.c. */ -- cgit v1.2.3