Private
Public Access
2
0
Commit Graph

137 Commits

Author SHA1 Message Date
Brendan Le Foll
7dc29aa3b7 common.hpp: add missing docstring param for setLogLevel
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
ac1c60d4fe i2c: add clean {write, read}data functions
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
1133b32b5a i2c.hpp: reorder & style header
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
274d5b2d50 i2c: use uint8_t when appropriate and remove char
Object APIs used signed chars for some operations which are not appropriate
when using i2c.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-05 11:25:38 +00:00
Anton Krasovsky
cbf4c7447f i2c: add api call to read byte from a specified register
Signed-off-by: Anton Krasovsky <anton@no-mad.net>
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-31 01:17:17 +00:00
Thomas Ingleby
3b01af1da1 pwm: add period limits, warn over syslog
Added minimum, maximum and default period settings to board definitions
PWM will now have a default period as defined in the board defintion.
When using pwm_write() writing 1.0f or above will default to 100%.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-30 12:22:40 +00:00
Thomas Ingleby
7c807b3acc intel_de3815: initial support for Baytrail NUC
* I2C only currently supported, Both bus 0 and 1

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-24 14:21:20 +01:00
Brendan Le Foll
d49f20b7ba i2c: mraa_i2c_frequency now returns correct returns
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-20 10:01:53 +01:00
Kurt Eckhardt
0f2329bd95 common: c++ link error if multiple files include header
Header only C++ function definitions need to be static to avoid linking issues
when including the header multiple times.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-19 09:02:58 +01:00
Brendan Le Foll
d734a661fd spi: make mraa_spi_write_buf call mraa_transfer_buf
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-19 09:01:01 +01:00
Kurt Eckhardt
2a11e31052 spi: Add SPI transfer function that pass in RX/TX
When using SPI, I prefer to not have to do malloc/free functions for each
transfer, so why not have a transfer function that you can pass in both
buffers.  With my ILI9341 TFT display code that gave some perf wins, also more
of a win, you can pass in NULL for recv buffer and the underlying device driver
does not have to copy the data.

Signed-off-by: Kurt Eckhardt <kurte@rockisland.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-19 09:00:57 +01:00
Brendan Le Foll
54deb01796 exception: Add exceptions when context creation fails
* Exceptions only fired in constructor when it would initialise with a NULL
  context causing segfaults if used any further
