📄 queue.h
字号:
#ifndef _QUEUE_H_
#define _QUEUE_H_
#include "config.h"
#ifndef NULL
#define NULL (void *)0
#endif
#define Queue_EnterCritical()
#define Queue_ExitCritical()
typedef unsigned char QUEUE_TYPE;
typedef struct
{
unsigned int front;
unsigned int rear;
unsigned int length;
unsigned int max;
unsigned char initFlag;
QUEUE_TYPE *buf;
}QUEUE;
typedef enum
{
QRET_ERROR,
QRET_OK,
QRET_FULL,
QRET_EMPTY
}QUEUE_RET;
QUEUE_RET QueueInit(QUEUE *queue, QUEUE_TYPE *buf, unsigned int length);
QUEUE_RET QueueIn(QUEUE *queue, QUEUE_TYPE data);
QUEUE_RET QueueOut(QUEUE *queue, QUEUE_TYPE *data);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -