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