1 /* Generated by ./xlat/gen.sh from ./xlat/evdev_switch.in; do not edit. */
2 
3 #include "gcc_compat.h"
4 #include "static_assert.h"
5 
6 #if defined(SW_LID) || (defined(HAVE_DECL_SW_LID) && HAVE_DECL_SW_LID)
7 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
8 static_assert((SW_LID) == (0x00), "SW_LID != 0x00");
9 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
10 #else
11 # define SW_LID 0x00
12 #endif
13 #if defined(SW_TABLET_MODE) || (defined(HAVE_DECL_SW_TABLET_MODE) && HAVE_DECL_SW_TABLET_MODE)
14 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
15 static_assert((SW_TABLET_MODE) == (0x01), "SW_TABLET_MODE != 0x01");
16 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
17 #else
18 # define SW_TABLET_MODE 0x01
19 #endif
20 #if defined(SW_HEADPHONE_INSERT) || (defined(HAVE_DECL_SW_HEADPHONE_INSERT) && HAVE_DECL_SW_HEADPHONE_INSERT)
21 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
22 static_assert((SW_HEADPHONE_INSERT) == (0x02), "SW_HEADPHONE_INSERT != 0x02");
23 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
24 #else
25 # define SW_HEADPHONE_INSERT 0x02
26 #endif
27 #if defined(SW_RFKILL_ALL) || (defined(HAVE_DECL_SW_RFKILL_ALL) && HAVE_DECL_SW_RFKILL_ALL)
28 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
29 static_assert((SW_RFKILL_ALL) == (0x03), "SW_RFKILL_ALL != 0x03");
30 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
31 #else
32 # define SW_RFKILL_ALL 0x03
33 #endif
34 #if defined(SW_MICROPHONE_INSERT) || (defined(HAVE_DECL_SW_MICROPHONE_INSERT) && HAVE_DECL_SW_MICROPHONE_INSERT)
35 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
36 static_assert((SW_MICROPHONE_INSERT) == (0x04), "SW_MICROPHONE_INSERT != 0x04");
37 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
38 #else
39 # define SW_MICROPHONE_INSERT 0x04
40 #endif
41 #if defined(SW_DOCK) || (defined(HAVE_DECL_SW_DOCK) && HAVE_DECL_SW_DOCK)
42 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
43 static_assert((SW_DOCK) == (0x05), "SW_DOCK != 0x05");
44 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
45 #else
46 # define SW_DOCK 0x05
47 #endif
48 #if defined(SW_LINEOUT_INSERT) || (defined(HAVE_DECL_SW_LINEOUT_INSERT) && HAVE_DECL_SW_LINEOUT_INSERT)
49 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
50 static_assert((SW_LINEOUT_INSERT) == (0x06), "SW_LINEOUT_INSERT != 0x06");
51 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
52 #else
53 # define SW_LINEOUT_INSERT 0x06
54 #endif
55 #if defined(SW_JACK_PHYSICAL_INSERT) || (defined(HAVE_DECL_SW_JACK_PHYSICAL_INSERT) && HAVE_DECL_SW_JACK_PHYSICAL_INSERT)
56 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
57 static_assert((SW_JACK_PHYSICAL_INSERT) == (0x07), "SW_JACK_PHYSICAL_INSERT != 0x07");
58 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
59 #else
60 # define SW_JACK_PHYSICAL_INSERT 0x07
61 #endif
62 #if defined(SW_VIDEOOUT_INSERT) || (defined(HAVE_DECL_SW_VIDEOOUT_INSERT) && HAVE_DECL_SW_VIDEOOUT_INSERT)
63 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
64 static_assert((SW_VIDEOOUT_INSERT) == (0x08), "SW_VIDEOOUT_INSERT != 0x08");
65 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
66 #else
67 # define SW_VIDEOOUT_INSERT 0x08
68 #endif
69 #if defined(SW_CAMERA_LENS_COVER) || (defined(HAVE_DECL_SW_CAMERA_LENS_COVER) && HAVE_DECL_SW_CAMERA_LENS_COVER)
70 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
71 static_assert((SW_CAMERA_LENS_COVER) == (0x09), "SW_CAMERA_LENS_COVER != 0x09");
72 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
73 #else
74 # define SW_CAMERA_LENS_COVER 0x09
75 #endif
76 #if defined(SW_KEYPAD_SLIDE) || (defined(HAVE_DECL_SW_KEYPAD_SLIDE) && HAVE_DECL_SW_KEYPAD_SLIDE)
77 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
78 static_assert((SW_KEYPAD_SLIDE) == (0x0a), "SW_KEYPAD_SLIDE != 0x0a");
79 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
80 #else
81 # define SW_KEYPAD_SLIDE 0x0a
82 #endif
83 #if defined(SW_FRONT_PROXIMITY) || (defined(HAVE_DECL_SW_FRONT_PROXIMITY) && HAVE_DECL_SW_FRONT_PROXIMITY)
84 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
85 static_assert((SW_FRONT_PROXIMITY) == (0x0b), "SW_FRONT_PROXIMITY != 0x0b");
86 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
87 #else
88 # define SW_FRONT_PROXIMITY 0x0b
89 #endif
90 #if defined(SW_ROTATE_LOCK) || (defined(HAVE_DECL_SW_ROTATE_LOCK) && HAVE_DECL_SW_ROTATE_LOCK)
91 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
92 static_assert((SW_ROTATE_LOCK) == (0x0c), "SW_ROTATE_LOCK != 0x0c");
93 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
94 #else
95 # define SW_ROTATE_LOCK 0x0c
96 #endif
97 #if defined(SW_LINEIN_INSERT) || (defined(HAVE_DECL_SW_LINEIN_INSERT) && HAVE_DECL_SW_LINEIN_INSERT)
98 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
99 static_assert((SW_LINEIN_INSERT) == (0x0d), "SW_LINEIN_INSERT != 0x0d");
100 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
101 #else
102 # define SW_LINEIN_INSERT 0x0d
103 #endif
104 #if defined(SW_MUTE_DEVICE) || (defined(HAVE_DECL_SW_MUTE_DEVICE) && HAVE_DECL_SW_MUTE_DEVICE)
105 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
106 static_assert((SW_MUTE_DEVICE) == (0x0e), "SW_MUTE_DEVICE != 0x0e");
107 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
108 #else
109 # define SW_MUTE_DEVICE 0x0e
110 #endif
111 #if defined(SW_PEN_INSERTED) || (defined(HAVE_DECL_SW_PEN_INSERTED) && HAVE_DECL_SW_PEN_INSERTED)
112 DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
113 static_assert((SW_PEN_INSERTED) == (0x0f), "SW_PEN_INSERTED != 0x0f");
114 DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
115 #else
116 # define SW_PEN_INSERTED 0x0f
117 #endif
118 
119 #ifndef XLAT_MACROS_ONLY
120 
121 # ifdef IN_MPERS
122 
123 #  error static const struct xlat evdev_switch in mpers mode
124 
125 # else
126 
127 static
128 const struct xlat evdev_switch[] = {
129  [SW_LID] = XLAT(SW_LID),
130  [SW_TABLET_MODE] = XLAT(SW_TABLET_MODE),
131  [SW_HEADPHONE_INSERT] = XLAT(SW_HEADPHONE_INSERT),
132  [SW_RFKILL_ALL] = XLAT(SW_RFKILL_ALL),
133  [SW_MICROPHONE_INSERT] = XLAT(SW_MICROPHONE_INSERT),
134  [SW_DOCK] = XLAT(SW_DOCK),
135  [SW_LINEOUT_INSERT] = XLAT(SW_LINEOUT_INSERT),
136  [SW_JACK_PHYSICAL_INSERT] = XLAT(SW_JACK_PHYSICAL_INSERT),
137  [SW_VIDEOOUT_INSERT] = XLAT(SW_VIDEOOUT_INSERT),
138  [SW_CAMERA_LENS_COVER] = XLAT(SW_CAMERA_LENS_COVER),
139  [SW_KEYPAD_SLIDE] = XLAT(SW_KEYPAD_SLIDE),
140  [SW_FRONT_PROXIMITY] = XLAT(SW_FRONT_PROXIMITY),
141  [SW_ROTATE_LOCK] = XLAT(SW_ROTATE_LOCK),
142  [SW_LINEIN_INSERT] = XLAT(SW_LINEIN_INSERT),
143  [SW_MUTE_DEVICE] = XLAT(SW_MUTE_DEVICE),
144  [SW_PEN_INSERTED] = XLAT(SW_PEN_INSERTED),
145  XLAT_END
146 };
147 
148 # endif /* !IN_MPERS */
149 
150 #endif /* !XLAT_MACROS_ONLY */
151