Subversion Repositories group.electronics

Rev

Details | Last modification | View Log | RSS feed

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