firmware/Temperature/src/FIFO.c
////////////////////////////////////////////////////////
///	\brief Write inputData into our buffer.
///
///	\param inputData copy of the data we want to store
///
///	\return TRUE = successfully writing data to our buffer
///			FALSE = No space in buffer
////////////////////////////////////////////////////////
\brief Write inputData into our buffer.
\param inputData copy of the data we want to store

\return TRUE = successfully writing data to our buffer
FALSE = No space in buffer
\ brief Write inputData into our buffer . \ param inputData copy of the data we want to store \ return TRUE = successfully writing data to our buffer FALSE = No space in buffer
uint_fast8_t FIFO_Write(uint8_t inputData)
{
	uint_fast8_t Result = FALSE;
	if( BufferCurrentSize < FIFO_BUFFER_MAX_SIZE )
	{
		Buffer[WritePosition] = inputData;
		BufferCurrentSize++;
		WritePosition++;
		if ( FIFO_BUFFER_MAX_SIZE == WritePosition )
		{
			WritePosition = 0;
		}
		Result = TRUE;
	}
	return Result;
}
uint_fast8_t FIFO_Write ( uint8_t inputData ) { uint_fast8_t Result = FALSE ; if ( BufferCurrentSize < FIFO_BUFFER_MAX_SIZE ) { Buffer [ WritePosition ] = inputData ; BufferCurrentSize ++ ; WritePosition ++ ; if ( FIFO_BUFFER_MAX_SIZE == WritePosition ) { WritePosition = 0 ; } Result = TRUE ; } return Result ; }
\brief Write inputData into our buffer.
\ brief Write inputData into our buffer .
// We have space // check to see if we need to reset the write position index counter. // this will ensure that the buffer is circulating