2.124.42 USARTx_LIN_TransferComplete Function

C

/* x = USART instance number */

/* Blocking and Ring buffer mode */
uint8_t USARTx_LIN_TransferComplete(void)

Summary

This API allows the application to check if the requested data transfer is completed or not.

Description

This API allows the application to check if the requested data transfer is completed or not.

Precondition

USARTx_Initialize must have been called for the associated USART instance.

Parameters

None

Returns

It returns 0 if the requested transfer is not completed

It returns value greater than 0 if the requested transfer is completed

Example

             
uint8_t txBuffer[10];  
uint8_t nTxBytes = 0; 

nTxBytes = 0;       
txBuffer[nTxBytes++] = pid;
txBuffer[nTxBytes++] = 0x01;
USART0_Write(txBuffer, nTxBytes);
/*Wait till transfer request is completed*/
while(USART0_LIN_TransferComplete() == 0U);

Remarks

None