Private
Public Access
2
0
Commit Graph

150 Commits

Author SHA1 Message Date
Brendan Le Foll
fc5d37d391 i2c: set_frequency now takes a mraa_i2c_mode_t
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-01-05 14:38:48 +00:00
Brendan Le Foll
6651d49b6a types.h: add edison numbering enums
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2015-01-05 12:23:34 +00:00
yoneken
74d172cb6c gpio: Add a function to get a pin number from mraa_gpio_context
Signed-off-by: Kenta Yonekura <yoneken@ieee.org>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-12-21 17:43:31 +00:00
Thomas Ingleby
f277e7d35a doc/spi: correct description of SPI
SPI is not System Package Interface

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-12-11 15:23:25 +00:00
Thomas Ingleby
ea38d8c397 raspberry pi: add model b definition
Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-12-08 15:41:16 +00:00
Brendan Le Foll
8f1c542d5d common.h: move functions from types.h
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-12-02 23:19:54 +00:00
Brendan Le Foll
261f04f94d types.h: Move mraa_pinmodes_t to types.h
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-12-02 23:18:20 +00:00
Thomas Ingleby
d1185efc0a mraa: add mraa_get_platform_name
getPlatformName for c++/swig API
Closes #35

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
2014-11-26 15:17:28 +00:00
Brendan Le Foll
d99bfa45a3 i2c.h: fix typo in doxygen comment
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-24 08:04:08 +00:00
Henry Bruce
6bc2b0fb53 intel_minnow_max: Added platform definition
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 15:08:31 +00:00
Brendan Le Foll
75be9992fd i2c: fix I2c::read() call
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 14:10:56 +00:00
Brendan Le Foll
19d7dad364 i2c: remove smbus helper library & clean up command use in API
This commit changes the mraa_i2c_read() API call behaviour, a register should
now always be set when using this call. The smbus helper library is no longer
required since the code is now all contained from i2c.c which avoids multiple
function calls

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
Brendan Le Foll
e9de25d797 spi.hpp: remove transfer command from SWIG APIs
Transfer command works with a uint8_t buffer that is written into, this does
not work in SWIG APIs and will cause a copy in either case, so the API call is
not useful. Remove to stop confusion.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
2014-11-20 12:03:31 +00:00
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