mraa  1.8.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
types.h
Go to the documentation of this file.
1 /*
2  * Author: Brendan Le Foll <brendan.le.foll@intel.com>
3  * Copyright © 2014 Intel Corporation
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21  * IN THE SOFTWARE.
22  */
23 
24 #pragma once
25 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
39 typedef enum {
52  MRAA_UP = 12,
54 #if __STDC_VERSION__ >= 199901L
55  MRAA_INTEL_GT_TUCHUCK = MRAA_INTEL_JOULE_EXPANSION, // deprecated
56 #endif
59  MRAA_UP2 = 16,
63  // USB platform extenders start at 256
66  // contains bit 9 so is subplatform
67  MRAA_GROVEPI = 1024,
76 
80 typedef enum {
81  MRAA_INTEL_EDISON_MINIBOARD_J17_1 = 0,
82  MRAA_INTEL_EDISON_MINIBOARD_J17_5 = 4,
83  MRAA_INTEL_EDISON_MINIBOARD_J17_7 = 6,
84  MRAA_INTEL_EDISON_MINIBOARD_J17_8 = 7,
85  MRAA_INTEL_EDISON_MINIBOARD_J17_9 = 8,
86  MRAA_INTEL_EDISON_MINIBOARD_J17_10 = 9,
87  MRAA_INTEL_EDISON_MINIBOARD_J17_11 = 10,
88  MRAA_INTEL_EDISON_MINIBOARD_J17_12 = 11,
89  MRAA_INTEL_EDISON_MINIBOARD_J17_14 = 13,
90  MRAA_INTEL_EDISON_MINIBOARD_J18_1 = 14,
91  MRAA_INTEL_EDISON_MINIBOARD_J18_2 = 15,
92  MRAA_INTEL_EDISON_MINIBOARD_J18_6 = 19,
93  MRAA_INTEL_EDISON_MINIBOARD_J18_7 = 20,
94  MRAA_INTEL_EDISON_MINIBOARD_J18_8 = 21,
95  MRAA_INTEL_EDISON_MINIBOARD_J18_10 = 23,
96  MRAA_INTEL_EDISON_MINIBOARD_J18_11 = 24,
97  MRAA_INTEL_EDISON_MINIBOARD_J18_12 = 25,
98  MRAA_INTEL_EDISON_MINIBOARD_J18_13 = 26,
99  MRAA_INTEL_EDISON_MINIBOARD_J19_4 = 31,
100  MRAA_INTEL_EDISON_MINIBOARD_J19_5 = 32,
101  MRAA_INTEL_EDISON_MINIBOARD_J19_6 = 33,
102  MRAA_INTEL_EDISON_MINIBOARD_J19_8 = 35,
103  MRAA_INTEL_EDISON_MINIBOARD_J19_9 = 36,
104  MRAA_INTEL_EDISON_MINIBOARD_J19_10 = 37,
105  MRAA_INTEL_EDISON_MINIBOARD_J19_11 = 38,
106  MRAA_INTEL_EDISON_MINIBOARD_J19_12 = 39,
107  MRAA_INTEL_EDISON_MINIBOARD_J19_13 = 40,
108  MRAA_INTEL_EDISON_MINIBOARD_J19_14 = 41,
109  MRAA_INTEL_EDISON_MINIBOARD_J20_3 = 44,
110  MRAA_INTEL_EDISON_MINIBOARD_J20_4 = 45,
111  MRAA_INTEL_EDISON_MINIBOARD_J20_5 = 46,
112  MRAA_INTEL_EDISON_MINIBOARD_J20_6 = 47,
113  MRAA_INTEL_EDISON_MINIBOARD_J20_7 = 48,
114  MRAA_INTEL_EDISON_MINIBOARD_J20_8 = 49,
115  MRAA_INTEL_EDISON_MINIBOARD_J20_9 = 50,
116  MRAA_INTEL_EDISON_MINIBOARD_J20_10 = 51,
117  MRAA_INTEL_EDISON_MINIBOARD_J20_11 = 52,
118  MRAA_INTEL_EDISON_MINIBOARD_J20_12 = 53,
119  MRAA_INTEL_EDISON_MINIBOARD_J20_13 = 54,
120  MRAA_INTEL_EDISON_MINIBOARD_J20_14 = 55
122 
126 typedef enum {
127  MRAA_INTEL_EDISON_GP182 = 0,
128  MRAA_INTEL_EDISON_GP135 = 4,
129  MRAA_INTEL_EDISON_GP27 = 6,
130  MRAA_INTEL_EDISON_GP20 = 7,
131  MRAA_INTEL_EDISON_GP28 = 8,
132  MRAA_INTEL_EDISON_GP111 = 0,
133  MRAA_INTEL_EDISON_GP109 = 10,
134  MRAA_INTEL_EDISON_GP115 = 11,
135  MRAA_INTEL_EDISON_GP128 = 13,
136  MRAA_INTEL_EDISON_GP13 = 14,
137  MRAA_INTEL_EDISON_GP165 = 15,
138  MRAA_INTEL_EDISON_GP19 = 19,
139  MRAA_INTEL_EDISON_GP12 = 20,
140  MRAA_INTEL_EDISON_GP183 = 21,
141  MRAA_INTEL_EDISON_GP110 = 23,
142  MRAA_INTEL_EDISON_GP114 = 24,
143  MRAA_INTEL_EDISON_GP129 = 25,
144  MRAA_INTEL_EDISON_GP130 = 26,
145  MRAA_INTEL_EDISON_GP44 = 31,
146  MRAA_INTEL_EDISON_GP46 = 32,
147  MRAA_INTEL_EDISON_GP48 = 33,
148  MRAA_INTEL_EDISON_GP131 = 35,
149  MRAA_INTEL_EDISON_GP14 = 36,
150  MRAA_INTEL_EDISON_GP40 = 37,
151  MRAA_INTEL_EDISON_GP43 = 38,
152  MRAA_INTEL_EDISON_GP77 = 39,
153  MRAA_INTEL_EDISON_GP82 = 40,
154  MRAA_INTEL_EDISON_GP83 = 41,
155  MRAA_INTEL_EDISON_GP134 = 44,
156  MRAA_INTEL_EDISON_GP45 = 45,
157  MRAA_INTEL_EDISON_GP47 = 46,
158  MRAA_INTEL_EDISON_GP49 = 47,
159  MRAA_INTEL_EDISON_GP15 = 48,
160  MRAA_INTEL_EDISON_GP84 = 49,
161  MRAA_INTEL_EDISON_GP42 = 50,
162  MRAA_INTEL_EDISON_GP41 = 51,
163  MRAA_INTEL_EDISON_GP78 = 52,
164  MRAA_INTEL_EDISON_GP79 = 53,
165  MRAA_INTEL_EDISON_GP80 = 54,
166  MRAA_INTEL_EDISON_GP81 = 55
168 
172 typedef enum {
173  MRAA_RASPBERRY_WIRING_PIN8 = 3,
174  MRAA_RASPBERRY_WIRING_PIN9 = 5,
175  MRAA_RASPBERRY_WIRING_PIN7 = 7,
176  MRAA_RASPBERRY_WIRING_PIN15 = 8,
177  MRAA_RASPBERRY_WIRING_PIN16 = 10,
178  MRAA_RASPBERRY_WIRING_PIN0 = 11,
179  MRAA_RASPBERRY_WIRING_PIN1 = 12,
180  MRAA_RASPBERRY_WIRING_PIN2 = 13,
181  MRAA_RASPBERRY_WIRING_PIN3 = 15,
182  MRAA_RASPBERRY_WIRING_PIN4 = 16,
183  MRAA_RASPBERRY_WIRING_PIN5 = 18,
184  MRAA_RASPBERRY_WIRING_PIN12 = 19,
185  MRAA_RASPBERRY_WIRING_PIN13 = 21,
186  MRAA_RASPBERRY_WIRING_PIN6 = 22,
187  MRAA_RASPBERRY_WIRING_PIN14 = 23,
188  MRAA_RASPBERRY_WIRING_PIN10 = 24,
189  MRAA_RASPBERRY_WIRING_PIN11 = 26,
190  MRAA_RASPBERRY_WIRING_PIN17 = 29, // RPi B V2
191  MRAA_RASPBERRY_WIRING_PIN21 = 29,
192  MRAA_RASPBERRY_WIRING_PIN18 = 30, // RPi B V2
193  MRAA_RASPBERRY_WIRING_PIN19 = 31, // RPI B V2
194  MRAA_RASPBERRY_WIRING_PIN22 = 31,
195  MRAA_RASPBERRY_WIRING_PIN20 = 32, // RPi B V2
196  MRAA_RASPBERRY_WIRING_PIN26 = 32,
197  MRAA_RASPBERRY_WIRING_PIN23 = 33,
198  MRAA_RASPBERRY_WIRING_PIN24 = 35,
199  MRAA_RASPBERRY_WIRING_PIN27 = 36,
200  MRAA_RASPBERRY_WIRING_PIN25 = 37,
201  MRAA_RASPBERRY_WIRING_PIN28 = 38,
202  MRAA_RASPBERRY_WIRING_PIN29 = 40
204 
208 typedef enum {
226 } mraa_result_t;
227 
231 typedef enum {
241 
245 typedef enum {
250 
254 typedef enum {
255  MRAA_UART_PARITY_NONE = 0,
256  MRAA_UART_PARITY_EVEN = 1,
257  MRAA_UART_PARITY_ODD = 2,
258  MRAA_UART_PARITY_MARK = 3,
259  MRAA_UART_PARITY_SPACE = 4
261 
262 #ifdef __cplusplus
263 }
264 #endif
Definition: types.h:217
Definition: types.h:52
Definition: types.h:218
mraa_i2c_mode_t
Definition: types.h:245
Definition: types.h:50
Definition: types.h:222
mraa_intel_edison_miniboard_t
Definition: types.h:80
Definition: types.h:221
Definition: types.h:42
mraa_uart_parity_t
Definition: types.h:254
Definition: types.h:210
Definition: types.h:51
Definition: types.h:40
mraa_platform_t
Definition: types.h:39
Definition: types.h:232
Definition: types.h:44
Definition: types.h:43
Definition: types.h:209
Definition: types.h:216
Definition: types.h:45
Definition: types.h:64
Definition: types.h:225
Definition: types.h:47
Definition: types.h:67
mraa_intel_edison_t
Definition: types.h:126
Definition: types.h:48
Definition: types.h:237
Definition: types.h:215
Definition: types.h:57
Definition: types.h:233
Definition: types.h:236
Definition: types.h:219
Definition: types.h:68
Definition: types.h:73
Definition: types.h:223
Definition: types.h:74
mraa_raspberry_wiring_t
Definition: types.h:172
Definition: types.h:246
Definition: types.h:49
Definition: types.h:58
Definition: types.h:238
Definition: types.h:212
Definition: types.h:60
Definition: types.h:213
Definition: types.h:71
Definition: types.h:239
mraa_result_t
Definition: types.h:208
Definition: types.h:70
mraa_pinmodes_t
Definition: types.h:231
Definition: types.h:61
Definition: types.h:214
Definition: types.h:59
Definition: types.h:235
Definition: types.h:53
Definition: types.h:46
Definition: types.h:234
Definition: types.h:41
Definition: types.h:248
Definition: types.h:72
Definition: types.h:247
Definition: types.h:211