timer._h

来自「mega128平台下」· _H 代码 · 共 41 行

_H
41
字号
#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;

 //Timer_struct T0,T1,T2,T3;

#endif 

⌨️ 快捷键说明

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