spi_console: use print/scanf instead of ncurses, hack 64 bit.
[avr_work.git] / common / clock.h
blob4485d56b95822abd77f9ccbe81256264e7804fb6
1 #ifndef _CLOCK_H_
2 #define _CLOCK_H_
4 #define MHz(x) ( x * 1000000 )
5 #define KHz(x) ( x * 1000 )
7 #define CLICKS_MS(_ms_) ( (uint16_t) ( F_CPU * (_ms_) / 1000 ) )
8 #define CLICKS_US(_us_) ( (uint16_t) ( F_CPU / 1000000 * (_us_) ) ) // 1000000 = 1e6
10 #endif