mraa  1.9.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
types.hpp
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 namespace mraa
33 {
34 
35 //These enums must match the enums in types.h
36 
40 typedef enum {
47  BEAGLEBONE = 6,
48  BANANA = 7,
49  INTEL_NUC5 = 8,
50  A96BOARDS = 9,
53  INTEL_UP = 12,
56  DE_NANO_SOC = 15,
57  INTEL_UP2 = 16,
58  MTK_LINKIT = 17,
59  MTK_OMEGA2 = 18,
60  IEI_TANK = 19,
62  FTDI_FT4222 = 256,
64  GROVEPI = 1024,
65  GENERIC_FIRMATA = 1280,
69  NULL_PLATFORM = 98,
71 } Platform;
72 
76 typedef enum {
77  INTEL_EDISON_MINIBOARD_J17_1 = 0,
78  INTEL_EDISON_MINIBOARD_J17_5 = 4,
79  INTEL_EDISON_MINIBOARD_J17_7 = 6,
80  INTEL_EDISON_MINIBOARD_J17_8 = 7,
81  INTEL_EDISON_MINIBOARD_J17_9 = 8,
82  INTEL_EDISON_MINIBOARD_J17_10 = 9,
83  INTEL_EDISON_MINIBOARD_J17_11 = 10,
84  INTEL_EDISON_MINIBOARD_J17_12 = 11,
85  INTEL_EDISON_MINIBOARD_J17_14 = 13,
86  INTEL_EDISON_MINIBOARD_J18_1 = 14,
87  INTEL_EDISON_MINIBOARD_J18_2 = 15,
88  INTEL_EDISON_MINIBOARD_J18_6 = 19,
89  INTEL_EDISON_MINIBOARD_J18_7 = 20,
90  INTEL_EDISON_MINIBOARD_J18_8 = 21,
91  INTEL_EDISON_MINIBOARD_J18_10 = 23,
92  INTEL_EDISON_MINIBOARD_J18_11 = 24,
93  INTEL_EDISON_MINIBOARD_J18_12 = 25,
94  INTEL_EDISON_MINIBOARD_J18_13 = 26,
95  INTEL_EDISON_MINIBOARD_J19_4 = 31,
96  INTEL_EDISON_MINIBOARD_J19_5 = 32,
97  INTEL_EDISON_MINIBOARD_J19_6 = 33,
98  INTEL_EDISON_MINIBOARD_J19_8 = 35,
99  INTEL_EDISON_MINIBOARD_J19_9 = 36,
100  INTEL_EDISON_MINIBOARD_J19_10 = 37,
101  INTEL_EDISON_MINIBOARD_J19_11 = 38,
102  INTEL_EDISON_MINIBOARD_J19_12 = 39,
103  INTEL_EDISON_MINIBOARD_J19_13 = 40,
104  INTEL_EDISON_MINIBOARD_J19_14 = 41,
105  INTEL_EDISON_MINIBOARD_J20_3 = 44,
106  INTEL_EDISON_MINIBOARD_J20_4 = 45,
107  INTEL_EDISON_MINIBOARD_J20_5 = 46,
108  INTEL_EDISON_MINIBOARD_J20_6 = 47,
109  INTEL_EDISON_MINIBOARD_J20_7 = 48,
110  INTEL_EDISON_MINIBOARD_J20_8 = 49,
111  INTEL_EDISON_MINIBOARD_J20_9 = 50,
112  INTEL_EDISON_MINIBOARD_J20_10 = 51,
113  INTEL_EDISON_MINIBOARD_J20_11 = 52,
114  INTEL_EDISON_MINIBOARD_J20_12 = 53,
115  INTEL_EDISON_MINIBOARD_J20_13 = 54,
116  INTEL_EDISON_MINIBOARD_J20_14 = 55
118 
122 typedef enum {
123  INTEL_EDISON_GP182 = 0,
124  INTEL_EDISON_GP135 = 4,
125  INTEL_EDISON_GP27 = 6,
126  INTEL_EDISON_GP20 = 7,
127  INTEL_EDISON_GP28 = 8,
128  INTEL_EDISON_GP111 = 0,
129  INTEL_EDISON_GP109 = 10,
130  INTEL_EDISON_GP115 = 11,
131  INTEL_EDISON_GP128 = 13,
132  INTEL_EDISON_GP13 = 14,
133  INTEL_EDISON_GP165 = 15,
134  INTEL_EDISON_GP19 = 19,
135  INTEL_EDISON_GP12 = 20,
136  INTEL_EDISON_GP183 = 21,
137  INTEL_EDISON_GP110 = 23,
138  INTEL_EDISON_GP114 = 24,
139  INTEL_EDISON_GP129 = 25,
140  INTEL_EDISON_GP130 = 26,
141  INTEL_EDISON_GP44 = 31,
142  INTEL_EDISON_GP46 = 32,
143  INTEL_EDISON_GP48 = 33,
144  INTEL_EDISON_GP131 = 35,
145  INTEL_EDISON_GP14 = 36,
146  INTEL_EDISON_GP40 = 37,
147  INTEL_EDISON_GP43 = 38,
148  INTEL_EDISON_GP77 = 39,
149  INTEL_EDISON_GP82 = 40,
150  INTEL_EDISON_GP83 = 41,
151  INTEL_EDISON_GP134 = 44,
152  INTEL_EDISON_GP45 = 45,
153  INTEL_EDISON_GP47 = 46,
154  INTEL_EDISON_GP49 = 47,
155  INTEL_EDISON_GP15 = 48,
156  INTEL_EDISON_GP84 = 49,
157  INTEL_EDISON_GP42 = 50,
158  INTEL_EDISON_GP41 = 51,
159  INTEL_EDISON_GP78 = 52,
160  INTEL_EDISON_GP79 = 53,
161  INTEL_EDISON_GP80 = 54,
162  INTEL_EDISON_GP81 = 55
163 } IntelEdison;
164 
168 typedef enum {
169  RASPBERRY_WIRING_PIN8 = 3,
170  RASPBERRY_WIRING_PIN9 = 5,
171  RASPBERRY_WIRING_PIN7 = 7,
172  RASPBERRY_WIRING_PIN15 = 8,
173  RASPBERRY_WIRING_PIN16 = 10,
174  RASPBERRY_WIRING_PIN0 = 11,
175  RASPBERRY_WIRING_PIN1 = 12,
176  RASPBERRY_WIRING_PIN2 = 13,
177  RASPBERRY_WIRING_PIN3 = 15,
178  RASPBERRY_WIRING_PIN4 = 16,
179  RASPBERRY_WIRING_PIN5 = 18,
180  RASPBERRY_WIRING_PIN12 = 19,
181  RASPBERRY_WIRING_PIN13 = 21,
182  RASPBERRY_WIRING_PIN6 = 22,
183  RASPBERRY_WIRING_PIN14 = 23,
184  RASPBERRY_WIRING_PIN10 = 24,
185  RASPBERRY_WIRING_PIN11 = 26,
186  RASPBERRY_WIRING_PIN17 = 29, // RPi B V2
187  RASPBERRY_WIRING_PIN21 = 29,
188  RASPBERRY_WIRING_PIN18 = 30, // RPi B V2
189  RASPBERRY_WIRING_PIN19 = 31, // RPI B V2
190  RASPBERRY_WIRING_PIN22 = 31,
191  RASPBERRY_WIRING_PIN20 = 32, // RPi B V2
192  RASPBERRY_WIRING_PIN26 = 32,
193  RASPBERRY_WIRING_PIN23 = 33,
194  RASPBERRY_WIRING_PIN24 = 35,
195  RASPBERRY_WIRING_PIN27 = 36,
196  RASPBERRY_WIRING_PIN25 = 37,
197  RASPBERRY_WIRING_PIN28 = 38,
198  RASPBERRY_WIRING_PIN29 = 40
200 
204 typedef enum {
205  SUCCESS = 0,
222 } Result;
223 
227 typedef enum {
228  PIN_VALID = 0,
229  PIN_GPIO = 1,
230  PIN_PWM = 2,
232  PIN_SPI = 4,
233  PIN_I2C = 5,
234  PIN_AIO = 6,
235  PIN_UART = 7
236 } Pinmodes;
237 
241 typedef enum {
242  I2C_STD = 0,
243  I2C_FAST = 1,
244  I2C_HIGH = 2
245 } I2cMode;
246 
250 typedef enum {
251  UART_PARITY_NONE = 0,
252  UART_PARITY_EVEN = 1,
253  UART_PARITY_ODD = 2,
254  UART_PARITY_MARK = 3,
255  UART_PARITY_SPACE = 4
256 } UartParity;
257 
258 }
Definition: types.hpp:54
Definition: types.hpp:229
Result
Definition: types.hpp:204
Definition: types.hpp:49
Definition: types.hpp:217
Definition: types.hpp:65
Definition: types.hpp:231
IntelEdison
Definition: types.hpp:122
Definition: types.hpp:67
IntelEdisonMiniboard
Definition: types.hpp:76
Definition: types.hpp:230
Definition: types.hpp:58
UartParity
Definition: types.hpp:250
Definition: types.hpp:44
Definition: types.hpp:41
Definition: types.hpp:55
Definition: types.hpp:43
Definition: types.hpp:218
Definition: types.hpp:233
Definition: types.hpp:60
Definition: types.hpp:228
I2cMode
Definition: types.hpp:241
Definition: types.hpp:45
Definition: types.hpp:212
Definition: types.hpp:243
Definition: types.hpp:57
Definition: types.hpp:242
Definition: types.hpp:42
Definition: types.hpp:59
Definition: types.hpp:206
Definition: types.hpp:56
Definition: types.hpp:209
Definition: types.hpp:232
Definition: types.hpp:46
Definition: types.hpp:50
Platform
Definition: types.hpp:40
Definition: types.hpp:53
Definition: types.hpp:221
RaspberryWiring
Definition: types.hpp:168
Definition: types.hpp:207
Definition: types.hpp:216
Definition: types.hpp:210
Definition: types.hpp:213
Definition: types.hpp:64
Definition: aio.hpp:31
Definition: types.hpp:62
Definition: types.hpp:47
Definition: types.hpp:52
Definition: types.hpp:234
Definition: types.hpp:235
Definition: types.hpp:70
Definition: types.hpp:208
Definition: types.hpp:211
Definition: types.hpp:214
Pinmodes
Definition: types.hpp:227
Definition: types.hpp:51
Definition: types.hpp:215
Definition: types.hpp:244
Definition: types.hpp:68
Definition: types.hpp:205
Definition: types.hpp:219
Definition: types.hpp:48