summaryrefslogtreecommitdiff
path: root/include/uart.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-09-10 10:25:18 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-09-11 22:41:22 +0000
commitaf12f2f58c001dfa999591c29b055b7ba95379ba (patch)
tree48867e99e48a62ae818b177cd45b1519d6ceaf5b /include/uart.h
parent6b1dace9f456d5b1b160402866045c3659e665e0 (diff)
downloadchrome-ec-af12f2f58c001dfa999591c29b055b7ba95379ba.tar.gz
stm32: Support DMA-based UART output
This reduces the number of UART interrupts by a factor of 12, and reduces the overall interrupt rate on STM32 by a factor of 2. BUG=chrome-os-partner:20485 BRANCH=none (not required for pit branch) TEST=Boot pit. Ctrl+Q pauses debug output; Ctrl+S resumes it. 'crash divzero' still prints a full crash dump. And util/makeall.sh passes builds all platforms and passes tests. Change-Id: I86993e14b436150298dcb2c6d29086cc3c9db418 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/168814
Diffstat (limited to 'include/uart.h')
-rw-r--r--include/uart.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uart.h b/include/uart.h
index fa50645270..fec3fd47ec 100644
--- a/include/uart.h
+++ b/include/uart.h
@@ -127,6 +127,19 @@ void uart_tx_flush(void);
int uart_tx_ready(void);
/**
+ * Return non-zero if UART is ready to start a DMA transfer.
+ */
+int uart_tx_dma_ready(void);
+
+/**
+ * Start a UART transmit DMA transfer
+ *
+ * @param src Pointer to data to send
+ * @param len Length of transfer in bytes
+ */
+void uart_tx_dma_start(const char *src, int len);
+
+/**
* Return non-zero if the UART has a character available to read.
*/
int uart_rx_available(void);