1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#ifndef GLOBAL_H #define GLOBAL_H // 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 #endif // GLOBAL_H