From 7e4fcb2fb11e7cb59d65a30e421268f35c3a604a Mon Sep 17 00:00:00 2001 From: z4yx Date: Mon, 10 Jun 2024 01:09:45 +0800 Subject: [PATCH] call event loop of tinyusb while waiting for sending --- interfaces/USB/class/ccid/ccid.c | 1 + interfaces/USB/class/ctaphid/ctaphid.c | 1 + 2 files changed, 2 insertions(+) diff --git a/interfaces/USB/class/ccid/ccid.c b/interfaces/USB/class/ccid/ccid.c index 33728fe7..45bd21bd 100644 --- a/interfaces/USB/class/ccid/ccid.c +++ b/interfaces/USB/class/ccid/ccid.c @@ -52,6 +52,7 @@ uint8_t CCID_Response_SendData(const uint8_t *buf, uint16_t len, uint8_t is_time return 0; else device_delay(1); + tud_task_ext(0, false); } if (is_time_extension_request) bulkin_state = CCID_STATE_DATA_IN_TIME_EXTENSION; diff --git a/interfaces/USB/class/ctaphid/ctaphid.c b/interfaces/USB/class/ctaphid/ctaphid.c index 2b8218da..80663187 100644 --- a/interfaces/USB/class/ctaphid/ctaphid.c +++ b/interfaces/USB/class/ctaphid/ctaphid.c @@ -32,6 +32,7 @@ void CTAPHID_SendReport(uint8_t *report, uint16_t len) { return; } + tud_task_ext(0, false); device_delay(1); }