|
1 /* |
|
2 This file is part of CanFestival, a library implementing CanOpen Stack. |
|
3 |
|
4 Copyright (C): Edouard TISSERANT and Francis DUPIN |
|
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 #ifndef __APPLICFG_NONE__ |
|
24 #define __APPLICFG_NONE__ |
|
25 |
|
26 #include <sys/types.h> |
|
27 |
|
28 /* Define the architecture : little_endian or big_endian |
|
29 ----------------------------------------------------- |
|
30 Test : |
|
31 UNS32 v = 0x1234ABCD; |
|
32 char *data = &v; |
|
33 |
|
34 Result for a little_endian architecture : |
|
35 data[0] = 0xCD; |
|
36 data[1] = 0xAB; |
|
37 data[2] = 0x34; |
|
38 data[3] = 0x12; |
|
39 |
|
40 Result for a big_endian architecture : |
|
41 data[0] = 0x12; |
|
42 data[1] = 0x34; |
|
43 data[2] = 0xAB; |
|
44 data[3] = 0xCD; |
|
45 */ |
|
46 |
|
47 /* Integers */ |
|
48 #define INTEGER8 signed char |
|
49 #define INTEGER16 short |
|
50 #define INTEGER24 int |
|
51 #define INTEGER32 int |
|
52 #define INTEGER40 long long |
|
53 #define INTEGER48 long long |
|
54 #define INTEGER56 long long |
|
55 #define INTEGER64 long long |
|
56 |
|
57 /* Unsigned integers */ |
|
58 #define UNS8 unsigned char |
|
59 #define UNS16 unsigned short |
|
60 #define UNS32 unsigned int |
|
61 #define UNS24 unsigned int |
|
62 #define UNS40 unsigned long long |
|
63 #define UNS48 unsigned long long |
|
64 #define UNS56 unsigned long long |
|
65 #define UNS64 unsigned long long |
|
66 |
|
67 /* Reals */ |
|
68 #define REAL32 float |
|
69 #define REAL64 double |
|
70 |
|
71 /* Definition of error and warning macros */ |
|
72 /* -------------------------------------- */ |
|
73 #define MSG(...) |
|
74 |
|
75 /* Definition of MSG_ERR */ |
|
76 /* --------------------- */ |
|
77 #define MSG_ERR(num, str, val) |
|
78 |
|
79 /* Definition of MSG_WAR */ |
|
80 /* --------------------- */ |
|
81 #define MSG_WAR(num, str, val) |
|
82 |
|
83 typedef void* CAN_HANDLE; |
|
84 |
|
85 typedef void* CAN_PORT; |
|
86 |
|
87 #endif |