Merge pull request #8403 from bcostm/fix_issue_8372_serial

STM32: fix issue with serial_is_tx_ongoing function
pull/8436/merge
Cruz Monrreal 2018-10-16 10:25:37 -05:00 committed by GitHub
commit 5c136cc5cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 5 deletions

View File

@ -662,10 +662,10 @@ int8_t get_uart_index(UARTName uart_name)
return -1; return -1;
} }
/* Function to protect deep sleep while a seral Tx is ongoing on not complete /* Function used to protect deep sleep while a serial transmission is on-going.
* yet. Returns 1 if there is at least 1 serial instance with ongoing ransfer .* Returns 1 if there is at least 1 serial instance with an on-going transfer
* 0 otherwise. * and 0 otherwise.
*/ */
int serial_is_tx_ongoing(void) { int serial_is_tx_ongoing(void) {
int TxOngoing = 0; int TxOngoing = 0;
@ -759,8 +759,13 @@ int serial_is_tx_ongoing(void) {
} }
#endif #endif
/* If Tx is ongoing, then transfer is */
return TxOngoing; return TxOngoing;
} }
#else
int serial_is_tx_ongoing(void) {
return 0;
}
#endif /* DEVICE_SERIAL */ #endif /* DEVICE_SERIAL */