c5cf4d0cdc8ded9138170160290a612725a40a85
[contrib/mraa.git] / docs / index.md
1 libmraa - Low Level Skeleton Library for Communication on GNU/Linux platforms
2 ==============
3
4 Libmraa is a C/C++ library with bindings to Python, Javascript and Java to
5 interface with the I/O on Galileo, Edison & other platforms, with a structured
6 and sane API where port names/numbering matches the board that you are on. Use
7 of 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
9 platforms.
10
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.
14
15 ## API
16
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
19 functionality.
20
21 <center>
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"           |
31 </center>
32
33 ### Hello Mraa
34 @snippet hellomraa.c Interesting
35
36 ## Supported platforms
37
38 Specific platform information for supported platforms is documented here:
39
40 - @ref galileorevd
41 - @ref galileorevh
42 - @ref edison
43 - @ref de3815
44 - @ref minnowmax
45 - @ref rasppi
46 - @ref bananapi
47 - @ref beaglebone
48 - @ref nuc5
49 - @ref ft4222
50
51 ## DEBUGGING
52
53 Sometimes it just doesn't want to work, let us try and help you, you can file
54 issues in github or join us in #mraa on freenode IRC, hang around for a little
55 while because we're not necessarily on 24/7, but we'll get back to you! Have a
56 glance at our @debugging page too
57
58 ## COMPILING
59
60 More information on compiling is @ref building page.
61
62 ## CONTRIBUTING
63
64 Please see the @ref contributing page, the @ref internals page may also be of
65 use.
66
67 ## API Changelog
68
69 This changelog is meant as a quick & rough guide to what has changed between
70 versions. The API is now fairly stable but when new calls/features are added
71 they are listed here. Anything pre 0.2.x is ignored.
72
73 **0.8.0**
74   * Better java support
75   * Support for FT4222 subplatforms
76   * New types.hpp improves C++ & SWIG APIs
77   * Added support for minnowboard max compatible boards
78
79 **0.7.5**
80   * 5th Generation NUC i2c support
81   * NPM 0.10.x ia32 fix
82
83 **0.7.4**
84   * Minnowboard i2c fix
85   * Add NPM arm support
86   * Uart initialisation improved
87   * Better i2c bus detection on DE3815 & mmax
88
89 **0.7.3**
90   * DE3815 i2c fix when using different kernels
91   * Fixed various memory leaks in SWIG wrappers
92   * gpio enums all prefixed with mraa_
93   * Fix SPI CS pin caps causing mux_total to be > 0
94   * Improved error checking/handling
95
96 **0.7.2**
97   * Fix node.js npm builds with binding.gyp that didn't use --target-arch
98
99 **0.7.1**
100   * Uart now uses binary arrays and has optional 'Str' functions in C++/SWIG
101   * Various Uart module bugfixes
102   * Node.js 0.12.4 support
103   * Node.js documentation support
104
105 **0.7.0**
106   * Uart module now contains read/write interactions and configuration
107   * Python API contains more buffer checks
108   * Java support
109   * RPM cpack support
110
111 **0.6.2**
112   * Node.js 0.12 support
113   * NPM support
114   * Formatting done with clang-format
115   * Various examples and documentation updates
116   * Supported added for Beaglebone Black + Banana Pi
117
118 **0.6.1**
119   * 16bit spi iunctions added
120   * Node.js ISR now supported
121
122 **0.6.0**
123   * add device path queries for uart
124   * add platform configuration querying
125   * gpio sample added
126   * improve i2c/spi write/read API for python & nodejs
127   * performance improvements on edison & galileo
128
129 **0.5.4**
130   * pwm read_* fix introduced in 0.5.3
131   * improved npmpkg support
132
133 **0.5.3**
134   * OE toolchain support added to CMake
135   * Various UART fixes
136   * SPI add CS exposure
137   * Remove functions from mraa.c into modules
138   * Rework of support for mmap
139   * Intel Edison MMAP support added. Read and Write
140   * I2C clean up, add cleaner functions
141   * MinnowBoard Max support added
142   * PWM period is written before duty
143   * Node GYP build supported added
144   * Add Get Platform Name function
145
146 **0.5.2**
147   * pwm improvement & bugfix
148   * spi mraa_spi_bit_per_word fix
149   * new spi transfer function
150   * i2c object api uses uint8_t
151   * i2c readReg() calls added
152   * edison i2c bus now defaults to a sensible value
153   * edison uart enable support
154   * edison hardware CS exposed as IO10
155   * DE3815tykhe NUC support
156
157 **0.5.1**
158   * Intel Edison - Mini breakout board support
159   * Change to use syslog throughout instead of printing to stderr.
160   * Fix misc issues brought up throuh coverity scans
161   * Clear up Analog call documentation
162
163 **0.5.0**
164   * Intel Edison - Arduino board support.
165   * Boost Allowable i2c busses to 12
166   * Additional platform hooks added
167   * ADC is now 10bits by default on all platforms but can be changed
168
169 **0.4.5**
170   * if only one spidev we default to it reguardless of number
171   * mraa_pwm_config_ms & mraa_pwm_config_percent functions added
172   * Uart C++ class added, adds python & node support
173   * galileo gen2 gpio modes supported
174
175 **0.4.4**
176   * prefix SPI mode with MRAA_SPI_
177   * added C++ adc bitness calls
178
179 **0.4.3**
180   * SPI Mode function now functional, API Change in SPI
181   * I2C read in swig worked on.
182   * Galileo Gen 2: PWM setting period sets all channel's period
183   * Galileo Gen 2: I2C setup now specific to Gen 2.
184   * General commits around freeing memory at the right times.
185
186 **0.4.2**
187   * Barebone UART module added.
188   * Hook branch merged.
189   * I2C init hooks added.
190   * Intel Galileo Gen 2, I2C gpio pins now go hiz input when I2C initialised.
191
192 **0.4.1**
193   * Rename python & nodejs modules to mraa
194   * common.hpp introduced for C++
195   * python & nodejs modules can now take binary strings for Spi & I2c
196   * improved Aio module and clear bitness
197   * Improved Galileo Gen 2 support
198
199 **0.4.0**
200   * Rename to mraa
201   * get_platform_type function added.
202
203 **0.3.1**
204   * Initial Intel Galileo Gen 2 support
205   * mraa_gpio_isr parameters added.
206   * Detection of different supported platforms added.
207
208 **0.3.0**
209   * mraa_i2c_read now returns length of read
210
211 **0.2.9**
212   * Add global mraa.h & mraa.hpp headers
213   * usage of "gpio.h" is not legal you need to use "mraa/gpio.h" unless adding
214     -L/usr/include/mraa
215
216 **0.2.8**
217   * Added mraa_set_priority call
218   * Added mmap gpio call mraa_gpio_use_mmaped
219
220 **0.2.7**
221   * C++ API now uses basic types and not unistd types as C
222   * Clearer and consistent use of unistd tpyes in C api
223
224 **0.2.6**
225   * C++ examples added, using c++ headers/api.
226   * moved to open instead of fopen in all modules
227   * rename mraa_check functions and made them internal to mraa only.
228   * removed "export" functions from api
229   * Intel Galileo Gen 1 (rev d) fixes, incorrect definition of some items
230   * SPI, implementation completed.
231   * I2C internal function, completed.
232   * PWM fix bug in period set method.
233   * Swig upstream can be used for building.
234   * No longer builds docs on default cmake, needs flag
235   * GPIO/PWM ownership guard prevents closing on existing pins, still can be forced.
236
237 **0.2.5**
238   * C++/Python/Node Enums/const names now do not contain MRAA_GPIO
239   * Enum type declaration for C++ changed
240   * Python/Node get_version() -> GetVersion()
241   * i2c read calls don't use const char* and i2c write calls do
242
243 **0.2.4**
244   * All mraa_ contexts now are pointers to the actual struct which is not
245     delcared in the header. The only end user change is that instead of
246     returning a type mraa_gpio_context pointer mraa_gpio_init() now returns a
247     mraa_gpio_context (which is actually a pointer to struct _gpio internally).
248   * C++ API is available, use the .hpp headers and add stdc++  to the linker
249     flags.
250   * Initial SPI implementation is provided
251
252 **0.2.3**
253   * mraa_aio_read_u16() -> mraa_aio_read()
254   * mraa_aio_read() now returns a uint16_t instead of an unsigned int
255
256 **0.2.2**
257   * First version with API considered 'stable'