📄 timer.c
字号:
#include "iom128v.h"
#include "cal.h"
#include "datatype.h"
void timer0_init(void)
{
TIMSK = 0x00;
TCCR0 = 0x00; //stop
ASSR = 0x00; //set async mode
TCNT0 = 0x7F; //set count
OCR0 = 0x00;
//
}
void start_timer(void)
{
TIMSK = 0x01 ;
SREG = 0x80 ;
TCCR0 = 0x01 ;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -