From 16d2b24ac05f7a5654bddcf9cb61f0f6684d1806 Mon Sep 17 00:00:00 2001 From: Namyoon Woo Date: Thu, 8 Aug 2019 09:46:43 -0700 Subject: g: re-implement usb console with usb-stream configuration. This patch introduces CONFIG_USB_CONSOLE_STREAM, which implements usb-console with usb-stream configuration, intending to remove code redundancy between the previous implementation (usb_console.c) and usb_stream.c. Flash usage decreases by 224 bytes, and RAM usage by 40 bytes. BUG=b:138447451 BRANCH=cr50 TEST=Checked cr50 USB console and cr50 UART console respectively. Key-in response and output are working well: ./util/uart_stress_tester.py /dev/ttyUSB0 -t 300 --debug Change-Id: I305038e1db83dc49bb12a8afdbfcc2a8135d50f5 Signed-off-by: Namyoon Woo Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741302 Reviewed-by: Mary Ruthven --- include/config.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/config.h') diff --git a/include/config.h b/include/config.h index 5b3d99d37b..53db82d683 100644 --- a/include/config.h +++ b/include/config.h @@ -3944,6 +3944,13 @@ /* Enable USB serial console module. */ #undef CONFIG_USB_CONSOLE +/* + * Enable USB serial console module using usb stream config. + * NOTE: CONFIG_USB_CONSOLE and CONFIG_USB_CONSOLE_STREAM should be defined + * exclusively each other. + */ +#undef CONFIG_USB_CONSOLE_STREAM + /* USB serial console transmit buffer size in bytes. */ #define CONFIG_USB_CONSOLE_TX_BUF_SIZE 2048 -- cgit v1.2.1