diff options
| author | hathach <[email protected]> | 2019-10-25 21:20:05 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-10-25 21:20:05 +0700 |
| commit | 4e8c57171c7db9cf5e7110de5bf5d86bfae917cf (patch) | |
| tree | a6ab67e72d55ef01f0253d32cac37e99062ab798 /examples/device/board_test/src | |
| parent | d0146be00b4dd41826f29e36bb10e0ecafce5e47 (diff) | |
| parent | 5d975d93139e0ce346372dc07ca34ef9df7b0287 (diff) | |
Merge branch 'master' into cr1901-msp430f5529
Diffstat (limited to 'examples/device/board_test/src')
| -rw-r--r-- | examples/device/board_test/src/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/device/board_test/src/main.c b/examples/device/board_test/src/main.c index 0126110ed..865821745 100644 --- a/examples/device/board_test/src/main.c +++ b/examples/device/board_test/src/main.c @@ -42,6 +42,8 @@ enum { BLINK_UNPRESSED = 1000 }; +#define HELLO_STR "Hello from TinyUSB\n" + int main(void) { board_init(); @@ -53,9 +55,15 @@ int main(void) { uint32_t interval_ms = board_button_read() ? BLINK_PRESSED : BLINK_UNPRESSED; + // uart echo +// uint8_t ch; +// if ( board_uart_read(&ch, 1) ) board_uart_write(&ch, 1); + // Blink every interval ms if ( !(board_millis() - start_ms < interval_ms) ) { + board_uart_write(HELLO_STR, strlen(HELLO_STR)); + start_ms = board_millis(); board_led_write(led_state); |
