logger interrupt
This commit is contained in:
@ -35,6 +35,12 @@ void logFree() {
|
||||
ringbufferFree(&logBuffer);
|
||||
}
|
||||
|
||||
#ifdef LOGGER_INTERRUPT
|
||||
void mbusCommTxCpltCallback(UART_HandleTypeDef *huart) {
|
||||
logExec();
|
||||
}
|
||||
#endif
|
||||
|
||||
int logExec() {
|
||||
int c = -1;
|
||||
#ifndef TEST
|
||||
@ -45,7 +51,11 @@ int logExec() {
|
||||
#ifndef TEST
|
||||
// transfer to TX channel
|
||||
uint8_t cc = (uint8_t) c;
|
||||
#ifndef LOGGER_INTERRUPT
|
||||
HAL_UART_Transmit(&debugUart, &cc, 1, HAL_MAX_DELAY);
|
||||
#else
|
||||
HAL_UART_Transmit_IT(&debugUart, &cc, 1);
|
||||
#endif // LOGGER_INTERRUPT
|
||||
#endif // TEST
|
||||
}
|
||||
#ifndef TEST
|
||||
|
Reference in New Issue
Block a user