timer0.h
来自「AVR Mega88 + nRF24L01 wireless 2.4GHz 」· C头文件 代码 · 共 18 行
H
18 行
#ifndef _TIMER0_H_#define _TIMER0_H_
static unsigned int milseconds;
//static unsigned int int_count;
#define INTS_PER_milSECOND 22
// 16000000/1024 = 15625
// Fosc / second = 1/15625 = 64us
// caculate 1ms reload (1/1000)/64us = 0.001/(85*10-6) = 15.6 ~ 16
// TCNT0 = 16 for timer0 count 1ms
extern volatile unsigned int CountMilliseconds;
extern void Timer0_Init(void);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?