dspic33_pwm_test.X/ring_buffer.c
/*! \brief  clears a single byte from the rx buffer
 *
 *  \param usart_data       The USART_data_t struct instance.
 */
\brief  clears a single byte from the rx buffer
\param usart_data       The USART_data_t struct instance.
\ brief clears a single byte from the rx buffer \ param usart_data The USART_data_t struct instance .
void rxbuffer_clear_byte(_ring_buffer * rx)
{
	_ring_buffer * bufPtr;
	bufPtr = rx;
	if( bufPtr->head > 1 )
	{
		bufPtr->head -= 2;
		bufPtr->rx[ bufPtr->head	 ] = 0;	
		bufPtr->rx[ bufPtr->head + 1 ] = 0;		
	}
}
void rxbuffer_clear_byte ( _ring_buffer * rx ) { _ring_buffer * bufPtr ; bufPtr = rx ; if ( bufPtr -> head > 1 ) { bufPtr -> head -= 2 ; bufPtr -> rx [ bufPtr -> head ] = 0 ; bufPtr -> rx [ bufPtr -> head + 1 ] = 0 ; } }
\brief  clears a single byte from the rx buffer
  \param usart_data       The USART_data_t struct instance.
\ brief clears a single byte from the rx buffer \ param usart_data The USART_data_t struct instance .