usbuart: Moved the definitions of the AUX serial receive buffer into aux_serial.c

This commit is contained in:
dragonmux 2022-08-21 00:15:13 +01:00 committed by Piotr Esden-Tempski
parent 35ae0adcd1
commit af6f2ed197
4 changed files with 8 additions and 13 deletions

View File

@ -23,6 +23,7 @@
#include <libopencm3/stm32/usart.h>
#include <libopencm3/stm32/dma.h>
#elif defined(LM4F)
#include <libopencm3/lm4f/rcc.h>
#include <libopencm3/lm4f/uart.h>
#else
#error "Unknown processor target"
@ -36,6 +37,11 @@
#include "usb.h"
#include "aux_serial.h"
/* Fifo in pointer, writes assumed to be atomic, should be only incremented within RX ISR */
uint8_t buf_rx_in;
/* Fifo out pointer, writes assumed to be atomic, should be only incremented outside RX ISR */
uint8_t buf_rx_out;
#if defined(STM32F0) || defined(STM32F1) || defined(STM32F3) || defined(STM32F4)
static char aux_serial_transmit_buffer[2U][AUX_UART_BUFFER_SIZE];
static uint8_t aux_serial_transmit_buffer_index;

View File

@ -42,8 +42,6 @@ void debug_uart_run(void);
/* RX Fifo buffer with space for copy fn overrun */
extern char buf_rx[AUX_UART_BUFFER_SIZE + sizeof(uint64_t)];
/* RX Fifo out pointer, writes assumed to be atomic */
extern uint8_t buf_rx_out;
#ifdef ENABLE_DEBUG
/* Debug Fifo buffer with space for copy fn overrun */
@ -58,10 +56,8 @@ extern uint8_t usb_dbg_out;
/* RX Fifo buffer */
extern char buf_rx[AUX_UART_BUFFER_SIZE];
/* Fifo in pointer, writes assumed to be atomic, should be only incremented within RX ISR */
extern uint8_t buf_rx_in;
/* Fifo out pointer, writes assumed to be atomic, should be only incremented outside RX ISR */
extern uint8_t buf_rx_out;
#endif
extern uint8_t buf_rx_out;
#endif

View File

@ -40,8 +40,6 @@
/* RX Fifo buffer with space for copy fn overrun */
char buf_rx[AUX_UART_BUFFER_SIZE + sizeof(uint64_t)];
/* RX Fifo out pointer, writes assumed to be atomic */
uint8_t buf_rx_out;
#ifdef ENABLE_DEBUG
/* Debug Fifo buffer with space for copy fn overrun */

View File

@ -24,7 +24,6 @@
#include <libopencm3/cm3/scs.h>
#include <libopencm3/usb/usbd.h>
#include <libopencm3/usb/cdc.h>
#include <libopencm3/lm4f/rcc.h>
#include <libopencm3/lm4f/uart.h>
#include "general.h"
@ -32,7 +31,3 @@
/* RX Fifo buffer */
char buf_rx[AUX_UART_BUFFER_SIZE];
/* Fifo in pointer, writes assumed to be atomic, should be only incremented within RX ISR */
uint8_t buf_rx_in;
/* Fifo out pointer, writes assumed to be atomic, should be only incremented outside RX ISR */
uint8_t buf_rx_out;