diff options
author | Dave Curtis <davecurtis@sonic.net> | 2015-10-31 10:44:20 -0700 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-11-01 23:23:39 +0000 |
commit | 32b3549cce7a965d92a81db02c7adc973f08d74c (patch) | |
tree | 8159317d2091e30cf33093dacdbfae76c8d374fc /stmhal/uart.c | |
parent | 056cb288d9a3d5aa35b3cf549f88688b9ba60163 (diff) | |
download | micropython-32b3549cce7a965d92a81db02c7adc973f08d74c.tar.gz micropython-32b3549cce7a965d92a81db02c7adc973f08d74c.zip |
stmhal: Add symbolic #defines for interrupt levels in irq.h.
Diffstat (limited to 'stmhal/uart.c')
-rw-r--r-- | stmhal/uart.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/uart.c b/stmhal/uart.c index 79c272bdb3..b353f5d9e3 100644 --- a/stmhal/uart.c +++ b/stmhal/uart.c @@ -35,6 +35,7 @@ #include "py/mphal.h" #include "uart.h" #include "pybioctl.h" +#include "irq.h" //TODO: Add UART7/8 support for MCU_SERIES_F7 @@ -503,7 +504,7 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, mp_uint_t n_args, con self->read_buf_len = args[7].u_int; self->read_buf = m_new(byte, args[7].u_int << self->char_width); __HAL_UART_ENABLE_IT(&self->uart, UART_IT_RXNE); - HAL_NVIC_SetPriority(self->irqn, 0xd, 0xd); // next-to-next-to lowest priority + HAL_NVIC_SetPriority(self->irqn, IRQ_PRI_UART, IRQ_SUBPRI_UART); HAL_NVIC_EnableIRQ(self->irqn); } |