diff options
author | Tobias Badertscher <badi@baerospace.ch> | 2018-12-09 17:07:56 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-12-29 17:21:37 +1100 |
commit | 372e7a4dc6f565ac75b58e960fb480b520b9a07e (patch) | |
tree | 1be85bd89e4d12cc94411d89a3e1822293f4276a /ports/stm32/uart.h | |
parent | 06236bf28e0240b6a4193dae8f558a3804f5e4b6 (diff) |
stm32: Implement UART.irq() method with initial support for RX idle IRQ.
Diffstat (limited to 'ports/stm32/uart.h')
-rw-r--r-- | ports/stm32/uart.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ports/stm32/uart.h b/ports/stm32/uart.h index 285277515..e21b4dd9c 100644 --- a/ports/stm32/uart.h +++ b/ports/stm32/uart.h @@ -26,6 +26,8 @@ #ifndef MICROPY_INCLUDED_STM32_UART_H #define MICROPY_INCLUDED_STM32_UART_H +struct _mp_irq_obj_t; + typedef enum { PYB_UART_NONE = 0, PYB_UART_1 = 1, @@ -57,6 +59,9 @@ typedef struct _pyb_uart_obj_t { volatile uint16_t read_buf_head; // indexes first empty slot uint16_t read_buf_tail; // indexes first full slot (not full if equals head) byte *read_buf; // byte or uint16_t, depending on char size + uint16_t mp_irq_trigger; // user IRQ trigger mask + uint16_t mp_irq_flags; // user IRQ active IRQ flags + struct _mp_irq_obj_t *mp_irq_obj; // user IRQ object } pyb_uart_obj_t; extern const mp_obj_type_t pyb_uart_type; |