📄 sigtimer.h
字号:
/*
file name:intsignal.h
function:handle the cpu relate signal
author :Einsn
date:2006-12-26
*/
#ifndef __INTSIGNAL_H_
#define __INTSIGNAL_H_
#include "typedefs.h"
#include "avr/signal.h"
#define SOFTTIMER
#define TIMERHOOK
/*
* User Configuration, Hardware relation
* Can be modify by the specified CPU and application
*
*/
/*
*
* the system timer0 interval in microsecond
*
*/
#define TIMERINTERVAL 10 //ms
/*
*
* interrupt handle
*
*/
#define SIGTimerSignal() SIGNAL(SIG_OUTPUT_COMPARE0)
/*
*
* User interface
*
*/
void SIGTimerInit(void);
#ifdef TIMERHOOK
typedef void (*SIGNALHOOK)(void *);
int8 SIGTimerLoad(SIGNALHOOK SignalHook,void *pdata);
int8 SIGTimerRemove(SIGNALHOOK SignalHook,void *pdata);
#endif
#ifdef SOFTTIMER
typedef uint8 timerid;
timerid SoftTimerAdd(uint16 isec);
void SoftTimerRestart(timerid id,uint16 isec);
void SoftTimerRestartMS(timerid id,uint16 isec);
void SoftTimerRemove(timerid id);
uint8 SoftTimerTest(timerid id);
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -