borgware-2d/src/makros.h

8 lines
233 B
C
Raw Normal View History

#define DDR(port) (*(volatile uint8_t*)((&port)-1))
2009-07-11 16:50:11 +00:00
#define PIN(port) (*(volatile uint8_t*)((&port)-2))
#define DDR_FROM_PIN(pin) (*(volatile uint8_t*)((&pin)+1))
#define PORT_FROM_PIN(pin) (*(volatile uint8_t*)((&pin)+2))