macusbdb/macusbfb/gpio.h

6 lines
254 B
C
Raw Normal View History

2017-04-17 18:43:10 +00:00
//Macros to quickly modify gpio values
#define GPIOMOD(port, mask, bits) (* (pREG32 (0x50000000+(0x10000*port)+(mask<<2))))=bits
#define GPIOSET(port, bits) GPIOMOD(port, (1<<bits), (1<<bits));
#define GPIOCLEAR(port, bits) GPIOMOD(port, (1<<bits), 0);