// // 文件:config.h // #ifndef __CONFIG_H #define __CONFIG_H //这一段无需改动 //This segment should not be modified #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif typedef unsigned char uint8; typedef signed char int8; typedef unsigned short uint16; typedef signed short int16; typedef unsigned int uint32; typedef signed int int32; typedef float fp32; #include "FIFOQUEUE.h" #endif
// // 文件:FIFOQUEUE.h // #ifndef _FIFOQUEUE_H #define _FIFOQUEUE_H #define ElemType uint8 #define QueueSize 20 //fifo队列的大小 #define QueueFull 0 //fifo满置0 #define QueueEmpty 1 //FIFO空置1 #define QueueOperateOk 2 //队列操作完成 赋值为2 struct FifoQueue { uint16 front; //队列头 uint16 rear; //队列尾 uint16 count; //队列计数 ElemType dat[QueueSize]; }; //Queue Initalize extern void QueueInit(struct FifoQueue *Qu