From 423126eab5739a976c11d7179601a56c5a8f3d52 Mon Sep 17 00:00:00 2001 From: EmanuelFeru Date: Thu, 25 Jun 2020 20:18:36 +0200 Subject: [PATCH] Moved `old_pos` --- Src/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Src/util.c b/Src/util.c index 7228f7c..34ee147 100644 --- a/Src/util.c +++ b/Src/util.c @@ -36,7 +36,6 @@ SerialSideboard Sideboard; #if defined(SERIAL_DEBUG) || defined(SERIAL_FEEDBACK) static uint8_t rx_buffer[SERIAL_BUFFER_SIZE]; // USART Rx DMA circular buffer static uint32_t rx_buffer_len = ARRAY_LEN(rx_buffer); -static uint32_t old_pos; #endif #ifdef SERIAL_FEEDBACK @@ -179,6 +178,7 @@ void input_init(void) { void usart_rx_check(void) { #ifdef SERIAL_DEBUG + static uint32_t old_pos; uint32_t pos; pos = rx_buffer_len - dma_transfer_number_get(DMA_CH4); // Calculate current position in buffer @@ -199,6 +199,7 @@ void usart_rx_check(void) #endif // SERIAL_DEBUG #ifdef SERIAL_FEEDBACK + static uint32_t old_pos; uint32_t pos; uint8_t *ptr;