8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e26d564 commit 5e1c51dCopy full SHA for 5e1c51d
cores/arduino/stm32/uart.c
@@ -607,15 +607,25 @@ size_t uart_debug_write(uint8_t *data, uint32_t size)
607
if (serial_debug.index >= UART_NUM) {
608
return 0;
609
}
610
+ } else {
611
+ serial_t *obj = rx_callback_obj[serial_debug.index];
612
+ if (obj) {
613
+ serial_debug.irq = obj->irq;
614
+ }
615
616
617
618
+ HAL_NVIC_DisableIRQ(serial_debug.irq);
619
+
620
while (HAL_UART_Transmit(uart_handlers[serial_debug.index], data, size, TX_TIMEOUT) != HAL_OK) {
621
if ((HAL_GetTick() - tickstart) >= TX_TIMEOUT) {
- return 0;
622
+ size = 0;
623
+ break;
624
625
626
627
+ HAL_NVIC_EnableIRQ(serial_debug.irq);
628
629
return size;
630
631
0 commit comments