diff options
author | Damien George <damien.p.george@gmail.com> | 2018-12-10 23:53:26 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-12-10 23:55:11 +1100 |
commit | 025d419a779a7c53c80a0652a9d6c2fc232cc57f (patch) | |
tree | 01aceae24aa09939bb9bd554e9e18ea1c94aff66 | |
parent | dc23978ddeaf46f67f653a4653e07065aa7d6ad4 (diff) |
teensy: Add own uart.h to not rely on stm32's version of the file.
-rw-r--r-- | ports/teensy/uart.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ports/teensy/uart.h b/ports/teensy/uart.h new file mode 100644 index 000000000..fd9b26f95 --- /dev/null +++ b/ports/teensy/uart.h @@ -0,0 +1,16 @@ +#ifndef MICROPY_INCLUDED_TEENSY_UART_H +#define MICROPY_INCLUDED_TEENSY_UART_H + +typedef enum { + PYB_UART_NONE = 0, +} pyb_uart_t; + +typedef struct _pyb_uart_obj_t pyb_uart_obj_t; + +extern const mp_obj_type_t pyb_uart_type; + +mp_uint_t uart_rx_any(pyb_uart_obj_t *uart_obj); +int uart_rx_char(pyb_uart_obj_t *uart_obj); +void uart_tx_strn(pyb_uart_obj_t *uart_obj, const char *str, uint len); + +#endif // MICROPY_INCLUDED_TEENSY_UART_H |