rtt: Fix infinite loop in rtt_write

This commit is contained in:
Thomas Bénéteau 2022-09-11 21:15:08 +10:00 committed by Rachel Mant
parent 3e8f296dd5
commit c0b7d4e2c4
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ uint32_t rtt_write(const char *buf, uint32_t len)
} }
/* flush 64-byte packet on full-speed */ /* flush 64-byte packet on full-speed */
if (CDCACM_PACKET_SIZE == 64 && (len % CDCACM_PACKET_SIZE) == 0) if (CDCACM_PACKET_SIZE == 64 && (len % CDCACM_PACKET_SIZE) == 0)
while(usbd_ep_write_packet(usbdev, CDCACM_UART_ENDPOINT, NULL, 0) <= 0); usbd_ep_write_packet(usbdev, CDCACM_UART_ENDPOINT, NULL, 0);
} }
return len; return len;
} }