1 libmraa - Low Level Skeleton Library for Communication on Intel platforms
4 Libmraa is a C/C++ library with bindings to javascript & python to interface
5 with the IO on Galileo, Edison & other platforms, with a structured and sane
6 API where port names/numbering matches the board that you are on. Use of
7 libmraa does not tie you to specific hardware with board detection done at
8 runtime you can create portable code that will work across the supported
11 The intent is to make it easier for developers and sensor manufacturers to map
12 their sensors & actuators on top of supported hardware and to allow control of
13 low level communication protocol by high level languages & constructs.
17 These interfaces allow you to interact with all libmraa functionality. The C++
18 classes directly wrap the C API and provide a near 1:1 mapping of
22 | C API Modules | C++ API Classes |
23 |:----------------------:|:----------------------------:|
24 | @ref gpio.h "gpio" | @ref mraa::Gpio "Gpio class" |
25 | @ref i2c.h "i2c" | @ref mraa::I2c "I2c class" |
26 | @ref aio.h "aio" | @ref mraa::Aio "Aio class" |
27 | @ref pwm.h "pwm" | @ref mraa::Pwm "Pwm class" |
28 | @ref spi.h "spi" | @ref mraa::Spi "Spi class" |
29 | @ref uart.h "uart" | @ref mraa::Uart "Uart class" |
30 | @ref common.h "common" | @ref mraa "common" |
34 @snippet hellomraa.c Interesting
36 ## Supported platforms
38 Specific platform information for supported platforms is documented here:
46 ### ENV RECOMENDATIONS
48 All of these are 'optional', however they are recommended. Only a C compiler,
49 cmake, libm and pthreads are technically required to compile.
51 - Swig 3.0.1+ built with node.js (0.10.x) & python support
53 - sphinx (requires doxygen)
58 More information on compiling is @ref building page.
62 Please see the @ref contributing page, the @ref internals page may also be of
67 This changelog is meant as a quick & rough guide to what has changed between
68 versions. The API is now fairly stable but when new calls/features are added
69 they are listed here. Anything pre 0.2.x is ignored.
72 * OE toolchain support added to CMake
75 * Remove functions from mraa.c into modules
76 * Rework of support for mmap
77 * Intel Edison MMAP support added. Read and Write
78 * I2C clean up, add cleaner functions
79 * MinnowBoard Max support added
80 * PWM period is written before duty
81 * Node GYP build supported added
82 * Add Get Platform Name function
85 * pwm improvement & bugfix
86 * spi mraa_spi_bit_per_word fix
87 * new spi transfer function
88 * i2c object api uses uint8_t
89 * i2c readReg() calls added
90 * edison i2c bus now defaults to a sensible value
91 * edison uart enable support
92 * edison hardware CS exposed as IO10
93 * DE3815tykhe NUC support
96 * Intel Edison - Mini breakout board support
97 * Change to use syslog throughout instead of printing to stderr.
98 * Fix misc issues brought up throuh coverity scans
99 * Clear up Analog call documentation
102 * Intel Edison - Arduino board support.
103 * Boost Allowable i2c busses to 12
104 * Additional platform hooks added
105 * ADC is now 10bits by default on all platforms but can be changed
108 * if only one spidev we default to it reguardless of number
109 * mraa_pwm_config_ms & mraa_pwm_config_percent functions added
110 * Uart C++ class added, adds python & node support
111 * galileo gen2 gpio modes supported
114 * prefix SPI mode with MRAA_SPI_
115 * added C++ adc bitness calls
118 * SPI Mode function now functional, API Change in SPI
119 * I2C read in swig worked on.
120 * Galileo Gen 2: PWM setting period sets all channel's period
121 * Galileo Gen 2: I2C setup now specific to Gen 2.
122 * General commits around freeing memory at the right times.
125 * Barebone UART module added.
126 * Hook branch merged.
127 * I2C init hooks added.
128 * Intel Galileo Gen 2, I2C gpio pins now go hiz input when I2C initialised.
131 * Rename python & nodejs modules to mraa
132 * common.hpp introduced for C++
133 * python & nodejs modules can now take binary strings for Spi & I2c
134 * improved Aio module and clear bitness
135 * Improved Galileo Gen 2 support
139 * get_platform_type function added.
142 * Initial Intel Galileo Gen 2 support
143 * mraa_gpio_isr parameters added.
144 * Detection of different supported platforms added.
147 * mraa_i2c_read now returns length of read
150 * Add global mraa.h & mraa.hpp headers
151 * usage of "gpio.h" is not legal you need to use "mraa/gpio.h" unless adding
155 * Added mraa_set_priority call
156 * Added mmap gpio call mraa_gpio_use_mmaped
159 * C++ API now uses basic types and not unistd types as C
160 * Clearer and consistent use of unistd tpyes in C api
163 * C++ examples added, using c++ headers/api.
164 * moved to open instead of fopen in all modules
165 * rename mraa_check functions and made them internal to mraa only.
166 * removed "export" functions from api
167 * Intel Galileo Gen 1 (rev d) fixes, incorrect definition of some items
168 * SPI, implementation completed.
169 * I2C internal function, completed.
170 * PWM fix bug in period set method.
171 * Swig upstream can be used for building.
172 * No longer builds docs on default cmake, needs flag
173 * GPIO/PWM ownership guard prevents closing on existing pins, still can be forced.
176 * C++/Python/Node Enums/const names now do not contain MRAA_GPIO
177 * Enum type declaration for C++ changed
178 * Python/Node get_version() -> GetVersion()
179 * i2c read calls don't use const char* and i2c write calls do
182 * All mraa_ contexts now are pointers to the actual struct which is not
183 delcared in the header. The only end user change is that instead of
184 returning a type mraa_gpio_context pointer mraa_gpio_init() now returns a
185 mraa_gpio_context (which is actually a pointer to struct _gpio internally).
186 * C++ API is available, use the .hpp headers and add stdc++ to the linker
188 * Initial SPI implementation is provided
191 * mraa_aio_read_u16() -> mraa_aio_read()
192 * mraa_aio_read() now returns a uint16_t instead of an unsigned int
195 * First version with API considered 'stable'