diff --git a/CHANGELOG.md b/CHANGELOG.md index 19e7f34..2dba6c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 2.0.1 (2025-02-06) +## New features +* none +## Bug fixes +* Resolved KISS TX deadlock +## Other +* none +## Known bugs +* none # 2.0.0 (2023-09-09) ## New features * New modems: AFSK Bell 103 (300 Bd, 1600/1800 Hz), GFSK G3RUH (9600 Bd), AFSK V.23 (1200 Bd, 1300/2100 Hz) diff --git a/Core/Inc/ax25.h b/Core/Inc/ax25.h index 9db8c4a..cac44c0 100644 --- a/Core/Inc/ax25.h +++ b/Core/Inc/ax25.h @@ -75,7 +75,6 @@ void Ax25ClearReceivedFrameBitmap(void); * @brief Get next received frame (if available) * @param **dst Pointer to internal buffer * @param *size Actual frame size -<<<<<<< HEAD * @param *peak Signak positive peak value in % * @param *valley Signal negative peak value in % * @param *level Signal level in % diff --git a/Core/Inc/uart.h b/Core/Inc/uart.h index 8674130..81b23d4 100644 --- a/Core/Inc/uart.h +++ b/Core/Inc/uart.h @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 Piotr Wilkon +Copyright 2020-2024 Piotr Wilkon This file is part of VP-Digi. @@ -46,7 +46,7 @@ typedef struct { volatile USART_TypeDef *port; //UART peripheral uint32_t baudrate; //baudrate 1200-115200 - enum UartDataType rxType; //rx status + volatile enum UartDataType rxType; //rx status uint8_t enabled : 1; uint8_t isUsb : 1; volatile uint8_t rxBuffer[UART_BUFFER_SIZE]; diff --git a/Core/Src/common.c b/Core/Src/common.c index 7c04f8e..1bc1237 100644 --- a/Core/Src/common.c +++ b/Core/Src/common.c @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 Piotr Wilkon +Copyright 2020-2024 Piotr Wilkon This file is part of VP-Digi. @@ -32,7 +32,7 @@ struct _GeneralConfig GeneralConfig = }; -const char versionString[] = "VP-Digi v. 2.0.0\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n" +const char versionString[] = "VP-Digi v. 2.0.1\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n" #ifdef ENABLE_FX25 "With FX.25 support compiled-in\r\n" #endif diff --git a/Core/Src/kiss.c b/Core/Src/kiss.c index a879327..9245ae4 100644 --- a/Core/Src/kiss.c +++ b/Core/Src/kiss.c @@ -1,5 +1,5 @@ /* -Copyright 2020-2023 Piotr Wilkon +Copyright 2020-2024 Piotr Wilkon This file is part of VP-Digi. @@ -52,7 +52,9 @@ void KissParse(Uart *port, uint8_t data) volatile uint8_t *buf = NULL; volatile uint16_t *index = NULL; - if(!port->kissProcessingOngoing) + bool useTempBuffer = port->kissProcessingOngoing; + + if(!useTempBuffer) { buf = port->kissBuffer; index = &port->kissBufferHead; @@ -65,7 +67,7 @@ void KissParse(Uart *port, uint8_t data) if(data == 0xC0) //frame end marker { - if(port->kissProcessingOngoing) + if(useTempBuffer) //temporary buffer is used = KISS processing is ongoing, must drop the incoming frame { *index = 0; return; @@ -118,8 +120,8 @@ void KissParse(Uart *port, uint8_t data) __disable_irq(); port->kissProcessingOngoing = 1; port->kissTempBufferHead = 0; - __enable_irq(); port->rxType = DATA_KISS; + __enable_irq(); return; } else if(*index > 0) @@ -137,7 +139,7 @@ void KissParse(Uart *port, uint8_t data) } buf[(*index)++] = data; - if(!port->kissProcessingOngoing) + if(!useTempBuffer) port->kissBufferHead %= sizeof(port->kissBuffer); else port->kissTempBufferHead %= sizeof(port->kissTempBuffer); @@ -158,7 +160,7 @@ void KissProcess(Uart *port) port->kissBufferHead = port->kissTempBufferHead; port->kissTempBufferHead = 0; } - __enable_irq(); port->rxType = DATA_NOTHING; + __enable_irq(); } }