We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 469a4f5 commit 9622de3Copy full SHA for 9622de3
libraries/SrcWrapper/src/stm32/uart.c
@@ -691,10 +691,11 @@ size_t uart_debug_write(uint8_t *data, uint32_t size)
691
{
692
uint32_t tickstart = HAL_GetTick();
693
694
- if (DEBUG_UART == NP) {
695
- return 0;
696
- }
697
if (serial_debug.index >= UART_NUM) {
+ if (DEBUG_UART == NP) {
+ return 0;
+ }
698
+
699
/* Search if DEBUG_UART already initialized */
700
for (serial_debug.index = 0; serial_debug.index < UART_NUM; serial_debug.index++) {
701
if (uart_handlers[serial_debug.index] != NULL) {
0 commit comments