From 77802167707483af7c8228bb50a14872e162ca84 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Fri, 9 Aug 2024 14:48:56 +0100 Subject: [PATCH] Patch for Pico SDK 2.0.0. --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 60fe192..a17067d 100644 --- a/main.cpp +++ b/main.cpp @@ -94,7 +94,7 @@ bool cdc_wait_for(std::string_view data, uint timeout_ms=50) { while(1){ tud_task(); if (cdc_task((uint8_t *)&got_char, 1) == 1) break; - if(check_timeout(&ts)) return false; + if(check_timeout(&ts, false)) return false; } if (got_char != expected_char) return false; } @@ -111,7 +111,7 @@ size_t cdc_get_bytes(const uint8_t *buffer, const size_t len, const uint timeout check_timeout_fn check_timeout = init_single_timeout_until(&ts, until); size_t bytes_remaining = len; - while (bytes_remaining && !check_timeout(&ts)) { + while (bytes_remaining && !check_timeout(&ts, false)) { tud_task(); // tinyusb device task size_t bytes_read = cdc_task(p, std::min(bytes_remaining, MAX_UART_PACKET)); bytes_remaining -= bytes_read;