mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-08 05:56:11 +02:00
Fix strange bug when usb cannot write.
In this case, the buffer is kept until the next success call. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -54,7 +54,7 @@ uint32_t usb_write_offset(uint16_t len, uint16_t offset) {
|
||||
w = driver_write(tx_buffer+offset, MIN(len, pkt_max));
|
||||
w_len -= w;
|
||||
tx_r_offset += w;
|
||||
return MIN(w_len, pkt_max);
|
||||
return w;
|
||||
}
|
||||
|
||||
size_t usb_rx(const uint8_t *buffer, size_t len) {
|
||||
|
||||
Reference in New Issue
Block a user