building.md: update cmake instructions
[contrib/mraa.git] / docs / index.md
1 libmraa - Low Level Skeleton Library for Communication on Intel platforms
2 ==============
3
4 Library in C/C++ to interface with Galileo & other Intel platforms, in a
5 structured and sane API with port names/numbering that match boards & with
6 bindings to javascript & python.
7
8 The intent is to make it easier for developers and sensor manufacturers to map
9 their sensors & actuators on top of supported hardware and to allow control of
10 low level communication protocol by high level languages & constructs.
11
12 ## API
13
14 These interfaces allow you to interact with all libmraa functionality. The C++
15 classes directly wrap the C API and provide a near 1:1 mapping of
16 functionality.
17
18 <center>
19 | C API Modules          | C++ API Classes              |
20 |:----------------------:|:----------------------------:|
21 | @ref gpio.h "gpio"     | @ref mraa::Gpio "Gpio class" |
22 | @ref i2c.h "i2c"       | @ref mraa::I2c "I2c class"   |
23 | @ref aio.h "aio"       | @ref mraa::Aio "Aio class"   |
24 | @ref pwm.h "pwm"       | @ref mraa::Pwm "Pwm class"   |
25 | @ref spi.h "spi"       | @ref mraa::Spi "Spi class"   |
26 | @ref uart.h "uart"     | @ref mraa::Uart "Uart class" |
27 | @ref common.h "common" | @ref mraa "common"           |
28 </center>
29
30 ### Hello Mraa
31 @snippet hellomraa.c Interesting
32
33 ## Supported platforms
34
35 Specific platform information for supported platforms is documented here:
36
37 - @ref galileorevd
38 - @ref galileorevh
39 - @ref edison
40 - @ref de3815
41
42 ### ENV RECOMENDATIONS
43
44 All of these are 'optional', however they are recommended. Only a C compiler,
45 cmake, libm and pthreads are technically required to compile.
46
47 - Swig 3.0.1+ built with node.js (0.10.x) & python support
48 - doxygen
49 - sphinx (requires doxygen)
50 - pygments
51
52 ## COMPILING
53
54 More information on compiling is @ref building page.
55
56 ## CONTRIBUTING
57
58 Please see the @ref contributing page, the @ref internals page may also be of
59 use.
60
61 ## API Changelog
62
63 This changelog is meant as a quick & rough guide to what has changed between
64 versions. The API is now fairly stable but when new calls/features are added
65 they are listed here. Anything pre 0.2.x is ignored.
66
67 **0.5.2**
68   * pwm improvement & bugfix
69   * spi mraa_spi_bit_per_word fix
70   * new spi transfer function
71   * i2c object api uses uint8_t
72   * i2c readReg() calls added
73   * edison i2c bus now defaults to a sensible value
74   * edison uart enable support
75   * edison hardware CS exposed as IO10
76   * DE3815tykhe NUC support
77
78 **0.5.1**
79   * Intel Edison - Mini breakout board support
80   * Change to use syslog throughout instead of printing to stderr.
81   * Fix misc issues brought up throuh coverity scans
82   * Clear up Analog call documentation
83
84 **0.5.0**
85   * Intel Edison - Arduino board support.
86   * Boost Allowable i2c busses to 12
87   * Additional platform hooks added
88   * ADC is now 10bits by default on all platforms but can be changed
89
90 **0.4.5**
91   * if only one spidev we default to it reguardless of number
92   * mraa_pwm_config_ms & mraa_pwm_config_percent functions added
93   * Uart C++ class added, adds python & node support
94   * galileo gen2 gpio modes supported
95
96 **0.4.4**
97   * prefix SPI mode with MRAA_SPI_
98   * added C++ adc bitness calls
99
100 **0.4.3**
101   * SPI Mode function now functional, API Change in SPI
102   * I2C read in swig worked on.
103   * Galileo Gen 2: PWM setting period sets all channel's period
104   * Galileo Gen 2: I2C setup now specific to Gen 2.
105   * General commits around freeing memory at the right times.
106
107 **0.4.2**
108   * Barebone UART module added.
109   * Hook branch merged.
110   * I2C init hooks added.
111   * Intel Galileo Gen 2, I2C gpio pins now go hiz input when I2C initialised.
112
113 **0.4.1**
114   * Rename python & nodejs modules to mraa
115   * common.hpp introduced for C++
116   * python & nodejs modules can now take binary strings for Spi & I2c
117   * improved Aio module and clear bitness
118   * Improved Galileo Gen 2 support
119
120 **0.4.0**
121   * Rename to mraa
122   * get_platform_type function added.
123
124 **0.3.1**
125   * Initial Intel Galileo Gen 2 support
126   * mraa_gpio_isr parameters added.
127   * Detection of different supported platforms added.
128
129 **0.3.0**
130   * mraa_i2c_read now returns length of read
131
132 **0.2.9**
133   * Add global mraa.h & mraa.hpp headers
134   * usage of "gpio.h" is not legal you need to use "mraa/gpio.h" unless adding
135     -L/usr/include/mraa
136
137 **0.2.8**
138   * Added mraa_set_priority call
139   * Added mmap gpio call mraa_gpio_use_mmaped
140
141 **0.2.7**
142   * C++ API now uses basic types and not unistd types as C
143   * Clearer and consistent use of unistd tpyes in C api
144
145 **0.2.6**
146   * C++ examples added, using c++ headers/api.
147   * moved to open instead of fopen in all modules
148   * rename mraa_check functions and made them internal to mraa only.
149   * removed "export" functions from api
150   * Intel Galileo Gen 1 (rev d) fixes, incorrect definition of some items
151   * SPI, implementation completed.
152   * I2C internal function, completed.
153   * PWM fix bug in period set method.
154   * Swig upstream can be used for building.
155   * No longer builds docs on default cmake, needs flag
156   * GPIO/PWM ownership guard prevents closing on existing pins, still can be forced.
157
158 **0.2.5**
159   * C++/Python/Node Enums/const names now do not contain MRAA_GPIO
160   * Enum type declaration for C++ changed
161   * Python/Node get_version() -> GetVersion()
162   * i2c read calls don't use const char* and i2c write calls do
163
164 **0.2.4**
165   * All mraa_ contexts now are pointers to the actual struct which is not
166     delcared in the header. The only end user change is that instead of
167     returning a type mraa_gpio_context pointer mraa_gpio_init() now returns a
168     mraa_gpio_context (which is actually a pointer to struct _gpio internally).
169   * C++ API is available, use the .hpp headers and add stdc++  to the linker
170     flags.
171   * Initial SPI implementation is provided
172
173 **0.2.3**
174   * mraa_aio_read_u16() -> mraa_aio_read()
175   * mraa_aio_read() now returns a uint16_t instead of an unsigned int
176
177 **0.2.2**
178   * First version with API considered 'stable'