File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 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)
615615 index = serial_debug .index ;
616616 }
617617
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 );
628619
629620 while (HAL_UART_Transmit (uart_handlers [index ], data , size , TX_TIMEOUT ) != HAL_OK ) {
630621 if ((HAL_GetTick () - tickstart ) >= TX_TIMEOUT ) {
631- HAL_NVIC_EnableIRQ (irq );
622+ HAL_NVIC_EnableIRQ (serial_debug . irq );
632623 return 0 ;
633624 }
634625 }
635626
636- HAL_NVIC_EnableIRQ (irq );
627+ HAL_NVIC_EnableIRQ (serial_debug . irq );
637628 return size ;
638629}
639630
You can’t perform that action at this time.
0 commit comments