1.2.21.11 1.3.25.11 1.4.21.11 1.5.25.11 1.6.22.11 1.7.23.11 1.9.19.11 1.29.23.11 1.30.18.11 1.31.18.11 1.32.26.11 1.33.16.11 1.37.18.11 1.38.21.11 1.39.18.11 1.40.20.11 SERCOMx_USART_TransmitComplete Function
C
/* x = SERCOM instance number */
/* Blocking mode */
bool SERCOMx_USART_TransmitComplete( void )
Summary
Returns the hardware status of the USART Transmit Shift Register
Description
This function returns the hardware status associated with the Transmit Shift register of the given USART peripheral instance. When Transmitter is ready, user can submit data to transmit. This function is available only in non-interrupt mode of operation and it should be used to check transmitter readiness before calling SERCOMx_USART_WriteByte function.
Precondition
SERCOMx_USART_Initialize must have been called for the associated USART instance.
Parameters
None.
Returns
true - Transmit Shift register has empty space to accept the data.
false - Transmit Shift register is full.
Example
if(true == SERCOM0_USART_TransmitComplete())
{
// Empty space is available in Transmitter FIFO, hence can write a byte
SERCOM0_USART_WriteByte('A');
}
else
{
//Transmitter is busy
}
Remarks
None