⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timebase.h

📁 用M16和MCP2515组成的CAN通讯节点。 有原理图和代码
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -