aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/Win32/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/Win32/console.c')
-rw-r--r--os/hal/platforms/Win32/console.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/os/hal/platforms/Win32/console.c b/os/hal/platforms/Win32/console.c
index 0c47ff491..7c6bd705d 100644
--- a/os/hal/platforms/Win32/console.c
+++ b/os/hal/platforms/Win32/console.c
@@ -47,9 +47,12 @@ BaseChannel CD1;
static size_t writes(void *ip, const uint8_t *bp, size_t n) {
+ size_t ret;
(void)ip;
- return fwrite(bp, 1, n, stdout);
+ ret = fwrite(bp, 1, n, stdout);
+ fflush(stdout);
+ return ret;
}
static size_t reads(void *ip, uint8_t *bp, size_t n) {
@@ -87,10 +90,13 @@ static msg_t gett(void *ip, systime_t time) {
}
static size_t writet(void *ip, const uint8_t *bp, size_t n, systime_t time) {
+ size_t ret;
(void)ip;
(void)time;
- return fwrite(bp, 1, n, stdout);
+ ret = fwrite(bp, 1, n, stdout);
+ fflush(stdout);
+ return ret;
}
static size_t readt(void *ip, uint8_t *bp, size_t n, systime_t time) {