* Adds exception.i requirement to mraa.i for node.js and python support

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-16 15:07:18 +01:00
Thomas Ingleby
88341c7e56 api: correct mistake in gpio.hpp
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-10-15 12:29:08 +01:00
Brendan Le Foll
6d5a3d796c gpio: add more error checking for mraa_gpio_context
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-10-03 12:00:11 +01:00
Brendan Le Foll
32d8a6f0ca syslog: remove all fprintf calls and use syslog instead
Syslog is now used for all error messages, return values in the code should be
used by programmers to see the status of the library/board and syslog can be
used to see quickly from a debugging perspective what has gone wrong. A few
cosmetics where improved as well as a mraa_set_log_level() call where the
syslog log mask can be set directly from libmraa.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-25 14:31:04 +01:00
Thomas Ingleby
0a9bfa365f aio: change c++ calls to camelCase
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-22 17:40:57 +01:00
Thomas Ingleby
e82a76593d aio: change return from uint16 to unsigned int
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-22 15:29:02 +01:00
Thomas Ingleby
6a7add6b99 aio: add calls for changing bit value of the read
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-22 14:52:45 +01:00
Thomas Ingleby
9a60d2ee63 i2c: boost max defined buses to 12.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-09 17:28:43 +01:00
Thomas Ingleby
5766b03068 intel_edision_fab_c: renamed from fab_b
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-09 17:28:43 +01:00
Thomas Ingleby
cb63c2782e edison: add edison detection
* Will look for BODEGA BAY or SALT BAY

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-09 17:13:22 +01:00
Brendan Le Foll
2687e5a7c4 docs: add common i2c doc page i2c.txt
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-07 21:20:06 +01:00
Brendan Le Foll
54dfe903bb docs: remove references to C++ as docstrings used by sphinx
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-03 09:33:29 +01:00
Brendan Le Foll
0d04677c98 uart: add C++ Uart module and links to swig
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-03 09:30:49 +01:00
Brendan Le Foll
21b65f5eb1 common.hpp: fix documentation of functions
Functions inside namespace are tough to document, bypassing this by documenting
the namespace and then using the namespace doc as common.hpp doc in the index

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-09-01 23:18:51 +01:00
Mark Ceisel
9cf6cad45a pwm: add config_ms and config_percent.
* Allows user to set both at the same time. Will reset to previous if
* period for duty cycle fails to write

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-09-01 12:18:01 +01:00
Brendan Le Foll
22a3551bf8 common.hpp: add ADC bitness calls to C++ api
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-08-14 14:21:03 +01:00
Brendan Le Foll
df05dc58ca spi: prefix SPI mode with MRAA_SPI_
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-08-08 09:32:28 +01:00
Kiveisha Yevgeniy
998095d802 spi: added spi mode to mraa
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
2014-08-06 11:40:51 +00:00
Brendan Le Foll
e7bda80013 i2c.hpp: new read() variant that returns terminated std::string
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-08-05 10:18:14 +01:00
Brendan Le Foll
9b6d67aa87 i2c.hpp: add read(size_t length) function useful in scripting languages
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-31 10:14:57 +02:00
Brendan Le Foll
3925724464 i2c.hpp: overload read() function, this renames readByte
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-31 10:14:22 +02:00
Thomas Ingleby
9f2f5be20a uart_setup: add example on current uart use.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-07-10 09:33:36 +01:00
Thomas Ingleby
23304fb6c4 uart: barebones uart module added.
* Only defined call is the init. Will then expose the uart from
* the multiplexors.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-07-10 01:09:46 +01:00
Brendan Le Foll
4b0f24367a common.hpp: use common.hpp instead of renaming C functions in interface
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-04 15:42:04 +01:00
Thomas Ingleby
2cb2122fa1 types.h: add missing asterix from comment.
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-07-02 17:10:59 +01:00
Thomas Ingleby
053d9aef70 mraa: add common hpp
* Wraps some of the C functions that libmraa has into the mraa namespace
* Not included in swig bindings as of yet

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-07-02 17:09:34 +01:00
Brendan Le Foll
eec08ac97b mraa.c: stop ctor running in scripting languages
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-01 17:05:57 +01:00
Brendan Le Foll
437e26781c mraa: add deinit function for valgrind testing
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-01 16:38:41 +01:00
Brendan Le Foll
b1def2a784 spi: update spi module to use char instead of unsigned char as return values
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-01 14:56:12 +01:00
Brendan Le Foll
70ba5a56ab i2c: allow binary strings as parameters to write() functions in scripting
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-07-01 13:51:28 +01:00
Thomas Ingleby
e5c7e64cf3 aio: added configuration within platform data.
* Allows for different bit shifting for each platform.
* New functions added for obtaining this information
* mraa_adc_raw_bits
* mraa_adc_supported_bits

* Update board information to include this. AIO module changed to allow
* use of the new board data

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-06-25 17:32:41 +01:00
Thomas Ingleby
09b8663a7e gpio: add mmap enable function to cpp headers
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-06-25 11:14:20 +01:00
Thomas Ingleby
6853997a92 mraa: rename from maa to mraa
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-06-24 17:24:54 +01:00
Brendan Le Foll
79d0da4853 maa: change complex C++ write calls to CamelCase for spi & i2c
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-06-24 14:42:24 +01:00
Brendan Le Foll
17edeb3e7a i2c.hpp: add I2c::writeReg method
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-06-24 14:40:34 +01:00
Brendan Le Foll
475a692638 maa: add maa_get_platform_type function and move swig common to type.h
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-06-20 18:00:19 +01:00
Thomas Ingleby
f035dcd341 Merge branch 'gen2' 2014-06-20 16:22:27 +01:00
Kiveisha Yevgeniy
6fbe2a7e53 gpio: Added args param to maa_gpio_isr and added documentation
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
2014-06-19 16:23:43 +00:00
Thomas Ingleby
fa4a302398 maa: add support for enabling pins and pulldowns
* Not Complete

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-06-17 20:15:36 +01:00