timebase.h
来自「用M16和MCP2515组成的CAN通讯节点。 有原理图和代码」· C头文件 代码 · 共 19 行
H
19 行
#ifndef timebase_h_
#define timebase_h_
#include <inttypes.h>
// timebase on timer0 serves a 10ms tick
// for 8MHz System and Prescaler 64
#define TIMEBASE_PRESCALE (64)
#define TIMEBASE_HITS_PER_1MS ( F_OSC/TIMEBASE_PRESCALE/1000 )
#define TIMEBASE_RELOAD ((uint8_t)(0xff-TIMEBASE_HITS_PER_1MS+1))
volatile uint16_t gMilliSecTick;
void timebase_init(void);
uint16_t timebase_actTime(void);
uint16_t timebase_passedTimeMS(uint16_t t0);
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?