|
1 /* |
|
2 This file is part of CanFestival, a library implementing CanOpen Stack. |
|
3 |
|
4 Author: Christian Fortin (canfestival@canopencanada.ca) |
|
5 |
|
6 See COPYING file for copyrights details. |
|
7 |
|
8 This library is free software; you can redistribute it and/or |
|
9 modify it under the terms of the GNU Lesser General Public |
|
10 License as published by the Free Software Foundation; either |
|
11 version 2.1 of the License, or (at your option) any later version. |
|
12 |
|
13 This library is distributed in the hope that it will be useful, |
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
16 Lesser General Public License for more details. |
|
17 |
|
18 You should have received a copy of the GNU Lesser General Public |
|
19 License along with this library; if not, write to the Free Software |
|
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 */ |
|
22 |
|
23 #if !defined(_SJA1000_H_) |
|
24 #define _SJA1000_H_ |
|
25 |
|
26 #define MOD 0 |
|
27 #define RM 0 /* RM 1=reset 0 = normal */ |
|
28 #define bustiming0 6 |
|
29 #define OCMODE1 1 |
|
30 #define OCMODE0 0 |
|
31 |
|
32 #define SJW1 7 |
|
33 #define SJW0 6 |
|
34 #define BRP5 5 |
|
35 #define BRP4 4 |
|
36 #define BRP3 3 |
|
37 #define BRP2 2 |
|
38 #define BRP1 1 |
|
39 #define BRP0 0 |
|
40 |
|
41 #define CDO 3 /* 1=clear data overun status bit */ |
|
42 #define SAM 7 |
|
43 #define TSEG22 6 |
|
44 #define TSEG21 5 |
|
45 #define TSEG20 4 |
|
46 #define TSEG13 3 |
|
47 #define TSEG12 2 |
|
48 #define TSEG11 1 |
|
49 #define TSEG10 0 |
|
50 #define OCTP1 7 |
|
51 #define OCTN1 6 |
|
52 #define OCPOL1 5 |
|
53 #define OCTP0 4 |
|
54 #define OCTN0 3 |
|
55 #define OCPOL0 2 |
|
56 #define OCMODE1 1 |
|
57 #define OCMODE0 0 |
|
58 #define clockdivider 31 |
|
59 #define CANmode 7 /* 1= PELICAN */ |
|
60 #define CBP 6 /* 1= bypass comparator */ |
|
61 #define RXINTEN 5 /* 1= receive interrupt from tx */ |
|
62 #define clockoff 3 /* 1= disabled */ |
|
63 #define CD2 2 |
|
64 #define CD1 1 |
|
65 #define CD0 0 |
|
66 |
|
67 #define AFM 3 /* AFM 1=single 0=dual acceptance filter */ |
|
68 #define STM 2 /* STM 1=self test 0= norma */ |
|
69 #define IER 4 |
|
70 #define bustiming1 7 |
|
71 #define outputcontrol 8 |
|
72 #define TXIDENTIFIER1 17 |
|
73 #define TXIDENTIFIER2 18 |
|
74 |
|
75 |
|
76 #endif |