Обновление
This commit is contained in:
parent
7f2d395b67
commit
b820d70f7d
|
|
@ -23,6 +23,8 @@ typedef struct {
|
||||||
uint16_t flags;
|
uint16_t flags;
|
||||||
int32_t greenwichOffset;
|
int32_t greenwichOffset;
|
||||||
|
|
||||||
|
uint8_t buf_LOG[256];
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
osThreadId_t id;
|
osThreadId_t id;
|
||||||
uint32_t stack[512];
|
uint32_t stack[512];
|
||||||
|
|
|
||||||
|
|
@ -143,15 +143,15 @@ void LoggerToSerialPort_Init(
|
||||||
LogTransmitter_StartThread(env);
|
LogTransmitter_StartThread(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern uint8_t buf_USART2_TRANSMITTED[256];
|
|
||||||
|
|
||||||
static _Noreturn void LogTransmitter_Thread(tLoggerToSerialPort *env) {
|
static _Noreturn void LogTransmitter_Thread(tLoggerToSerialPort *env) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
uint16_t len = env->serialPortIo_VIRT->receive(env->serialPortIo_VIRT->env, buf_USART2_TRANSMITTED,
|
uint16_t len = env->serialPortIo_VIRT->receive(env->serialPortIo_VIRT->env, env->buf_LOG,
|
||||||
sizeof(buf_USART2_TRANSMITTED), env->timeoutTransmittedLog);
|
sizeof(env->buf_LOG), env->timeoutTransmittedLog);
|
||||||
|
|
||||||
if (len > 0) {
|
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);
|
len, env->timeoutTransmittedLog);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue