Subversion Repositories group.electronics

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
117 pfowler 1
#ifndef util_h
2
#define util_h
3
 
4
#define sbi(sfr, bit)   ((sfr) |= _BV(bit))
5
#define cbi(sfr, bit)   ((sfr) &= ~(_BV(bit)))
6
#define xbi(sfr, bit)   ((sfr) ^= _BV(bit))
7
#define rbi(sfr, bit)   (((sfr) >> (bit)) & 0x01)
8
 
9
inline uint8_t map_8(uint8_t x, uint8_t in_min, uint8_t in_max, uint8_t out_min, uint8_t out_max);
10
 
11
void analogInit(void);
12
uint8_t analogRead(uint8_t channel);
13
 
14
typedef void (*tick_ptr)();
15
 
16
void sysclockInit(void);
17
 
18
#endif