simpleeventhandler.h
来自「8051试验程序 基础教材」· C头文件 代码 · 共 58 行
H
58 行
/*****************************************************************************
* visualSTATE Static Event Handler Header File (sample code)
*
* The file declares the interface for an event queue with a static size. To
* use the queue, the queue must be initialized by a call to the function
* SEQ_Initialize. Next, call the functions SEQ_AddEvent, SEQ_RetrieveEvent,
* SEQ_Clear and SEQ_EventPendingP as needed in order to add and retrieve
* events.
*****************************************************************************/
#ifndef _SIMPLEEVENTHANDLER_H
#define _SIMPLEEVENTHANDLER_H
/* *** include directives *** */
#include "eventHandler.h"
/* *** function declarations *** */
/** Initialize the event queue. Initializes the internal structure of the
event queue. */
void SEQ_Initialize (void);
/** Add an event to the event queue. If the queue is full, UCC_QUEUE_FULL is
returned, otherwise UCC_OK is returned. */
UCC_TYPE SEQ_AddEvent (SEM_EVENT_TYPE event);
/** Retrieve an event from the event queue. If the queue is not empty, UCC_OK
is returned and pEvent will contain the retrieved event. If the queue is
empty, UCC_QUEUE_EMPTY is returned and pEvent will contain the value for
the undefined event. */
UCC_TYPE SEQ_RetrieveEvent (SEM_EVENT_TYPE* pEvent);
/** Clear the queue. All events are removed from the queue. */
void SEQ_Clear (void);
/** Is an event pending. If the queue is not empty, a non-zero value is
returned, otherwise zero is returned. */
VS_BOOL SEQ_EventPendingP (void);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?