📄 interruptcalls.h
字号:
/******************************************************************************
*
* Freescale Semiconductor Inc.
* (c) Copyright 2004-2006 Freescale Semiconductor, Inc.
* ALL RIGHTS RESERVED.
*
******************************************************************************!
*
* @file interruptcalls.h
*
* @author R89994
*
* @version 1.0.3.0
*
* @date Apr-20-2006
*
* @brief definitions they are used in interruptcalls.c
*******************************************************************************/
typedef void (* far TaskFunction)();
typedef union {
unsigned char counter ;
unsigned char suspend ;
}Parameter ;
typedef struct{
TaskFunction pFunc ; // pointer to the handler
Parameter spec ; // suspend task | tasks repeats
int delay ;
char priority ;
char *name ; // Task name
unsigned char *fm_action;
}TaskIdentifier;
/**********************************************************************************
* public functions *
***********************************************************************************/
void EnableTask (char *taskName, char cycles);
void DisableTask (char *taskName);
void RunFunctions(char priority);
/******************************************************************************
*
* Macros and definitions
*
*******************************************************************************/
#define TASK_ARRAY_SIZE 32
#define MIN_PRIORITY 1
#define LOW_PRIORITY 2
#define MID_PRIOROTY 3
#define HIGH_PRIORITY 4
#define TASK_TABLE_BEGIN(id) TaskIdentifier TaskStructure1[] = {
#define TASK_TABLE_BODY(Fname, priority, cycnr, delnr, name) {(TaskFunction)(#Fname), Parameter cycnr, int delnr, char priority, char "#name"},
#define TASK_TABLE_END };
#define CYCLES(cnr) (cnr)
#define DELAY(dnr) (dnr)
#define TASKNAME(name) ("#name")
/******************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -