diff options
author | Anton Staaf <robotboy@chromium.org> | 2014-11-10 11:31:29 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-11-13 03:14:37 +0000 |
commit | 48b8c34aedd018ff603f00c1daa97a382bd7055e (patch) | |
tree | e3da23aaf9bf1408c83d4db93670942aa17f6c4e /include/usb_console.h | |
parent | 8e25d9e1fc4e23c8f379dac8bd9fbdbf09b602c3 (diff) | |
download | chrome-ec-48b8c34aedd018ff603f00c1daa97a382bd7055e.tar.gz |
ryu: Enable PD/EC console over USB
This enables forwarding of the local PD/EC console
over debug USB. It gates the console functionality
based on the CCD mode that is set.
Signed-off-by: Anton Staaf <robotboy@chromium.org>
BRANCH=None
BUG=None
TEST=make buildall -j
Enable partial CCD mode on ryu and verify that it is
enumerated by the host correctly, but doesn't respond
to console input, and doesn't generate output.
Enable full CCD mode on ryu and verify that it is
enumerated and that the console works as expected.
Verify that the console still works by default on the
discovery-stm32f072 board.
Change-Id: I0325ce9689486c41387d6075330be1d7d42f1d42
Reviewed-on: https://chromium-review.googlesource.com/229342
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Commit-Queue: Anton Staaf <robotboy@chromium.org>
Tested-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'include/usb_console.h')
-rw-r--r-- | include/usb_console.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/usb_console.h b/include/usb_console.h index 9666fa425a..18526cfd87 100644 --- a/include/usb_console.h +++ b/include/usb_console.h @@ -10,6 +10,8 @@ #ifdef CONFIG_USB_CONSOLE +#include <stdarg.h> + /** * Put a null-terminated string to the USB console, like fputs(). * @@ -41,6 +43,15 @@ int usb_putc(int c); */ int usb_getc(void); +/** + * Enable and Disable the USB console. + * + * By default the console is enabled, this should not be a problem since it + * is not accessible until the USB peripheral is also initialized, which can + * be delayed. + */ +void usb_console_enable(int enabled); + #define usb_va_start va_start #define usb_va_end va_end #else |