From 25ac0556025e3f5c5abbcf59b41c4d04d99d2f7f Mon Sep 17 00:00:00 2001 From: dragonmux Date: Fri, 19 Aug 2022 10:29:36 +0100 Subject: [PATCH] usb_serial: Renamed usbuart_usb_out_cb() -> debug_uart_receive_callback() --- src/platforms/common/usb_serial.c | 6 +++--- src/platforms/stm32/rtt_if.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/platforms/common/usb_serial.c b/src/platforms/common/usb_serial.c index e4ee95c..c263102 100644 --- a/src/platforms/common/usb_serial.c +++ b/src/platforms/common/usb_serial.c @@ -62,7 +62,7 @@ static bool gdb_uart_dtr = true; static void usb_serial_set_state(usbd_device *dev, uint16_t iface, uint8_t ep); static void debug_uart_send_callback(usbd_device *dev, uint8_t ep); -static void usbuart_usb_out_cb(usbd_device *dev, uint8_t ep); +static void debug_uart_receive_callback(usbd_device *dev, uint8_t ep); #ifdef ENABLE_DEBUG /* @@ -157,7 +157,7 @@ void usb_serial_set_config(usbd_device *dev, uint16_t value) usbd_ep_setup(dev, (CDCACM_GDB_ENDPOINT + 1) | USB_REQ_TYPE_IN, USB_ENDPOINT_ATTR_INTERRUPT, 16, NULL); /* Serial interface */ - usbd_ep_setup(dev, CDCACM_UART_ENDPOINT, USB_ENDPOINT_ATTR_BULK, CDCACM_PACKET_SIZE / 2, usbuart_usb_out_cb); + usbd_ep_setup(dev, CDCACM_UART_ENDPOINT, USB_ENDPOINT_ATTR_BULK, CDCACM_PACKET_SIZE / 2, debug_uart_receive_callback); usbd_ep_setup( dev, CDCACM_UART_ENDPOINT | USB_REQ_TYPE_IN, USB_ENDPOINT_ATTR_BULK, CDCACM_PACKET_SIZE, debug_uart_send_callback); usbd_ep_setup(dev, (CDCACM_UART_ENDPOINT + 1) | USB_REQ_TYPE_IN, USB_ENDPOINT_ATTR_INTERRUPT, 16, NULL); @@ -309,7 +309,7 @@ static void debug_uart_send_callback(usbd_device *dev, uint8_t ep) } #ifndef ENABLE_RTT -static void usbuart_usb_out_cb(usbd_device *dev, uint8_t ep) +static void debug_uart_receive_callback(usbd_device *dev, uint8_t ep) { (void)ep; diff --git a/src/platforms/stm32/rtt_if.c b/src/platforms/stm32/rtt_if.c index c3a2f28..2306844 100644 --- a/src/platforms/stm32/rtt_if.c +++ b/src/platforms/stm32/rtt_if.c @@ -59,10 +59,10 @@ inline static bool recv_set_nak() return recv_bytes_free() < 2 * CDCACM_PACKET_SIZE; } -/* usbuart_usb_out_cb is called when usb uart has received new data for target. +/* debug_uart_receive_callback is called when usb uart has received new data for target. this routine has to be fast */ -void usbuart_usb_out_cb(usbd_device *dev, uint8_t ep) +void debug_uart_receive_callback(usbd_device *dev, uint8_t ep) { (void)dev; (void)ep;