?? timers.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 + -