summaryrefslogtreecommitdiff
path: root/zephyr/shim/include
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2021-06-28 12:29:37 +0200
committerCommit Bot <commit-bot@chromium.org>2021-07-02 09:42:58 +0000
commit3bb10dd59fa68b2b5a3e0d4e560bda9bef4efcd8 (patch)
tree3a9a14c13b6683e7cf0ab2a574c940ae16124b94 /zephyr/shim/include
parent5ca2bdaf876c5ee91f4adbc9bb634b9d4f035d2d (diff)
downloadchrome-ec-3bb10dd59fa68b2b5a3e0d4e560bda9bef4efcd8.tar.gz
zephyr: change host console shim interface
Allow passing a whole string to the console buffer, which is sent to host. This should speed up printing because a mutex doesn't have to be locked for every char separately. BUG=b:191724484 BRANCH=none TEST=Make sure buffering of console to host works with the 'ectool console' command Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I5b081984bfa4f930ad4729b19975b1c2eb4bbd18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988193 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'zephyr/shim/include')
-rw-r--r--zephyr/shim/include/zephyr_console_shim.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/zephyr/shim/include/zephyr_console_shim.h b/zephyr/shim/include/zephyr_console_shim.h
index 03e2d115c6..df9f189c9a 100644
--- a/zephyr/shim/include/zephyr_console_shim.h
+++ b/zephyr/shim/include/zephyr_console_shim.h
@@ -56,11 +56,12 @@ int zshim_run_ec_console_command(int (*handler)(int argc, char **argv),
_ZEPHYR_SHELL_COMMAND_SHIM(NAME, ROUTINE, ARGDESC, HELP)
/**
- * console_buf_notify_char() - Notify the console host command buffer
- * of a new character on the console.
+ * console_buf_notify_chars() - Notify the console host command buffer
+ * of bytes on the console.
*
- * @c: The character that appeared on the console.
+ * @s: The pointer to the string.
+ * @len: The size of the string.
*/
-void console_buf_notify_char(char c);
+void console_buf_notify_chars(const char *s, size_t len);
#endif /* __CROS_EC_ZEPHYR_CONSOLE_SHIM_H */