summaryrefslogtreecommitdiff
path: root/include/uart.h
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2018-06-08 16:02:10 +0200
committerchrome-bot <chrome-bot@chromium.org>2018-06-13 09:19:52 -0700
commit61e6d7cb5068b1d7ee0bf93763bb40d3b753581e (patch)
tree3e3a9f701d7fd87b1980c66faa4d8b6d7b227645 /include/uart.h
parentcbccb79691fc66e4958cc4f1c0d306dfd01a9f10 (diff)
downloadchrome-ec-61e6d7cb5068b1d7ee0bf93763bb40d3b753581e.tar.gz
stm32: move UART wake-up to uart code
Move the low-power mode UART register settings out of the STM32F0 low power mode code into the UART driver as a preparation for adding STM32H7 low power mode code. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=poppy BUG=b:75105319 TEST=make buildall Change-Id: Iecac8c387edd80c15fc3a211cf7969bbc6b8a15e Reviewed-on: https://chromium-review.googlesource.com/1096766 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'include/uart.h')
-rw-r--r--include/uart.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uart.h b/include/uart.h
index 5de1af92d6..d17b161ae5 100644
--- a/include/uart.h
+++ b/include/uart.h
@@ -216,6 +216,17 @@ void uart_deepsleep_interrupt(enum gpio_signal signal);
static inline void uart_deepsleep_interrupt(enum gpio_signal signal) { }
#endif /* !CONFIG_LOW_POWER_IDLE */
+#if defined(HAS_TASK_CONSOLE) && defined(CONFIG_FORCE_CONSOLE_RESUME)
+/**
+ * Enable/Disable the UART controller low-power mode wake-up capability.
+ *
+ * @param enable 1 to enable wake-up, 0 to disable it.
+ */
+void uart_enable_wakeup(int enable);
+#elif !defined(CHIP_FAMILY_NPCX5)
+static inline void uart_enable_wakeup(int enable) {}
+#endif
+
#ifdef CONFIG_UART_INPUT_FILTER
/**
* Application-specific input filter, which takes the next input character as