borgware-2d/src/makros.h
2014-03-20 05:12:21 +01:00

7 lines
226 B
C

#define DDR(port) (*(volatile uint8_t*)((&port)-1))
#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))