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

📄 timers.h

📁 WWVB receiver using AVR.
💻 H
字号:
/* $Id: timers.h,v 1.2 2005/04/16 11:52:45 simimeie Exp $ * Functions that work with the avrs timer(s). * Mainly a function that allows you to get sort of a timestamp. */ #ifndef _TIMERS_H_#define _TIMERS_H_/* This value can be used for turning "ticks" into "seconds" */#define TICKSPERSECOND ((uint16_t)(CPUFREQ / 16384UL))struct tickdata {	uint16_t seconds;	uint16_t ticks;};void timers_init(void);void gettickdata(struct tickdata * td);/* For lower resolution (only the seconds), you can use this instead */uint16_t getseconds(void);/* This should only be called by the DCF module */void timers_zero(void);#ifdef HIGHRESTIMER#define HIGHRESTICKSPERSECOND (CPUFREQ / 1024UL)/* The highres timer counts 64 times as fast as the normal timer. * It has to be started with starthighrestimer and will implicitly be stopped * again if it overflows or is read with readhighrestimer. */void starthighrestimer(void);uint16_t readhighrestimer(void);#endif#endif

⌨️ 快捷键说明

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