From b820d70f7d43dd227dbde4cb387745d9e6cc89f0 Mon Sep 17 00:00:00 2001 From: cfif Date: Thu, 18 Dec 2025 16:11:15 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inc/LoggerToSerialPort.h | 2 ++ Src/LoggerToSerialPort.c | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Inc/LoggerToSerialPort.h b/Inc/LoggerToSerialPort.h index 40ee5a7..af42155 100644 --- a/Inc/LoggerToSerialPort.h +++ b/Inc/LoggerToSerialPort.h @@ -23,6 +23,8 @@ typedef struct { uint16_t flags; int32_t greenwichOffset; + uint8_t buf_LOG[256]; + struct { osThreadId_t id; uint32_t stack[512]; diff --git a/Src/LoggerToSerialPort.c b/Src/LoggerToSerialPort.c index d6fd65d..968d1a1 100644 --- a/Src/LoggerToSerialPort.c +++ b/Src/LoggerToSerialPort.c @@ -143,15 +143,15 @@ void LoggerToSerialPort_Init( LogTransmitter_StartThread(env); } -extern uint8_t buf_USART2_TRANSMITTED[256]; + static _Noreturn void LogTransmitter_Thread(tLoggerToSerialPort *env) { for (;;) { - uint16_t len = env->serialPortIo_VIRT->receive(env->serialPortIo_VIRT->env, buf_USART2_TRANSMITTED, - sizeof(buf_USART2_TRANSMITTED), env->timeoutTransmittedLog); + uint16_t len = env->serialPortIo_VIRT->receive(env->serialPortIo_VIRT->env, env->buf_LOG, + sizeof(env->buf_LOG), env->timeoutTransmittedLog); if (len > 0) { - len = env->serialPortIo_PHYSIC->transmit(env->serialPortIo_PHYSIC->env, buf_USART2_TRANSMITTED, + len = env->serialPortIo_PHYSIC->transmit(env->serialPortIo_PHYSIC->env, env->buf_LOG, len, env->timeoutTransmittedLog); } }