Пример #1
0
inline uint16_t xSerialAvailableChar( xComPortHandlePtr pxPort )
{
    /* Are characters available in the serial port buffer.*/

    return ringBuffer_GetCount( &(pxPort->xRxedChars) );
}
Пример #2
0
/**********************************************************************//*!
 * \brief Gives number of bytes in reception ring buffer.
 *
 * This function can be used to check the number of available characters in the reception
 * ring buffer.  Returns 0 if no characters are available in the ring buffer.
 * @param usartId - USART identifier
 * @return Number of available characters in the reception ring buffer.  Returns 0 of no characters are available.
 ****************************************************************************/
uint16_t usart_AvailableCharRx(USART_ID usartId)
{
	// Are characters available in the serial port buffer.

	return ringBuffer_GetCount( &(usartComBuf[usartId].xRxedChars) );
}