From 4e0bd4a27f512c831d76cd5eb7c1e5cd110a7d47 Mon Sep 17 00:00:00 2001 From: EmergReanimator Date: Sun, 13 Feb 2022 08:46:24 +0100 Subject: [PATCH] Fixed pre-commit script issues. --- ports/stm/common-hal/busio/UART.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c index 16cae69eaf..7e35ad86dd 100644 --- a/ports/stm/common-hal/busio/UART.c +++ b/ports/stm/common-hal/busio/UART.c @@ -337,8 +337,7 @@ size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, RUN_BACKGROUND_TASKS; Status = HAL_UART_GetState(&self->handle); } - } - else { + } else { mp_raise_ValueError(translate("UART write error")); } @@ -363,13 +362,13 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef *handle) { } } -#if (1) - // TODO: Implement error handling here -#else + #if (1) + // TODO: Implement error handling here + #else while (HAL_BUSY == errflag) { errflag = HAL_UART_Receive_IT(handle, &context->rx_char, 1); } -#endif + #endif return; } @@ -450,7 +449,7 @@ STATIC void call_hal_irq(int uart_num) { HAL_UART_IRQHandler(&context->handle); if (HAL_UART_ERROR_NONE != context->handle.ErrorCode) { - // TODO: Implement error handling here + // TODO: Implement error handling here } } }