From bc1d2835e816d6a0bacafbad03954018e31a1c45 Mon Sep 17 00:00:00 2001 From: Stephane D'Alu Date: Tue, 17 May 2016 18:15:47 +0200 Subject: Enable priority validation, Fixed priorirty (nRF51 use a 2bits priority) --- os/hal/ports/NRF51/NRF51822/hal_serial_lld.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'os/hal/ports/NRF51/NRF51822/hal_serial_lld.h') 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. */ /*===========================================================================*/ -- cgit v1.2.3