diff options
author | Stephane D'Alu <sdalu@sdalu.com> | 2016-05-17 18:15:47 +0200 |
---|---|---|
committer | Stephane D'Alu <sdalu@sdalu.com> | 2016-05-17 18:15:47 +0200 |
commit | bc1d2835e816d6a0bacafbad03954018e31a1c45 (patch) | |
tree | ec25a86980e297b825b5f56f7f0b42f24744148d /os/hal/ports/NRF51/NRF51822/hal_serial_lld.h | |
parent | b0dd73442bc0e0cd62a963b431aa9a72c6e86953 (diff) | |
download | ChibiOS-Contrib-bc1d2835e816d6a0bacafbad03954018e31a1c45.tar.gz ChibiOS-Contrib-bc1d2835e816d6a0bacafbad03954018e31a1c45.tar.bz2 ChibiOS-Contrib-bc1d2835e816d6a0bacafbad03954018e31a1c45.zip |
Enable priority validation, Fixed priorirty (nRF51 use a 2bits priority)
Diffstat (limited to 'os/hal/ports/NRF51/NRF51822/hal_serial_lld.h')
-rw-r--r-- | os/hal/ports/NRF51/NRF51822/hal_serial_lld.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/os/hal/ports/NRF51/NRF51822/hal_serial_lld.h b/os/hal/ports/NRF51/NRF51822/hal_serial_lld.h index 304c07d..79955b1 100644 --- a/os/hal/ports/NRF51/NRF51822/hal_serial_lld.h +++ b/os/hal/ports/NRF51/NRF51822/hal_serial_lld.h @@ -62,7 +62,7 @@ * @brief UART0 interrupt priority level setting.
*/
#if !defined(NRF51_SERIAL_UART0_PRIORITY) || defined(__DOXYGEN__)
-#define NRF51_SERIAL_UART0_PRIORITY 12
+#define NRF51_SERIAL_UART0_PRIORITY 3
#endif
/* Value indicating that no pad is connected to this UART register. */
@@ -75,6 +75,11 @@ /* Derived constants and error checks. */
/*===========================================================================*/
+#if NRF51_SERIAL_USE_UART0 && \
+ !OSAL_IRQ_IS_VALID_PRIORITY(NRF51_SERIAL_UART0_PRIORITY)
+#error "Invalid IRQ priority assigned to UART0"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/
|