From: Joey Castillo Date: Sat, 28 Aug 2021 23:34:31 +0000 (-0400) Subject: force sending data after a _write X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=048b5c1d3fdc9c58acccd5558fd3254fbf19ece8;p=sensor-watch.git force sending data after a _write --- diff --git a/watch-library/watch/watch_private.c b/watch-library/watch/watch_private.c index 7645fb2..c9f0b3c 100644 --- a/watch-library/watch/watch_private.c +++ b/watch-library/watch/watch_private.c @@ -94,6 +94,7 @@ int _write(int file, char *ptr, int len) { (void)file; if (hri_usbdevice_get_CTRLA_ENABLE_bit(USB)) { tud_cdc_n_write(0, (void const*)ptr, len); + tud_cdc_n_write_flush(0); return len; }