Possibly not necessary, as it returns 0 if there is no available.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2022-09-25 23:35:35 +02:00
parent 96641e79e5
commit b70a7474f2
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3

View file

@ -71,7 +71,7 @@ size_t usb_rx(const uint8_t *buffer, size_t len) {
uint32_t usb_write_flush() {
int w = 0;
if (w_len > 0 && tud_vendor_write_available() > 0) {
if (w_len > 0) {
w = driver_write(tx_buffer+tx_r_offset, MIN(w_len, 64));
tx_r_offset += w;
w_len -= w;