summaryrefslogtreecommitdiff
path: root/common/usb_console_stream.c
Commit message (Collapse)AuthorAgeFilesLines
* util: enable chargen for USB consoleNamyoon Woo2020-01-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows chargen to print output to USB instead of UART, which is chosen by command parameter. If USB console is not supported, then the parameter will be ignored, and output shall go to UART port. The patch increases flash usage by 48 bytes if CONFIG_CMD_CHARGEN is defined. BUG=chromium:992607 BRANCH=None TEST=manually ran on fleex. for BOARD in {cr50, fleex} 1. Define CONFIG_CMD_CHARGEN in board/cr50/board.h, and baseboard/octopus/baseboard.h. 2. Build binaries, and program them. 3. Connect CCD to Octopus Fleex. 4. Open terminal to Cr50 and EC consoles, and run chargen (cr50) chargen 1 4 > // no output, because they went to UART. (cr50) chargen 1 4 usb 0000 > (ec) chargen 1 4 0000 > (ec) chargen 1 4 usb // usb parameter gets ignored. 0000 > Change-Id: I5810421fef56548e0bd667488e853e724f699a31 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1769386 Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* g: re-implement usb console with usb-stream configuration.Namyoon Woo2019-09-191-0/+233
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 <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1741302 Reviewed-by: Mary Ruthven <mruthven@chromium.org>