diff options
Diffstat (limited to 'global.h')
-rw-r--r-- | global.h | 17 |
1 files changed, 12 insertions, 5 deletions
@@ -4,16 +4,23 @@ // board type, raspi2 #define RASPI 2 +// conditionally #define PERIF_BASE #if RASPI == 4 + #define PERIF_BASE 0xFE000000 -#else -#if RASPI == 3 || RASPI == 2 + +#elif RASPI == 3 || RASPI == 2 + #define PERIF_BASE 0x3F000000 -#else + +#else // if RASPI == 1 + #define PERIF_BASE 0x20000000 -#endif // RASPI == 3 || RASPI == 2 -#endif // RASPI == 4 +#endif + +// GPIO_BASE is #define'd in terms of PERIF_BASE +// (as in sane kernels - like linux, not like in wiki.osdev codes...) #define GPIO_BASE (PERIF_BASE + 0x200000) #endif // GLOBAL_H |