diff options
| author | hathach <[email protected]> | 2020-09-04 00:50:10 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2020-09-04 00:50:10 +0700 |
| commit | 865ebf7c5db98ccc3f8f5f4fead9d8bba0e57c18 (patch) | |
| tree | bd270b2aba6333b30c7b07ac9a23dce105bf1872 /examples/host/cdc_msc_hid/src/main.c | |
| parent | 7828c396dbc287f9d9a0aa6af63a32108f139b94 (diff) | |
fflush(stdout) for keyboard host example
Diffstat (limited to 'examples/host/cdc_msc_hid/src/main.c')
| -rw-r--r-- | examples/host/cdc_msc_hid/src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/host/cdc_msc_hid/src/main.c b/examples/host/cdc_msc_hid/src/main.c index 209379b37..34503499f 100644 --- a/examples/host/cdc_msc_hid/src/main.c +++ b/examples/host/cdc_msc_hid/src/main.c @@ -143,6 +143,8 @@ static inline void process_kbd_report(hid_keyboard_report_t const *p_new_report) uint8_t ch = keycode2ascii[p_new_report->keycode[i]][is_shift ? 1 : 0]; putchar(ch); if ( ch == '\r' ) putchar('\n'); // added new line for enter key + + fflush(stdout); // flush right away, else nanolib will wait for newline } } // TODO example skips key released |
