fifo.h

来自「dm270 source code」· C头文件 代码 · 共 31 行

H
31
字号
/*
    DM270 ARM Evaluation Software

    (c)Texas Instruments 2003
*/

#ifndef __FIFO_H__
#define __FIFO_H__

#include <system/armsys270.h>

#define MAX_FIFO_BUF_LEN 32

typedef struct FIFO {
	char   buf[2*MAX_FIFO_BUF_LEN];
	Uint16 count;
	Uint16 readIndex;
	Uint16 writeIndex;
	Uint16 len;
} FIFO;

STATUS FIFO_init(FIFO *fifo);
STATUS FIFO_get(FIFO *fifo, char *data);
STATUS FIFO_put(FIFO *fifo, char data);
BOOL   FIFO_isEmpty(FIFO *fifo);
BOOL   FIFO_isFull(FIFO *fifo);
STATUS FIFO_clear(FIFO *fifo);

#endif /* __FIFO_H__	*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?