RTEMS  5.0.0
tx3904.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2012.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifndef __TX3904_h
19 #define __TX3904_h
20 
21 /*
22  * Timer Base Addresses and Offsets
23  */
24 
25 #define TX3904_TIMER0_BASE 0xFFFFF000
26 #define TX3904_TIMER1_BASE 0xFFFFF100
27 #define TX3904_TIMER2_BASE 0xFFFFF200
28 
29 #define TX3904_TIMER_TCR 0x00
30 #define TX3904_TIMER_TISR 0x04
31 #define TX3904_TIMER_CPRA 0x08
32 #define TX3904_TIMER_CPRB 0x0C
33 #define TX3904_TIMER_ITMR 0x10
34 #define TX3904_TIMER_CCDR 0x20
35 #define TX3904_TIMER_PGMR 0x30
36 #define TX3904_TIMER_WTMR 0x40
37 #define TX3904_TIMER_TRR 0xF0
38 
39 #define TX3904_TIMER_READ( _base, _register ) \
40  *((volatile uint32_t*)((_base) + (_register)))
41 
42 #define TX3904_TIMER_WRITE( _base, _register, _value ) \
43  *((volatile uint32_t*)((_base) + (_register))) = (_value)
44 
45 #endif