repo.or.cz
/
avr_work.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
common: list: an interface to a static list which can have elements added and removed...
[avr_work.git]
/
common
/
clock.h
blob
4485d56b95822abd77f9ccbe81256264e7804fb6
1
#ifndef _CLOCK_H_
2
#define _CLOCK_H_
3
4
#define MHz(x) ( x * 1000000 )
5
#define KHz(x) ( x * 1000 )
6
7
#define CLICKS_MS(_ms_) ( (uint16_t) ( F_CPU * (_ms_) / 1000 ) )
8
#define CLICKS_US(_us_) ( (uint16_t) ( F_CPU / 1000000 * (_us_) ) )
// 1000000 = 1e6
9
10
#endif