44a09b6f34d3e77ca11d7bd6976ea9e2489d0777
[reactos.git] / reactos / include / reactos / arm / peripherals / sp804.h
1 /*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: include/reactos/arm/targets/pl011.h
5 * PURPOSE: SB804 Registers and Constants
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 /* GLOBALS ********************************************************************/
10
11 //
12 // Timer Registers
13 //
14 #define TIMER_BASE(x) (ULONG_PTR)(0x101E2000 + (x * 0x1000))
15 #define TIMER0_LOAD TIMER_BASE(0) + 0x00
16 #define TIMER0_VALUE TIMER_BASE(0) + 0x04
17 #define TIMER0_CONTROL TIMER_BASE(0) + 0x08
18 #define TIMER0_INT_CLEAR TIMER_BASE(0) + 0x0C
19 #define TIMER0_INT_STATUS TIMER_BASE(0) + 0x10
20 #define TIMER0_INT_MASK TIMER_BASE(0) + 0x14
21 #define TIMER0_BACKGROUND_LOAD TIMER_BASE(1) + 0x18
22 #define TIMER1_LOAD TIMER_BASE(1) + 0x00
23 #define TIMER1_VALUE TIMER_BASE(1) + 0x04
24 #define TIMER1_CONTROL TIMER_BASE(1) + 0x08
25 #define TIMER1_INT_CLEAR TIMER_BASE(1) + 0x0C
26 #define TIMER1_INT_STATUS TIMER_BASE(1) + 0x10
27 #define TIMER1_INT_MASK TIMER_BASE(1) + 0x14
28 #define TIMER1_BACKGROUND_LOAD TIMER_BASE(1) + 0x18
29
30 //
31 // Control Register
32 //
33 typedef union _SP804_CONTROL_REGISTER
34 {
35 struct
36 {
37 ULONG OneShot:1;
38 ULONG Wide:1;
39 ULONG Prescale:2;
40 ULONG Reserved:1;
41 ULONG Interrupt:1;
42 ULONG Periodic:1;
43 ULONG Enabled:1;
44 ULONG Unused:24;
45 };
46 ULONG AsUlong;
47 } SP804_CONTROL_REGISTER, *PSP804_CONTROL_REGISTER;