mraa  2.0.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
initio.h
Go to the documentation of this file.
1 /*
2  * Author: Noel Eck <noel.eck@intel.com>
3  * Copyright (c) 2014-2016 Intel Corporation.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining
6  * a copy of this software and associated documentation files (the
7  * "Software"), to deal in the Software without restriction, including
8  * without limitation the rights to use, copy, modify, merge, publish,
9  * distribute, sublicense, and/or sell copies of the Software, and to
10  * permit persons to whom the Software is furnished to do so, subject to
11  * the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
25 #pragma once
26 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include <stdint.h>
39 
40 #include "aio.h"
41 #include "gpio.h"
42 #include "i2c.h"
43 
44 #if !defined(PERIPHERALMAN)
45 #include "iio.h"
46 #endif
47 
48 #include "pwm.h"
49 #include "spi.h"
50 #include "uart.h"
51 #include "uart_ow.h"
52 
53 typedef struct _mraa_io_descriptor {
54  int n_aio;
55  mraa_aio_context* aios;
56  int n_gpio;
57  mraa_gpio_context* gpios;
58  int n_i2c;
59  mraa_i2c_context* i2cs;
60 #if !defined(PERIPHERALMAN)
61  int n_iio;
62  mraa_iio_context* iios;
63 #endif
64  int n_pwm;
65  mraa_pwm_context* pwms;
66  int n_spi;
67  mraa_spi_context* spis;
68  int n_uart;
69  mraa_uart_context* uarts;
70  int n_uart_ow;
71  mraa_uart_ow_context* uart_ows;
72 
73  char* leftover_str;
75 
143 mraa_result_t mraa_io_init(const char* strdesc, mraa_io_descriptor** desc);
144 
152 
153 #ifdef __cplusplus
154 }
155 #endif
UART module.
Pulse Width Modulation module.
mraa_result_t mraa_io_close(mraa_io_descriptor *desc)
General Purpose IO.
struct _uart * mraa_uart_context
Definition: uart.h:49
struct _spi * mraa_spi_context
Definition: spi.h:67
Serial Peripheral Interface.
struct _aio * mraa_aio_context
Definition: aio.h:51
Definition: uart_ow.h:71
struct _i2c * mraa_i2c_context
Definition: i2c.h:53
mraa_result_t mraa_io_init(const char *strdesc, mraa_io_descriptor **desc)
iio
struct _gpio * mraa_gpio_context
Definition: gpio.h:55
struct _iio * mraa_iio_context
Definition: iio.h:87
mraa_result_t
Definition: types.h:209
Analog input/output.
UART OW module.
Definition: initio.h:53
struct _pwm * mraa_pwm_context
Definition: pwm.h:49
Inter-Integrated Circuit.