typedef struct
{
Uint8 *pFIFOBuffer; //data buffer as fifo
Uint8 FIFOHead; //begin of data in fifo
Uint8 FIFOTail; //end of data in fifo
Uint8 FIFOLength; //data in fifo
Uint8 FIFOSize; //size of fifo
}FIFO_Stru;
/****************************************************************
** FUNCTION :sci_fifo_init
** DESCRIPTION :This function initialize FIFO
** PARAMETERS :pthis
** pBuf
** nSize
** RETURN :void
****************************************************************/
void sci_fifo_init(FIFO_Stru *pthis, Uint8 *pBuf, Uint8 nSize)
{
pthis->pFIFOBuffer = pBuf;
pthis->FIFOHead = 0x00;
pthis->FIFOTail = 0x00;
pthis->FIFOLength = 0x00;
pthis->FIFOSize = nSize;
}
/****************************************************************
** FUNCTION :sci_fifo_is_empty
** DESCRIPTION :This function check whether the FIFO is empty
** PARAMETERS :pthis
** RETURN :Uint8
****************************************************************/
static Uint8 sci_fifo_is_empty(FIFO_Str