From 5d4d8cc7b1d35a90bbd6d5ffd2d3050b2bfc861c Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Mon, 23 Dec 2024 11:27:34 +0100 Subject: [PATCH] hid_host_demo, hog_host_demo: fflush after each character to deal with line buffering --- example/hid_host_demo.c | 1 + example/hog_host_demo.c | 1 + 2 files changed, 2 insertions(+) diff --git a/example/hid_host_demo.c b/example/hid_host_demo.c index 245427b4b..6dd93609c 100644 --- a/example/hid_host_demo.c +++ b/example/hid_host_demo.c @@ -283,6 +283,7 @@ static void hid_host_handle_interrupt_report(const uint8_t * report, uint16_t re continue; } printf("%c", key); + fflush(stdout); } memcpy(last_keys, new_keys, NUM_KEYS); } diff --git a/example/hog_host_demo.c b/example/hog_host_demo.c index 7e26ba454..dd1efcf86 100644 --- a/example/hog_host_demo.c +++ b/example/hog_host_demo.c @@ -224,6 +224,7 @@ static void hid_handle_input_report(uint8_t service_index, const uint8_t * repor continue; } printf("%c", key); + fflush(stdout); } memcpy(last_keys, new_keys, NUM_KEYS); }