1 |
583 |
jeremybenn |
/*
|
2 |
|
|
* These files are taken from the MCF523X source code example package
|
3 |
|
|
* which is available on the Freescale website. Freescale explicitly
|
4 |
|
|
* grants the redistribution and modification of these source files.
|
5 |
|
|
* The complete licensing information is available in the file
|
6 |
|
|
* LICENSE_FREESCALE.TXT.
|
7 |
|
|
*
|
8 |
|
|
* File: mcf523x_pit.h
|
9 |
|
|
* Purpose: Register and bit definitions for the MCF523X
|
10 |
|
|
*
|
11 |
|
|
* Notes:
|
12 |
|
|
*
|
13 |
|
|
*/
|
14 |
|
|
|
15 |
|
|
#ifndef __MCF523X_PIT_H__
|
16 |
|
|
#define __MCF523X_PIT_H__
|
17 |
|
|
|
18 |
|
|
/*********************************************************************
|
19 |
|
|
*
|
20 |
|
|
* Programmable Interrupt Timer Modules (PIT)
|
21 |
|
|
*
|
22 |
|
|
*********************************************************************/
|
23 |
|
|
|
24 |
|
|
/* Register read/write macros */
|
25 |
|
|
#define MCF_PIT_PCSR0 (*(vuint16*)(void*)(&__IPSBAR[0x150000]))
|
26 |
|
|
#define MCF_PIT_PMR0 (*(vuint16*)(void*)(&__IPSBAR[0x150002]))
|
27 |
|
|
#define MCF_PIT_PCNTR0 (*(vuint16*)(void*)(&__IPSBAR[0x150004]))
|
28 |
|
|
#define MCF_PIT_PCSR1 (*(vuint16*)(void*)(&__IPSBAR[0x160000]))
|
29 |
|
|
#define MCF_PIT_PMR1 (*(vuint16*)(void*)(&__IPSBAR[0x160002]))
|
30 |
|
|
#define MCF_PIT_PCNTR1 (*(vuint16*)(void*)(&__IPSBAR[0x160004]))
|
31 |
|
|
#define MCF_PIT_PCSR2 (*(vuint16*)(void*)(&__IPSBAR[0x170000]))
|
32 |
|
|
#define MCF_PIT_PMR2 (*(vuint16*)(void*)(&__IPSBAR[0x170002]))
|
33 |
|
|
#define MCF_PIT_PCNTR2 (*(vuint16*)(void*)(&__IPSBAR[0x170004]))
|
34 |
|
|
#define MCF_PIT_PCSR3 (*(vuint16*)(void*)(&__IPSBAR[0x180000]))
|
35 |
|
|
#define MCF_PIT_PMR3 (*(vuint16*)(void*)(&__IPSBAR[0x180002]))
|
36 |
|
|
#define MCF_PIT_PCNTR3 (*(vuint16*)(void*)(&__IPSBAR[0x180004]))
|
37 |
|
|
#define MCF_PIT_PCSR(x) (*(vuint16*)(void*)(&__IPSBAR[0x150000+((x)*0x10000)]))
|
38 |
|
|
#define MCF_PIT_PMR(x) (*(vuint16*)(void*)(&__IPSBAR[0x150002+((x)*0x10000)]))
|
39 |
|
|
#define MCF_PIT_PCNTR(x) (*(vuint16*)(void*)(&__IPSBAR[0x150004+((x)*0x10000)]))
|
40 |
|
|
|
41 |
|
|
/* Bit definitions and macros for MCF_PIT_PCSR */
|
42 |
|
|
#define MCF_PIT_PCSR_EN (0x0001)
|
43 |
|
|
#define MCF_PIT_PCSR_RLD (0x0002)
|
44 |
|
|
#define MCF_PIT_PCSR_PIF (0x0004)
|
45 |
|
|
#define MCF_PIT_PCSR_PIE (0x0008)
|
46 |
|
|
#define MCF_PIT_PCSR_OVW (0x0010)
|
47 |
|
|
#define MCF_PIT_PCSR_HALTED (0x0020)
|
48 |
|
|
#define MCF_PIT_PCSR_DOZE (0x0040)
|
49 |
|
|
#define MCF_PIT_PCSR_PRE(x) (((x)&0x000F)<<8)
|
50 |
|
|
|
51 |
|
|
/* Bit definitions and macros for MCF_PIT_PMR */
|
52 |
|
|
#define MCF_PIT_PMR_PM0 (0x0001)
|
53 |
|
|
#define MCF_PIT_PMR_PM1 (0x0002)
|
54 |
|
|
#define MCF_PIT_PMR_PM2 (0x0004)
|
55 |
|
|
#define MCF_PIT_PMR_PM3 (0x0008)
|
56 |
|
|
#define MCF_PIT_PMR_PM4 (0x0010)
|
57 |
|
|
#define MCF_PIT_PMR_PM5 (0x0020)
|
58 |
|
|
#define MCF_PIT_PMR_PM6 (0x0040)
|
59 |
|
|
#define MCF_PIT_PMR_PM7 (0x0080)
|
60 |
|
|
#define MCF_PIT_PMR_PM8 (0x0100)
|
61 |
|
|
#define MCF_PIT_PMR_PM9 (0x0200)
|
62 |
|
|
#define MCF_PIT_PMR_PM10 (0x0400)
|
63 |
|
|
#define MCF_PIT_PMR_PM11 (0x0800)
|
64 |
|
|
#define MCF_PIT_PMR_PM12 (0x1000)
|
65 |
|
|
#define MCF_PIT_PMR_PM13 (0x2000)
|
66 |
|
|
#define MCF_PIT_PMR_PM14 (0x4000)
|
67 |
|
|
#define MCF_PIT_PMR_PM15 (0x8000)
|
68 |
|
|
|
69 |
|
|
/* Bit definitions and macros for MCF_PIT_PCNTR */
|
70 |
|
|
#define MCF_PIT_PCNTR_PC0 (0x0001)
|
71 |
|
|
#define MCF_PIT_PCNTR_PC1 (0x0002)
|
72 |
|
|
#define MCF_PIT_PCNTR_PC2 (0x0004)
|
73 |
|
|
#define MCF_PIT_PCNTR_PC3 (0x0008)
|
74 |
|
|
#define MCF_PIT_PCNTR_PC4 (0x0010)
|
75 |
|
|
#define MCF_PIT_PCNTR_PC5 (0x0020)
|
76 |
|
|
#define MCF_PIT_PCNTR_PC6 (0x0040)
|
77 |
|
|
#define MCF_PIT_PCNTR_PC7 (0x0080)
|
78 |
|
|
#define MCF_PIT_PCNTR_PC8 (0x0100)
|
79 |
|
|
#define MCF_PIT_PCNTR_PC9 (0x0200)
|
80 |
|
|
#define MCF_PIT_PCNTR_PC10 (0x0400)
|
81 |
|
|
#define MCF_PIT_PCNTR_PC11 (0x0800)
|
82 |
|
|
#define MCF_PIT_PCNTR_PC12 (0x1000)
|
83 |
|
|
#define MCF_PIT_PCNTR_PC13 (0x2000)
|
84 |
|
|
#define MCF_PIT_PCNTR_PC14 (0x4000)
|
85 |
|
|
#define MCF_PIT_PCNTR_PC15 (0x8000)
|
86 |
|
|
|
87 |
|
|
/********************************************************************/
|
88 |
|
|
|
89 |
|
|
#endif /* __MCF523X_PIT_H__ */
|