📄 timer.h
字号:
#ifndef _TIMER_H
#define _TIMER_H
extern void T0_timeout();
extern void T1_timeout();
extern void T2_timeout();
extern void T3_timeout();
//Timer陆涌貚
//Timer0
void start_T0(char type, unsigned int count);
void stop_T0(void);
//Timer1
void start_T1(char type, unsigned int count);
void stop_T1(void);
//Timer2
void start_T2(char type, unsigned int count);
void stop_T2(void);
//Timer3
void start_T3(char type, unsigned int count);
void stop_T3(void);
//init
void T0_init();
void T1_init();
void T2_init();
void T3_init();
typedef struct Timer_mul {
unsigned char num;
unsigned char on;
unsigned char type; //类型,reapeat=1 单次=0
unsigned long ticks; //执行周期
unsigned long tickleft; //剩余时间,单位为秒
unsigned long adjustedticks;
}Timer_struct;
extern Timer_struct T0,T1,T2,T3;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -