diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-08-15 16:20:56 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-24 08:35:00 +0000 |
commit | df00f2c6857b73db36fe9082128422bb788bf1cb (patch) | |
tree | 33c18690cdb0ab716800d3116949e469b0816dcf /include/uart.h | |
parent | 20652520d6004778a447d01c6dac2bc5d4a76d68 (diff) | |
download | chrome-ec-df00f2c6857b73db36fe9082128422bb788bf1cb.tar.gz |
uart: Add uart_put_raw
uart_put_raw sends byte stream without translating '\n' to '\r\n'.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/119329144,chromium:998135
BRANCH=none
TEST=Boot Nami
Change-Id: Iaac4244d45231bf5904d917f2f446f87e8e10c50
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1757273
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/uart.h')
-rw-r--r-- | include/uart.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/uart.h b/include/uart.h index e333196d4a..502757cdf2 100644 --- a/include/uart.h +++ b/include/uart.h @@ -48,7 +48,7 @@ int uart_putc(int c); int uart_puts(const char *outstr); /** - * Put byte stream to the UART + * Put byte stream to the UART while translating '\n' to '\r\n' * * @param out Pointer to data to send * @param len Length of transfer in bytes @@ -57,6 +57,15 @@ int uart_puts(const char *outstr); int uart_put(const char *out, int len); /** + * Put raw byte stream to the UART + * + * @param out Pointer to data to send + * @param len Length of transfer in bytes + * @return EC_SUCCESS, or non-zero if output was truncated. + */ +int uart_put_raw(const char *out, int len); + +/** * Print formatted output to the UART, like printf(). * * See printf.h for valid formatting codes. |