From e8207d01ee93c3824cdc5d72d4bf8241c14cf18e Mon Sep 17 00:00:00 2001 From: aberiggs Date: Thu, 16 Nov 2023 21:57:05 -0500 Subject: [PATCH] Added vexFileSync when writing to files --- src/system/dev/usd_driver.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/dev/usd_driver.c b/src/system/dev/usd_driver.c index 8c703b1d7..50bd39365 100644 --- a/src/system/dev/usd_driver.c +++ b/src/system/dev/usd_driver.c @@ -54,6 +54,8 @@ int usd_write_r(struct _reent* r, void* const arg, const uint8_t* buf, const siz usd_file_arg_t* file_arg = (usd_file_arg_t*)arg; // TODO: mutex here. Global or file lock? int32_t result = vexFileWrite((char*)buf, sizeof(*buf), len, file_arg->ifi_fptr); + // Flush the buffer + vexFileSync(file_arg->ifi_fptr); return result; }