#ifndef __BUFFER_QUEUE_H__
#define __BUFFER_QUEUE_H__

#include <string.h>
#include <stdint.h>
#include "myType.h"


//////////////queue
#define BUFFER_SIZE     4096

/* Largest amount of data that can be stored in the buffer */
#define BUFFER_LEN      (BUFFER_SIZE - 1)



/* Queue data structure */
typedef struct _QUEUE_T
{
    /* Pointer to head of queue (next byte to be read out) */
	USHORT g_head ;

    /* Pointer to head of queue after committing most recent peek */
	USHORT g_peek ;
    
    /* Pointer to tail of queue (next byte to be inserted) */
	USHORT g_tail ;
}QUEUE_T;


void buffer_queue_PushBytes(CHAR *p_data, USHORT len);
USHORT buffer_queue_PopBytes(CHAR *p_data, USHORT len);
USHORT buffer_queue_PeekBytes(CHAR *p_data, USHORT len);
void buffer_queue_removePeekBytes(void);
USHORT buffer_queue_GetBufferCapacity(void);
USHORT buffer_queue_GetDataSize(void);
USHORT buffer_queue_GetAvailableSize(void);
void buffer_queue_ClearBuffer(void);

	
#endif

