• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Generated by ./xlat/gen.sh from ./xlat/can_protocols.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(CAN_RAW) || (defined(HAVE_DECL_CAN_RAW) && HAVE_DECL_CAN_RAW)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((CAN_RAW) == (1), "CAN_RAW != 1");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define CAN_RAW 1
12 #endif
13 #if defined(CAN_BCM) || (defined(HAVE_DECL_CAN_BCM) && HAVE_DECL_CAN_BCM)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((CAN_BCM) == (2), "CAN_BCM != 2");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define CAN_BCM 2
19 #endif
20 #if defined(CAN_TP16) || (defined(HAVE_DECL_CAN_TP16) && HAVE_DECL_CAN_TP16)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((CAN_TP16) == (3), "CAN_TP16 != 3");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define CAN_TP16 3
26 #endif
27 #if defined(CAN_TP20) || (defined(HAVE_DECL_CAN_TP20) && HAVE_DECL_CAN_TP20)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((CAN_TP20) == (4), "CAN_TP20 != 4");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define CAN_TP20 4
33 #endif
34 #if defined(CAN_MCNET) || (defined(HAVE_DECL_CAN_MCNET) && HAVE_DECL_CAN_MCNET)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((CAN_MCNET) == (5), "CAN_MCNET != 5");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define CAN_MCNET 5
40 #endif
41 #if defined(CAN_ISOTP) || (defined(HAVE_DECL_CAN_ISOTP) && HAVE_DECL_CAN_ISOTP)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((CAN_ISOTP) == (6), "CAN_ISOTP != 6");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define CAN_ISOTP 6
47 #endif
48 
49 #ifndef XLAT_MACROS_ONLY
50 
51 # ifdef IN_MPERS
52 
53 #  error static const struct xlat can_protocols in mpers mode
54 
55 # else
56 
57 static
58 const struct xlat can_protocols[] = {
59  [CAN_RAW] = XLAT(CAN_RAW),
60  [CAN_BCM] = XLAT(CAN_BCM),
61  [CAN_TP16] = XLAT(CAN_TP16),
62  [CAN_TP20] = XLAT(CAN_TP20),
63  [CAN_MCNET] = XLAT(CAN_MCNET),
64  [CAN_ISOTP] = XLAT(CAN_ISOTP),
65  XLAT_END
66 };
67 
68 # endif /* !IN_MPERS */
69 
70 #endif /* !XLAT_MACROS_ONLY */
71