aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorKonstantin K. Oblaukhov <oblaukhov@sl.iae.nsk.su>2019-04-09 13:40:54 +0700
committerKonstantin K. Oblaukhov <oblaukhov@sl.iae.nsk.su>2019-04-09 15:16:36 +0700
commit6dc1071c9f5f470dc4956ce78d59040499b76e07 (patch)
tree8a1cb5537963be04056e3292898d3291e73d3459 /os
parenta9b84aa0361442234a9c664dd06c97b6587e9d8c (diff)
downloadChibiOS-Contrib-6dc1071c9f5f470dc4956ce78d59040499b76e07.tar.gz
ChibiOS-Contrib-6dc1071c9f5f470dc4956ce78d59040499b76e07.tar.bz2
ChibiOS-Contrib-6dc1071c9f5f470dc4956ce78d59040499b76e07.zip
EXT test rewritten.
Add default value for NRF5_PAL_PAD_TO_EVENT macro.
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/NRF5/LLD/GPIOv1/hal_pal_lld.h8
1 files changed, 8 insertions, 0 deletions
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. */