From b1327588146761d10c949d365f3150f9a7504ee4 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 31 Dec 2019 20:10:56 +0100 Subject: define peripherals base --- global.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'global.h') diff --git a/global.h b/global.h index b041a65..6fc19ed 100644 --- a/global.h +++ b/global.h @@ -5,13 +5,15 @@ #define RASPI 2 #if RASPI == 4 -#define GPIO_BASE 0xFE200000 +#define PERIF_BASE 0xFE000000 #else #if RASPI == 3 || RASPI == 2 -#define GPIO_BASE 0x3F200000 +#define PERIF_BASE 0x3F000000 #else -#define GPIO_BASE 0x20200000 +#define PERIF_BASE 0x20000000 #endif // RASPI == 3 || RASPI == 2 #endif // RASPI == 4 +#define GPIO_BASE (PERIF_BASE + 0x200000) + #endif // GLOBAL_H -- cgit v1.2.3