Rev 123 | Rev 128 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#ifndef avrutil_h
#define avrutil_h
#define sbi(sfr, bit) ((sfr) |= _BV(bit))
#define cbi(sfr, bit) ((sfr) &= ~(_BV(bit)))
#define xbi(sfr, bit) ((sfr) ^= _BV(bit))
#define rbi(sfr, bit) (((sfr) >> (bit)) & 0x01)
#define HIGH 1
#define LOW 0
#define OUTPUT 1
#define INPUT 0
#define ON 1
#define OFF 0
volatile uint32_t systime;
inline uint8_t map_8(uint8_t x, uint8_t in_min, uint8_t in_max, uint8_t out_min, uint8_t out_max);
void analogInit(void);
uint8_t analogRead(uint8_t channel);
typedef void (*tick_ptr)();
void sysclockInit(void);
inline void delay_ms(uint16_t count);
void pulsePin(uint8_t port, uint8_t pin, uint16_t count);
void swap_u8(uint8_t* a, uint8_t* b);
void swap_u16(uint16_t* a, uint16_t* b);
void statusLed(uint8_t state);
#endif