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>
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>
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>
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>
* 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>
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>
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>
* 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>
* 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>
* 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>