diff options
| author | Andrzej Tokarski <[email protected]> | 2022-11-21 21:45:10 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-21 21:45:10 +0100 |
| commit | b41f5eadb3143d0bfaf211d9bc84c95e5d623c29 (patch) | |
| tree | 313da7c8988a2b443e6ab5647fa1177e84e424a6 /examples/device | |
| parent | 89eac75085134d570dc26dffaf3d8f204aef5359 (diff) | |
| parent | 4a2e424103b0a2626a6cb464a350c68ae109cc7e (diff) | |
Merge branch 'master' into midihost
Diffstat (limited to 'examples/device')
| -rw-r--r-- | examples/device/board_test/src/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/device/board_test/src/main.c b/examples/device/board_test/src/main.c index 5e28cbb27..0289ca15f 100644 --- a/examples/device/board_test/src/main.c +++ b/examples/device/board_test/src/main.c @@ -56,7 +56,7 @@ int main(void) { uint32_t interval_ms = board_button_read() ? BLINK_PRESSED : BLINK_UNPRESSED; - // Blink every interval ms + // Blink and print every interval ms if ( !(board_millis() - start_ms < interval_ms) ) { board_uart_write(HELLO_STR, strlen(HELLO_STR)); @@ -66,6 +66,13 @@ int main(void) board_led_write(led_state); led_state = 1 - led_state; // toggle } + + // echo + uint8_t ch; + if ( board_uart_read(&ch, 1) > 0 ) + { + board_uart_write(&ch, 1); + } } return 0; |
