OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ColdFire_MCF5282_Eclipse/] [RTOSDemo/] [MCF5282/] [MCF5282_FlexCAN.h] - Blame information for rev 615

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 jeremybenn
/* Coldfire C Header File
2
 * Copyright Freescale Semiconductor Inc
3
 * All rights reserved.
4
 *
5
 * 2007/03/19 Revision: 0.9
6
 */
7
 
8
#ifndef __MCF5282_FlexCAN_H__
9
#define __MCF5282_FlexCAN_H__
10
 
11
 
12
/*********************************************************************
13
*
14
* Flex Controller Area Network (FlexCAN)
15
*
16
*********************************************************************/
17
 
18
/* Register read/write macros */
19
#define MCF_FlexCAN_CANMCR                   (*(vuint16*)(&__IPSBAR[0x1C0000]))
20
#define MCF_FlexCAN_CANCTRL0                 (*(vuint8 *)(&__IPSBAR[0x1C0006]))
21
#define MCF_FlexCAN_CANCTRL1                 (*(vuint8 *)(&__IPSBAR[0x1C0007]))
22
#define MCF_FlexCAN_PRESDIV                  (*(vuint8 *)(&__IPSBAR[0x1C0008]))
23
#define MCF_FlexCAN_CANCTRL2                 (*(vuint8 *)(&__IPSBAR[0x1C0009]))
24
#define MCF_FlexCAN_TIMER                    (*(vuint16*)(&__IPSBAR[0x1C000A]))
25
#define MCF_FlexCAN_RXGMASK                  (*(vuint32*)(&__IPSBAR[0x1C0010]))
26
#define MCF_FlexCAN_RX14MASK                 (*(vuint32*)(&__IPSBAR[0x1C0014]))
27
#define MCF_FlexCAN_RX15MASK                 (*(vuint32*)(&__IPSBAR[0x1C0018]))
28
#define MCF_FlexCAN_ESTAT                    (*(vuint16*)(&__IPSBAR[0x1C0020]))
29
#define MCF_FlexCAN_IMASK                    (*(vuint16*)(&__IPSBAR[0x1C0022]))
30
#define MCF_FlexCAN_IFLAG                    (*(vuint16*)(&__IPSBAR[0x1C0024]))
31
#define MCF_FlexCAN_RXECTR                   (*(vuint8 *)(&__IPSBAR[0x1C0026]))
32
#define MCF_FlexCAN_TXECTR                   (*(vuint8 *)(&__IPSBAR[0x1C0028]))
33
 
34
 
35
 
36
/* Bit definitions and macros for MCF_FlexCAN_CANMCR */
37
#define MCF_FlexCAN_CANMCR_STOPACK           (0x10)
38
#define MCF_FlexCAN_CANMCR_APS               (0x20)
39
#define MCF_FlexCAN_CANMCR_SELFWAKE          (0x40)
40
#define MCF_FlexCAN_CANMCR_SUPV              (0x80)
41
#define MCF_FlexCAN_CANMCR_FRZACK            (0x100)
42
#define MCF_FlexCAN_CANMCR_SOFTRST           (0x200)
43
#define MCF_FlexCAN_CANMCR_WAKEMSK           (0x400)
44
#define MCF_FlexCAN_CANMCR_NOTRDY            (0x800)
45
#define MCF_FlexCAN_CANMCR_HALT              (0x1000)
46
#define MCF_FlexCAN_CANMCR_FRZ               (0x4000)
47
#define MCF_FlexCAN_CANMCR_STOP              (0x8000)
48
 
49
/* Bit definitions and macros for MCF_FlexCAN_CANCTRL0 */
50
#define MCF_FlexCAN_CANCTRL0_TXMODE(x)       (((x)&0x3)<<0)
51
#define MCF_FlexCAN_CANCTRL0_RXMODE          (0x4)
52
#define MCF_FlexCAN_CANCTRL0_ERRMSK          (0x40)
53
#define MCF_FlexCAN_CANCTRL0_BOFFMSK         (0x80)
54
 
55
/* Bit definitions and macros for MCF_FlexCAN_CANCTRL1 */
56
#define MCF_FlexCAN_CANCTRL1_PROPSEG(x)      (((x)&0x7)<<0)
57
#define MCF_FlexCAN_CANCTRL1_LOM             (0x8)
58
#define MCF_FlexCAN_CANCTRL1_LBUF            (0x10)
59
#define MCF_FlexCAN_CANCTRL1_TSYNC           (0x20)
60
#define MCF_FlexCAN_CANCTRL1_SAMP            (0x80)
61
 
62
/* Bit definitions and macros for MCF_FlexCAN_PRESDIV */
63
#define MCF_FlexCAN_PRESDIV_PRES_DIV(x)      (((x)&0xFF)<<0)
64
 
65
/* Bit definitions and macros for MCF_FlexCAN_CANCTRL2 */
66
#define MCF_FlexCAN_CANCTRL2_PSEG2(x)        (((x)&0x7)<<0)
67
#define MCF_FlexCAN_CANCTRL2_PSEG1(x)        (((x)&0x7)<<0x3)
68
#define MCF_FlexCAN_CANCTRL2_RJW(x)          (((x)&0x3)<<0x6)
69
 
70
/* Bit definitions and macros for MCF_FlexCAN_TIMER */
71
#define MCF_FlexCAN_TIMER_TIMER(x)           (((x)&0xFFFF)<<0)
72
 
