summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
Diffstat (limited to 'src/class')
-rw-r--r--src/class/vendor/vendor_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/class/vendor/vendor_device.c b/src/class/vendor/vendor_device.c
index ced3c0d71..762cbeebc 100644
--- a/src/class/vendor/vendor_device.c
+++ b/src/class/vendor/vendor_device.c
@@ -164,7 +164,9 @@ uint32_t tud_vendor_n_write_available(uint8_t idx) {
uint32_t tud_vendor_n_write_clear(uint8_t idx) {
TU_VERIFY(idx < CFG_TUD_VENDOR, 0);
vendord_interface_t *p_itf = &_vendord_itf[idx];
- return tu_edpt_stream_count_and_clear(&p_itf->stream.tx);
+ uint32_t cnt = tu_edpt_stream_read_available(&p_itf->stream.tx);
+ tu_edpt_stream_clear(&p_itf->stream.tx);
+ return cnt;
}
#endif