summaryrefslogtreecommitdiff
path: root/include/uart.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uart.h')
-rw-r--r--include/uart.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/uart.h b/include/uart.h
index 05d4aee036..d98d9eb48e 100644
--- a/include/uart.h
+++ b/include/uart.h
@@ -127,6 +127,11 @@ void uart_tx_flush(void);
int uart_tx_ready(void);
/**
+ * Return non-zero if a transmit is in progress.
+ */
+int uart_tx_in_progress(void);
+
+/**
* Return non-zero if the UART has a character available to read.
*/
int uart_rx_available(void);
@@ -187,6 +192,33 @@ int uart_tx_stopped(void);
*/
void uart_process(void);
+/**
+ * Return boolean expressing whether UART buffer is empty or not.
+ */
+int uart_buffer_empty(void);
+
+/**
+ * Disable the EC console UART and convert the UART RX pin to a generic GPIO
+ * with an edge detect interrupt.
+ */
+void uart_enter_dsleep(void);
+
+/**
+ * Enable the EC console UART after a uart_enter_dsleep().
+ */
+void uart_exit_dsleep(void);
+
+#ifdef CONFIG_LOW_POWER_IDLE
+/**
+ * Interrupt handler for UART RX pin transition in deep sleep.
+ *
+ * @param signal Signal which triggered the interrupt.
+ */
+void uart_deepsleep_interrupt(enum gpio_signal signal);
+#else
+#define uart_deepsleep_interrupt NULL
+#endif
+
/*
* COMx functions
*/