73
/* Bit definitions and macros for MCF_FlexCAN_RXGMASK */
74
#define MCF_FlexCAN_RXGMASK_MID(x)           (((x)&0x7FFFFFFF)<<0x1)
75
 
76
/* Bit definitions and macros for MCF_FlexCAN_RX14MASK */
77
#define MCF_FlexCAN_RX14MASK_MID(x)          (((x)&0x7FFFFFFF)<<0x1)
78
 
79
/* Bit definitions and macros for MCF_FlexCAN_RX15MASK */
80
#define MCF_FlexCAN_RX15MASK_MID(x)          (((x)&0x7FFFFFFF)<<0x1)
81
 
82
/* Bit definitions and macros for MCF_FlexCAN_ESTAT */
83
#define MCF_FlexCAN_ESTAT_WAKEINT            (0x1)
84
#define MCF_FlexCAN_ESTAT_BOFFINT            (0x2)
85
#define MCF_FlexCAN_ESTAT_ERRINT             (0x4)
86
#define MCF_FlexCAN_ESTAT_FCS(x)             (((x)&0x3)<<0x4)
87
#define MCF_FlexCAN_ESTAT_FCS_ACTIVE         (0)
88
#define MCF_FlexCAN_ESTAT_FCS_PASSIVE        (0x10)
89
#define MCF_FlexCAN_ESTAT_TXRX               (0x40)
90
#define MCF_FlexCAN_ESTAT_IDLE               (0x80)
91
#define MCF_FlexCAN_ESTAT_RXWARN             (0x100)
92
#define MCF_FlexCAN_ESTAT_TXWARN             (0x200)
93
#define MCF_FlexCAN_ESTAT_STUFFERR           (0x400)
94
#define MCF_FlexCAN_ESTAT_FORMERR            (0x800)
95
#define MCF_FlexCAN_ESTAT_CRCERR             (0x1000)
96
#define MCF_FlexCAN_ESTAT_ACKERR             (0x2000)
97
#define MCF_FlexCAN_ESTAT_BITERR(x)          (((x)&0x3)<<0xE)
98
 
99
/* Bit definitions and macros for MCF_FlexCAN_IMASK */
100
#define MCF_FlexCAN_IMASK_BUF0M              (0x1)
101
#define MCF_FlexCAN_IMASK_BUF1M              (0x2)
102
#define MCF_FlexCAN_IMASK_BUF2M              (0x4)
103
#define MCF_FlexCAN_IMASK_BUF3M              (0x8)
104
#define MCF_FlexCAN_IMASK_BUF4M              (0x10)
105
#define MCF_FlexCAN_IMASK_BUF5M              (0x20)
106
#define MCF_FlexCAN_IMASK_BUF6M              (0x40)
107
#define MCF_FlexCAN_IMASK_BUF7M              (0x80)
108
#define MCF_FlexCAN_IMASK_BUF8M              (0x100)
109
#define MCF_FlexCAN_IMASK_BUF9M              (0x200)
110
#define MCF_FlexCAN_IMASK_BUF10M             (0x400)
111
#define MCF_FlexCAN_IMASK_BUF11M             (0x800)
112
#define MCF_FlexCAN_IMASK_BUF12M             (0x1000)
113
#define MCF_FlexCAN_IMASK_BUF13M             (0x2000)
114
#define MCF_FlexCAN_IMASK_BUF14M             (0x4000)
115
#define MCF_FlexCAN_IMASK_BUF15M             (0x8000)
116
#define MCF_FlexCAN_IMASK_BUF(x)             (0x1<<(x))
117
 
118
/* Bit definitions and macros for MCF_FlexCAN_IFLAG */
119
#define MCF_FlexCAN_IFLAG_BUF0I              (0x1)
120
#define MCF_FlexCAN_IFLAG_BUF1I              (0x2)
121
#define MCF_FlexCAN_IFLAG_BUF2I              (0x4)
122
#define MCF_FlexCAN_IFLAG_BUF3I              (0x8)
123
#define MCF_FlexCAN_IFLAG_BUF4I              (0x10)
124
#define MCF_FlexCAN_IFLAG_BUF5I              (0x20)
125
#define MCF_FlexCAN_IFLAG_BUF6I              (0x40)
126
#define MCF_FlexCAN_IFLAG_BUF7I              (0x80)
127
#define MCF_FlexCAN_IFLAG_BUF8I              (0x100)
128
#define MCF_FlexCAN_IFLAG_BUF9I              (0x200)
129
#define MCF_FlexCAN_IFLAG_BUF10I             (0x400)
130
#define MCF_FlexCAN_IFLAG_BUF11I             (0x800)
131
#define MCF_FlexCAN_IFLAG_BUF12I             (0x1000)
132
#define MCF_FlexCAN_IFLAG_BUF13I             (0x2000)
133
#define MCF_FlexCAN_IFLAG_BUF14I             (0x4000)
134
#define MCF_FlexCAN_IFLAG_BUF15I             (0x8000)
135
#define MCF_FlexCAN_IFLAG_BUF(x)             (0x1<<(x))
136
 
137
/* Bit definitions and macros for MCF_FlexCAN_RXECTR */
138
#define MCF_FlexCAN_RXECTR_RXECTR(x)         (((x)&0xFF)<<0)
139
 
140
/* Bit definitions and macros for MCF_FlexCAN_TXECTR */
141
#define MCF_FlexCAN_TXECTR_TXECTR(x)         (((x)&0xFF)<<0)
142
 
143
 
144
#endif /* __MCF5282_FlexCAN_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.