mraa  2.0.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,
64  // USB platform extenders start at 256
67  // contains bit 9 so is subplatform
68  MRAA_GROVEPI = 1024,
77 
81 typedef enum {
82  MRAA_INTEL_EDISON_MINIBOARD_J17_1 = 0,
83  MRAA_INTEL_EDISON_MINIBOARD_J17_5 = 4,
84  MRAA_INTEL_EDISON_MINIBOARD_J17_7 = 6,
85  MRAA_INTEL_EDISON_MINIBOARD_J17_8 = 7,
86  MRAA_INTEL_EDISON_MINIBOARD_J17_9 = 8,
87  MRAA_INTEL_EDISON_MINIBOARD_J17_10 = 9,
88  MRAA_INTEL_EDISON_MINIBOARD_J17_11 = 10,
89  MRAA_INTEL_EDISON_MINIBOARD_J17_12 = 11,
90  MRAA_INTEL_EDISON_MINIBOARD_J17_14 = 13,
91  MRAA_INTEL_EDISON_MINIBOARD_J18_1 = 14,
92  MRAA_INTEL_EDISON_MINIBOARD_J18_2 = 15,
93  MRAA_INTEL_EDISON_MINIBOARD_J18_6 = 19,
94  MRAA_INTEL_EDISON_MINIBOARD_J18_7 = 20,
95  MRAA_INTEL_EDISON_MINIBOARD_J18_8 = 21,
96  MRAA_INTEL_EDISON_MINIBOARD_J18_10 = 23,
97  MRAA_INTEL_EDISON_MINIBOARD_J18_11 = 24,
98  MRAA_INTEL_EDISON_MINIBOARD_J18_12 = 25,
99  MRAA_INTEL_EDISON_MINIBOARD_J18_13 = 26,
100  MRAA_INTEL_EDISON_MINIBOARD_J19_4 = 31,
101  MRAA_INTEL_EDISON_MINIBOARD_J19_5 = 32,
102  MRAA_INTEL_EDISON_MINIBOARD_J19_6 = 33,
103  MRAA_INTEL_EDISON_MINIBOARD_J19_8 = 35,
104  MRAA_INTEL_EDISON_MINIBOARD_J19_9 = 36,
105  MRAA_INTEL_EDISON_MINIBOARD_J19_10 = 37,
106  MRAA_INTEL_EDISON_MINIBOARD_J19_11 = 38,
107  MRAA_INTEL_EDISON_MINIBOARD_J19_12 = 39,
108  MRAA_INTEL_EDISON_MINIBOARD_J19_13 = 40,
109  MRAA_INTEL_EDISON_MINIBOARD_J19_14 = 41,
110  MRAA_INTEL_EDISON_MINIBOARD_J20_3 = 44,
111  MRAA_INTEL_EDISON_MINIBOARD_J20_4 = 45,
112  MRAA_INTEL_EDISON_MINIBOARD_J20_5 = 46,
113  MRAA_INTEL_EDISON_MINIBOARD_J20_6 = 47,
114  MRAA_INTEL_EDISON_MINIBOARD_J20_7 = 48,
115  MRAA_INTEL_EDISON_MINIBOARD_J20_8 = 49,
116  MRAA_INTEL_EDISON_MINIBOARD_J20_9 = 50,
117  MRAA_INTEL_EDISON_MINIBOARD_J20_10 = 51,
118  MRAA_INTEL_EDISON_MINIBOARD_J20_11 = 52,
119  MRAA_INTEL_EDISON_MINIBOARD_J20_12 = 53,
120  MRAA_INTEL_EDISON_MINIBOARD_J20_13 = 54,
121  MRAA_INTEL_EDISON_MINIBOARD_J20_14 = 55
123 
127 typedef enum {
128  MRAA_INTEL_EDISON_GP182 = 0,
129  MRAA_INTEL_EDISON_GP135 = 4,
130  MRAA_INTEL_EDISON_GP27 = 6,
131  MRAA_INTEL_EDISON_GP20 = 7,
132  MRAA_INTEL_EDISON_GP28 = 8,
133  MRAA_INTEL_EDISON_GP111 = 0,
134  MRAA_INTEL_EDISON_GP109 = 10,
135  MRAA_INTEL_EDISON_GP115 = 11,
136  MRAA_INTEL_EDISON_GP128 = 13,
137  MRAA_INTEL_EDISON_GP13 = 14,
138  MRAA_INTEL_EDISON_GP165 = 15,
139  MRAA_INTEL_EDISON_GP19 = 19,
140  MRAA_INTEL_EDISON_GP12 = 20,
141  MRAA_INTEL_EDISON_GP183 = 21,
142  MRAA_INTEL_EDISON_GP110 = 23,
143  MRAA_INTEL_EDISON_GP114 = 24,
144  MRAA_INTEL_EDISON_GP129 = 25,
145  MRAA_INTEL_EDISON_GP130 = 26,
146  MRAA_INTEL_EDISON_GP44 = 31,
147  MRAA_INTEL_EDISON_GP46 = 32,
148  MRAA_INTEL_EDISON_GP48 = 33,
149  MRAA_INTEL_EDISON_GP131 = 35,
150  MRAA_INTEL_EDISON_GP14 = 36,
151  MRAA_INTEL_EDISON_GP40 = 37,
152  MRAA_INTEL_EDISON_GP43 = 38,
153  MRAA_INTEL_EDISON_GP77 = 39,
154  MRAA_INTEL_EDISON_GP82 = 40,
155  MRAA_INTEL_EDISON_GP83 = 41,
156  MRAA_INTEL_EDISON_GP134 = 44,
157  MRAA_INTEL_EDISON_GP45 = 45,
158  MRAA_INTEL_EDISON_GP47 = 46,
159  MRAA_INTEL_EDISON_GP49 = 47,
160  MRAA_INTEL_EDISON_GP15 = 48,
161  MRAA_INTEL_EDISON_GP84 = 49,
162  MRAA_INTEL_EDISON_GP42 = 50,
163  MRAA_INTEL_EDISON_GP41 = 51,
164  MRAA_INTEL_EDISON_GP78 = 52,
165  MRAA_INTEL_EDISON_GP79 = 53,
166  MRAA_INTEL_EDISON_GP80 = 54,
167  MRAA_INTEL_EDISON_GP81 = 55
169 
173 typedef enum {
174  MRAA_RASPBERRY_WIRING_PIN8 = 3,
175  MRAA_RASPBERRY_WIRING_PIN9 = 5,
176  MRAA_RASPBERRY_WIRING_PIN7 = 7,
177  MRAA_RASPBERRY_WIRING_PIN15 = 8,
178  MRAA_RASPBERRY_WIRING_PIN16 = 10,
179  MRAA_RASPBERRY_WIRING_PIN0 = 11,
180  MRAA_RASPBERRY_WIRING_PIN1 = 12,
181  MRAA_RASPBERRY_WIRING_PIN2 = 13,
182  MRAA_RASPBERRY_WIRING_PIN3 = 15,
183  MRAA_RASPBERRY_WIRING_PIN4 = 16,
184  MRAA_RASPBERRY_WIRING_PIN5 = 18,
185  MRAA_RASPBERRY_WIRING_PIN12 = 19,
186  MRAA_RASPBERRY_WIRING_PIN13 = 21,
187  MRAA_RASPBERRY_WIRING_PIN6 = 22,
188  MRAA_RASPBERRY_WIRING_PIN14 = 23,
189  MRAA_RASPBERRY_WIRING_PIN10 = 24,
190  MRAA_RASPBERRY_WIRING_PIN11 = 26,
191  MRAA_RASPBERRY_WIRING_PIN17 = 29, // RPi B V2
192  MRAA_RASPBERRY_WIRING_PIN21 = 29,
193  MRAA_RASPBERRY_WIRING_PIN18 = 30, // RPi B V2
194  MRAA_RASPBERRY_WIRING_PIN19 = 31, // RPI B V2
195  MRAA_RASPBERRY_WIRING_PIN22 = 31,
196  MRAA_RASPBERRY_WIRING_PIN20 = 32, // RPi B V2
197  MRAA_RASPBERRY_WIRING_PIN26 = 32,
198  MRAA_RASPBERRY_WIRING_PIN23 = 33,
199  MRAA_RASPBERRY_WIRING_PIN24 = 35,
200  MRAA_RASPBERRY_WIRING_PIN27 = 36,
201  MRAA_RASPBERRY_WIRING_PIN25 = 37,
202  MRAA_RASPBERRY_WIRING_PIN28 = 38,
203  MRAA_RASPBERRY_WIRING_PIN29 = 40
205 
209 typedef enum {
227 } mraa_result_t;
228 
232 typedef enum {
242 
246 typedef enum {
251 
255 typedef enum {
256  MRAA_UART_PARITY_NONE = 0,
257  MRAA_UART_PARITY_EVEN = 1,
258  MRAA_UART_PARITY_ODD = 2,
259  MRAA_UART_PARITY_MARK = 3,
260  MRAA_UART_PARITY_SPACE = 4
262 
263 #ifdef __cplusplus
264 }
265 #endif
Definition: types.h:218
Definition: types.h:52
Definition: types.h:219
mraa_i2c_mode_t
Definition: types.h:246
Definition: types.h:50
Definition: types.h:223
mraa_intel_edison_miniboard_t
Definition: types.h:81
Definition: types.h:222
Definition: types.h:42
mraa_uart_parity_t
Definition: types.h:255
Definition: types.h:211
Definition: types.h:51
Definition: types.h:40
mraa_platform_t
Definition: types.h:39
Definition: types.h:233
Definition: types.h:44
Definition: types.h:43
Definition: types.h:210
Definition: types.h:217
Definition: types.h:45
Definition: types.h:65
Definition: types.h:226
Definition: types.h:47
Definition: types.h:68
mraa_intel_edison_t
Definition: types.h:127
Definition: types.h:48
Definition: types.h:238
Definition: types.h:216
Definition: types.h:57
Definition: types.h:234
Definition: types.h:237
Definition: types.h:220
Definition: types.h:69
Definition: types.h:74
Definition: types.h:224
Definition: types.h:75
mraa_raspberry_wiring_t
Definition: types.h:173
Definition: types.h:247
Definition: types.h:49
Definition: types.h:58
Definition: types.h:239
Definition: types.h:213
Definition: types.h:60
Definition: types.h:214
Definition: types.h:72
Definition: types.h:240
mraa_result_t
Definition: types.h:209
Definition: types.h:71
mraa_pinmodes_t
Definition: types.h:232
Definition: types.h:61
Definition: types.h:215
Definition: types.h:59
Definition: types.h:236
Definition: types.h:53
Definition: types.h:62
Definition: types.h:46
Definition: types.h:235
Definition: types.h:41
Definition: types.h:249
Definition: types.h:73
Definition: types.h:248
Definition: types.h:212