#ifndef __CUSTOM_FIFO_H__
#define __CUSTOM_FIFO_H__
#include <stdint.h>
typedef struct fifo
{
    uint8_t *p_buff_head;
    uint8_t *p_buff_tail;
    uint8_t *p_input;
    uint8_t *p_output;
    uint16_t fifo_size;
} custom_fifo;

int fifo_init(custom_fifo *p_fifo, uint8_t *p_buff, uint16_t len);
int fifo_push(custom_fifo *p_fifo, uint8_t dat);
uint8_t fifo_pop(custom_fifo *p_fifo, int *p_status);
uint16_t fifi_get_counter(custom_fifo *p_fifo);
uint16_t fifo_clear(custom_fifo *p_fifo);
int fifo_push_buff(custom_fifo *p_fifo, void *dat, uint16_t len);
uint16_t fifo_pop_buff(custom_fifo *p_fifo, uint8_t *p_buff, uint16_t len);

#endif
