summaryrefslogtreecommitdiff
path: root/src/stmf0/ao_arch_funcs.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-10-30 19:06:20 -0700
committerKeith Packard <keithp@keithp.com>2016-10-30 19:07:39 -0700
commit148f6e0a107d9e88509958700351794f2f971312 (patch)
treeb8deba59053ff64b106ea5272cf9c4c8fa0b6d76 /src/stmf0/ao_arch_funcs.h
parent26f2727eac0cca8930dde9d757bc094f73801859 (diff)
altos/stmf0: Add USART support
The STM32F0 usart can be operated much like the STM32L usart, but the registers are all moved around. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stmf0/ao_arch_funcs.h')
-rw-r--r--src/stmf0/ao_arch_funcs.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/stmf0/ao_arch_funcs.h b/src/stmf0/ao_arch_funcs.h
index 8b6234c4..d35bafbd 100644
--- a/src/stmf0/ao_arch_funcs.h
+++ b/src/stmf0/ao_arch_funcs.h
@@ -314,7 +314,18 @@ struct ao_stm_usart {
struct ao_fifo rx_fifo;
struct ao_fifo tx_fifo;
struct stm_usart *reg;
- uint8_t tx_started;
+ uint8_t tx_running;
+ uint8_t draining;
+#if HAS_SERIAL_SW_FLOW
+ /* RTS - 0 if we have FIFO space, 1 if not
+ * CTS - 0 if we can send, 0 if not
+ */
+ struct stm_gpio *gpio_rts;
+ struct stm_gpio *gpio_cts;
+ uint8_t pin_rts;
+ uint8_t pin_cts;
+ uint8_t rts;
+#endif
};
#if HAS_SERIAL_1