de3815: add initial doc
[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
41 ### ENV RECOMENDATIONS
42
43 All of these are 'optional', however they are recommended. Only a C compiler,
44 cmake, libm and pthreads are technically required to compile.
45
46 - Swig 3.0.1+ built with node.js & python support (0.10.x)
47 - doxygen
48 - sphinx (requires doxygen)
49 - pygments
50
51 ## COMPILING
52
53 More information on compiling is @ref building page.
54
55 ## CONTRIBUTING
56
57 Please see the @ref contributing page, the @ref internals page may also be of
58 use.
59
60 ## API Changelog
61
62 This changelog is meant as a quick & rough guide to what has changed between
63 versions. The API is now fairly stable but when new calls/features are added
64 they are listed here. Anything pre 0.2.x is ignored.
65
66 **0.5.1**
67   * Intel Edison - Mini breakout board support
68   * Change to use syslog throughout instead of printing to stderr.
69   * Fix misc issues brought up throuh coverity scans
70   * Clear up Analog call documentation
71
72 **0.5.0**
73   * Intel Edison - Arduino board support.
74   * Boost Allowable i2c busses to 12
75   * Additional platform hooks added
76   * ADC is now 10bits by default on all platforms but can be changed
77
78 **0.4.5**
79   * if only one spidev we default to it reguardless of number
80   * mraa_pwm_config_ms & mraa_pwm_config_percent functions added
81   * Uart C++ class added, adds python & node support
82   * galileo gen2 gpio modes supported
83
84 **0.4.4**
85   * prefix SPI mode with MRAA_SPI_
86   * added C++ adc bitness calls
87
88 **0.4.3**
89   * SPI Mode function now functional, API Change in SPI
90   * I2C read in swig worked on.
91   * Galileo Gen 2: PWM setting period sets all channel's period
92   * Galileo Gen 2: I2C setup now specific to Gen 2.
93   * General commits around freeing memory at the right times.
94
95 **0.4.2**
96   * Barebone UART module added.
97   * Hook branch merged.
98   * I2C init hooks added.
99   * Intel Galileo Gen 2, I2C gpio pins now go hiz input when I2C initialised.
100
101 **0.4.1**
102   * Rename python & nodejs modules to mraa
103   * common.hpp introduced for C++
104   * python & nodejs modules can now take binary strings for Spi & I2c
105   * improved Aio module and clear bitness
106   * Improved Galileo Gen 2 support
107
108 **0.4.0**
109   * Rename to mraa
110   * get_platform_type function added.
111
112 **0.3.1**
113   * Initial Intel Galileo Gen 2 support
114   * mraa_gpio_isr parameters added.
115   * Detection of different supported platforms added.
116
117 **0.3.0**
118   * mraa_i2c_read now returns length of read
119
120 **0.2.9**
121   * Add global mraa.h & mraa.hpp headers
122   * usage of "gpio.h" is not legal you need to use "mraa/gpio.h" unless adding
123     -L/usr/include/mraa
124
125 **0.2.8**
126   * Added mraa_set_priority call
127   * Added mmap gpio call mraa_gpio_use_mmaped
128
129 **0.2.7**
130   * C++ API now uses basic types and not unistd types as C
131   * Clearer and consistent use of unistd tpyes in C api
132
133 **0.2.6**
134   * C++ examples added, using c++ headers/api.
135   * moved to open instead of fopen in all modules
136   * rename mraa_check functions and made them internal to mraa only.
137   * removed "export" functions from api
138   * Intel Galileo Gen 1 (rev d) fixes, incorrect definition of some items
139   * SPI, implementation completed.
140   * I2C internal function, completed.
141   * PWM fix bug in period set method.
142   * Swig upstream can be used for building.
143   * No longer builds docs on default cmake, needs flag
144   * GPIO/PWM ownership guard prevents closing on existing pins, still can be forced.
145
146 **0.2.5**
147   * C++/Python/Node Enums/const names now do not contain MRAA_GPIO
148   * Enum type declaration for C++ changed
149   * Python/Node get_version() -> GetVersion()
150   * i2c read calls don't use const char* and i2c write calls do
151
152 **0.2.4**
153   * All mraa_ contexts now are pointers to the actual struct which is not
154     delcared in the header. The only end user change is that instead of
155     returning a type mraa_gpio_context pointer mraa_gpio_init() now returns a
156     mraa_gpio_context (which is actually a pointer to struct _gpio internally).
157   * C++ API is available, use the .hpp headers and add stdc++  to the linker
158     flags.
159   * Initial SPI implementation is provided
160
161 **0.2.3**
162   * mraa_aio_read_u16() -> mraa_aio_read()
163   * mraa_aio_read() now returns a uint16_t instead of an unsigned int
164
165 **0.2.2**
166   * First version with API considered 'stable'