queue.h

来自「AVRMEG32编写的一个项目代码,里面包含一般应用的模块.」· C头文件 代码 · 共 41 行

H
41
字号
//*****************************************************************************
//
// File Name	: 'queue.h'
// Title		: A RAW Message Queue for MCU
// Author		: ZhangLei 
// Created		: 2005-8-4
// Revised		: 
// Version		: 1.0
// Target MCU	: Atmel AVR series
// Editor Tabs	: 4
//
//*****************************************************************************

#ifndef MSG_QUEUE_H
#define MSG_QUEUE_H

#include "..\lib\global.h"		// include our global settings

//消息的类型
//#define FIFO				//先进先出
//#define FILO				//先进后出
#define PRIORITY			//支持消息优先级

#define MSG_STACK_DEPTH		0x20*4
	

//高四位为消息优先级,数字越大越优先,低四位为消息类型

#define MSG_NULL		0x00					//没有消息
#define MSG_UART_RX		0x92					//有通信消息
#define MSG_UART_TX		0x82					//有通信消息
#define MSG_STXETX		0x72					//有通信包
	
void msgQueueIn(u08 msgType,u08 msgPoint);
u08 msgQueueOut(void);
u08 msgQueueGetData(void);

#endif

//end of file

⌨️ 快捷键说明

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