upd easyavr

This commit is contained in:
MultiMote 2015-02-14 19:54:25 +03:00
parent b1e41d197b
commit d39156a872

View File

@ -1,7 +1,8 @@
#ifndef __EASYAVR_H_ #ifndef __EASYAVR_H_
#define __EASYAVR_H_ #define __EASYAVR_H_
#define PIN_ON(x,p) ((PORT ## x) |= 1<<(p)) #define PIN_ON(x,p) ((PORT ## x) |= _BV(P ## x ## p))
#define PIN_OFF(x,p) ((PORT ## x) &= ~(1<<(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))
#endif #endif