armOS  0.1.0
Minimal ARM Operating System for the Raspberry Pi - Documentation generated for Pi 4.
timer.h
Go to the documentation of this file.
1 
7 #ifndef P_TIMER_H
8 #define P_TIMER_H
9 
10 #include <peripherals/base.h>
11 
16 #define TIMER_CLK_HZ 1000000
17 
21 #define TIMER_CLK_1000_HZ 1000
22 
27 enum
28 {
29 
35  TIMER_BASE = (MMIO_BASE + 0x3000),
36 
37  TIMER_CS = (TIMER_BASE + 0x00),
38  TIMER_CLO = (TIMER_BASE + 0x04),
39  TIMER_CHI = (TIMER_BASE + 0x08),
40  TIMER_C0 = (TIMER_BASE + 0x0c),
41  TIMER_C1 = (TIMER_BASE + 0x10),
42  TIMER_C2 = (TIMER_BASE + 0x14),
43  TIMER_C3 = (TIMER_BASE + 0x18),
45  TIMER_CS_M0 = (1 << 0),
46  TIMER_CS_M1 = (1 << 1),
47  TIMER_CS_M2 = (1 << 2),
48  TIMER_CS_M3 = (1 << 3)
49 };
50 
51 #endif
TIMER_C3
@ TIMER_C3
Definition: timer.h:43
TIMER_CS_M3
@ TIMER_CS_M3
Definition: timer.h:48
TIMER_BASE
@ TIMER_BASE
Definition: timer.h:35
base.h
Definition of base MMIO registers addresses.
TIMER_CS_M1
@ TIMER_CS_M1
Definition: timer.h:46
TIMER_CS_M2
@ TIMER_CS_M2
Definition: timer.h:47
TIMER_CLO
@ TIMER_CLO
Definition: timer.h:38
TIMER_CS_M0
@ TIMER_CS_M0
Definition: timer.h:45
TIMER_CS
@ TIMER_CS
Definition: timer.h:37
MMIO_BASE
@ MMIO_BASE
Definition: base.h:29
TIMER_C1
@ TIMER_C1
Definition: timer.h:41
TIMER_CHI
@ TIMER_CHI
Definition: timer.h:39
TIMER_C2
@ TIMER_C2
Definition: timer.h:42
TIMER_C0
@ TIMER_C0
Definition: timer.h:40