avr-clion/easyavr.h

8 lines
220 B
C
Raw Normal View History

2015-02-05 20:52:15 +03:00
#ifndef __EASYAVR_H_
#define __EASYAVR_H_
2015-02-14 19:54:25 +03:00
#define PIN_ON(x,p) ((PORT ## x) |= _BV(P ## x ## p))
#define PIN_OFF(x,p) ((PORT ## x) &= ~_BV(P ## x ## p))
#define PIN_SET(x,p,v) (v > 0 ? PIN_ON(x,p) : PIN_OFF(x,p))
2015-02-05 20:52:15 +03:00
#endif