18 lines
343 B
C
18 lines
343 B
C
#include <main.h>
|
|
#include <usart.h>
|
|
#include <logger.h>
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
void log(char *msg) {
|
|
uint16_t len = strlen(msg);
|
|
|
|
if (HAL_UART_Transmit_IT(&debugUart, msg, len) != HAL_OK) {
|
|
if(RingBuffer_Write(&txBuf, msg, len) != RING_BUFFER_OK)
|
|
return 0;
|
|
}
|
|
return 1;
|
|
}
|