Skip to content

Commit 5c136cc

Browse files
author
Cruz Monrreal
authored
Merge pull request #8403 from bcostm/fix_issue_8372_serial
STM32: fix issue with serial_is_tx_ongoing function
2 parents deaa4fa + 4017dea commit 5c136cc

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

targets/TARGET_STM/serial_api.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,10 @@ int8_t get_uart_index(UARTName uart_name)
662662
return -1;
663663
}
664664

665-
/* Function to protect deep sleep while a seral Tx is ongoing on not complete
666-
* yet. Returns 1 if there is at least 1 serial instance with ongoing ransfer
667-
* 0 otherwise.
668-
*/
665+
/* Function used to protect deep sleep while a serial transmission is on-going.
666+
.* Returns 1 if there is at least 1 serial instance with an on-going transfer
667+
* and 0 otherwise.
668+
*/
669669
int serial_is_tx_ongoing(void) {
670670
int TxOngoing = 0;
671671

@@ -759,8 +759,13 @@ int serial_is_tx_ongoing(void) {
759759
}
760760
#endif
761761

762-
/* If Tx is ongoing, then transfer is */
763762
return TxOngoing;
764763
}
765764

765+
#else
766+
767+
int serial_is_tx_ongoing(void) {
768+
return 0;
769+
}
770+
766771
#endif /* DEVICE_SERIAL */

0 commit comments

Comments
 (0)