Browse Source

traceswo: Replaced two magic numbers with the proper macros

pull/443/merge
dragonmux 2 years ago
committed by Piotr Esden-Tempski
parent
commit
0477d5ee8e
  1. 4
      src/platforms/stm32/traceswo.c

4
src/platforms/stm32/traceswo.c

@ -88,10 +88,10 @@ void trace_buf_push(uint8_t *buf, int len)
{ {
if (decoding) if (decoding)
traceswo_decode(usbdev, CDCACM_UART_ENDPOINT, buf, len); traceswo_decode(usbdev, CDCACM_UART_ENDPOINT, buf, len);
else if (usbd_ep_write_packet(usbdev, 0x85, buf, len) != len) { else if (usbd_ep_write_packet(usbdev, USB_REQ_TYPE_IN | TRACE_ENDPOINT, buf, len) != len) {
if (trace_usb_buf_size + len > 64) { if (trace_usb_buf_size + len > 64) {
/* Stall if upstream to too slow. */ /* Stall if upstream to too slow. */
usbd_ep_stall_set(usbdev, 0x85, 1); usbd_ep_stall_set(usbdev, USB_REQ_TYPE_IN | TRACE_ENDPOINT, 1);
trace_usb_buf_size = 0; trace_usb_buf_size = 0;
return; return;
} }

Loading…
Cancel
Save