File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -615,25 +615,16 @@ size_t uart_debug_write(uint8_t *data, uint32_t size)
615
615
index = serial_debug .index ;
616
616
}
617
617
618
- IRQn_Type irq ;
619
-
620
- if (DEBUG_UART == USART1 )
621
- irq = USART1_IRQn ;
622
- else if (DEBUG_UART == USART2 )
623
- irq = USART2_IRQn ;
624
- else if (DEBUG_UART == USART3 )
625
- irq = USART3_IRQn ;
626
-
627
- HAL_NVIC_DisableIRQ (irq );
618
+ HAL_NVIC_DisableIRQ (serial_debug .irq );
628
619
629
620
while (HAL_UART_Transmit (uart_handlers [index ], data , size , TX_TIMEOUT ) != HAL_OK ) {
630
621
if ((HAL_GetTick () - tickstart ) >= TX_TIMEOUT ) {
631
- HAL_NVIC_EnableIRQ (irq );
622
+ HAL_NVIC_EnableIRQ (serial_debug . irq );
632
623
return 0 ;
633
624
}
634
625
}
635
626
636
- HAL_NVIC_EnableIRQ (irq );
627
+ HAL_NVIC_EnableIRQ (serial_debug . irq );
637
628
return size ;
638
629
}
639
630
You can’t perform that action at this time.
0 commit comments