aboutsummaryrefslogtreecommitdiff
path: root/global.h
blob: 6fc19edaf89eebc2e43d7a79526b582f79cd86d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef GLOBAL_H
#define GLOBAL_H

// board type, raspi2
#define RASPI 2

#if RASPI == 4
#define PERIF_BASE 0xFE000000
#else
#if RASPI == 3 || RASPI == 2
#define PERIF_BASE 0x3F000000
#else
#define PERIF_BASE 0x20000000
#endif // RASPI == 3 || RASPI == 2
#endif // RASPI == 4

#define GPIO_BASE (PERIF_BASE + 0x200000)

#endif // GLOBAL_H