summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2011-10-25 12:54:06 -0700
committerRandall Spangler <rspangler@chromium.org>2011-10-25 12:55:10 -0700
commit4b87c940b09ca3814a10d1e15ba5db17fa4136e5 (patch)
treedeec18d59a78a09895feb32e25cd0a2b06ca2146
parent9f297442735c16f77f9bc8379262044072f0cd6b (diff)
downloadchrome-ec-4b87c940b09ca3814a10d1e15ba5db17fa4136e5.tar.gz
Add EcUartPutsPolled(), for polled output from fault handlers.
BUG=none TEST=make && make runtests Change-Id: I0c07cda5c87e586f0932521b0a8268379df1da7f
-rw-r--r--chip_interface/ec_uart.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/chip_interface/ec_uart.h b/chip_interface/ec_uart.h
index 8f49d43cce..4fdb273ba7 100644
--- a/chip_interface/ec_uart.h
+++ b/chip_interface/ec_uart.h
@@ -42,6 +42,16 @@ EcError EcUartPrintf(const char* format, ...);
* Returns error if output was truncated. */
EcError EcUartPuts(const char* outstr);
+/* Put a null-terminated string to the UART using polling mode, like puts().
+ *
+ * Writes directly to the UART, bypassing any buffering or resource
+ * locks, blocking until the entire string has been passed to the
+ * UART. This can be used for ensuring debug output when the system
+ * is in a questionable state such as when a fault occurs.
+ *
+ * Do not use during normal operation; use EcUartPuts() instead. */
+void EcUartPutsPolled(const char* outstr);
+
/* Flushes output. Blocks until UART has transmitted all output. */
void EcUartFlushOutput(void);