From c0b7d4e2c40ec2064cdc71d2d21d9d9daba1a6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A9n=C3=A9teau?= Date: Sun, 11 Sep 2022 21:15:08 +1000 Subject: [PATCH] rtt: Fix infinite loop in rtt_write --- src/platforms/stm32/rtt_if.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/stm32/rtt_if.c b/src/platforms/stm32/rtt_if.c index 88ace03..fdda7fd 100644 --- a/src/platforms/stm32/rtt_if.c +++ b/src/platforms/stm32/rtt_if.c @@ -128,7 +128,7 @@ uint32_t rtt_write(const char *buf, uint32_t len) } /* flush 64-byte packet on full-speed */ 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; }