traceswo: Replaced two magic numbers with the proper macros

This commit is contained in:
dragonmux 2022-08-10 10:41:45 +01:00 committed by Piotr Esden-Tempski
parent 0f37edc36a
commit 0477d5ee8e
1 changed files with 2 additions and 2 deletions

View File

@ -88,10 +88,10 @@ void trace_buf_push(uint8_t *buf, int len)
{
if (decoding)
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) {
/* 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;
return;
}