README.rst
1.. zephyr:code-sample:: console_echo
2 :name: Console echo
3 :relevant-api: console_api
4
5 Echo an input character back to the output using the Console API.
6
7Overview
8********
9
10This example shows how the :c:func:`console_getchar` and
11:c:func:`console_putchar` functions can be used to echo an input character
12back to the console.
13
14Requirements
15************
16
17UART console is required to run this sample.
18
19Building and Running
20********************
21
22Build and flash the sample as follows, changing ``nucleo_f401re`` for your
23board. Alternatively you can run this using QEMU, as described in
24:zephyr:code-sample:`console_getchar`.
25
26.. zephyr-app-commands::
27 :zephyr-app: samples/subsys/console/echo
28 :host-os: unix
29 :board: nucleo_f401re
30 :goals: build flash
31 :compact:
32
33Following the initial prompt given by the firmware, start pressing keys on a
34keyboard, and they will be echoed back to the terminal program you are using.
35
36Sample Output
37=============
38
39.. code-block:: console
40
41 You should see another line with instructions below. If not,
42 the (interrupt-driven) console device doesn't work as expected:
43 Start typing characters to see them echoed back
44