diff --git a/src/platforms/common/usb_serial.c b/src/platforms/common/usb_serial.c index 424ffe8..1572a44 100644 --- a/src/platforms/common/usb_serial.c +++ b/src/platforms/common/usb_serial.c @@ -231,12 +231,12 @@ static uint32_t copy_from_fifo(char *dst, const char *src, uint32_t start, uint3 } /* - * Runs deferred processing for USBUSART RX, draining RX FIFO by sending - * characters to host PC via CDCACM. Allowed to write to FIFO OUT pointer. + * Runs deferred processing for AUX serial RX, draining RX FIFO by sending + * characters to host PC via the debug serial interface. Allowed to write to FIFO OUT pointer. */ static void debug_uart_send_rx_packet(void) { - rx_usb_trfr_cplt = false; + aux_serial_receive_complete = false; /* Calculate writing position in the FIFO */ const uint32_t buf_rx_in = (RX_FIFO_SIZE - dma_get_number_of_data(USBUSART_DMA_BUS, USBUSART_DMA_RX_CHAN)) % RX_FIFO_SIZE; @@ -254,7 +254,7 @@ static void debug_uart_send_rx_packet(void) buf_rx_out = buf_rx_in; /* Turn off LED */ usbuart_set_led_state(RX_LED_ACT, false); - rx_usb_trfr_cplt = true; + aux_serial_receive_complete = true; } else { @@ -293,7 +293,7 @@ void debug_uart_run(void) usbuart_set_led_state(RX_LED_ACT, true); /* Try to send a packet if usb is idle */ - if (rx_usb_trfr_cplt) + if (aux_serial_receive_complete) debug_uart_send_rx_packet(); nvic_enable_irq(USB_IRQ); diff --git a/src/platforms/common/usbuart.h b/src/platforms/common/usbuart.h index d7f32a4..513764a 100644 --- a/src/platforms/common/usbuart.h +++ b/src/platforms/common/usbuart.h @@ -46,7 +46,7 @@ extern char buf_rx[RX_FIFO_SIZE + sizeof(uint64_t)]; /* RX Fifo out pointer, writes assumed to be atomic */ extern uint8_t buf_rx_out; /* RX usb transfer complete */ -extern bool rx_usb_trfr_cplt; +extern bool aux_serial_receive_complete; #ifdef ENABLE_DEBUG /* Debug Fifo buffer with space for copy fn overrun */ diff --git a/src/platforms/stm32/usbuart.c b/src/platforms/stm32/usbuart.c index 496d9cc..cb54ec0 100644 --- a/src/platforms/stm32/usbuart.c +++ b/src/platforms/stm32/usbuart.c @@ -43,7 +43,7 @@ char buf_rx[RX_FIFO_SIZE + sizeof(uint64_t)]; /* RX Fifo out pointer, writes assumed to be atomic */ uint8_t buf_rx_out; /* RX usb transfer complete */ -bool rx_usb_trfr_cplt = true; +bool aux_serial_receive_complete = true; #ifdef ENABLE_DEBUG /* Debug Fifo buffer with space for copy fn overrun */