1 2 3 4 5 6 7 8 9 10 11 12
// board type, raspi2 #define RASPI 2 #if RASPI == 4 #define GPIO_BASE 0xFE200000 #else #if RASPI == 3 || RASPI == 2 #define GPIO_BASE 0x3F200000 #else #define GPIO_BASE 0x20200000 #endif // RASPI == 3 || RASPI == 2 #endif // RASPI == 4