This commit adds a MRAA platform for the UP Squared board, EVT3 revision.
It handles the relevant FPGA configuration updates when using MRAA to
change pin modes or toggle GPIO directions.
Signed-off-by: Javier Arteaga <javier@emutex.com>
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This allows assigning platform pins to the CTS/RTS lines.
If provided, these will be muxed as UART when flow control is enabled.
Signed-off-by: Nicola Lunghi <nicola.lunghi@emutex.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Previously, mraa_iio_trigger_buffer took a void* args but did not use
this. Included implementation to allow user to pass a void* to this
method and have the corresponding pointer returned in the interrupt
handler.
Signed-off-by: Noel Eck <noel.eck@intel.com>
There were unused variables, incorrect pointer operations
and plan broken string comparison.
Now there's only one - for unused uart3_enabled in beaglebone.c,
but we want to keep it for declaration consistency.
Also fixes#757.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
This attribute is not part of gpio standard attributes
so it's necessary to implement a custom version of this function
Signed-off-by: Nicola Ponte <nicola.ponte@u-blox.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Beaglebone AIO pins seem to be a little different than most boards, so
this is my attempt to work with that without impacting other boards. I
added a new flag in mraa_board_t to indicate whether or not the aio pins
are sequential. One the beaglebone, they are not. To go along with this,
I added a new device mraa_aio_dev_t, that will map each aio to a
physical pin.
In the main aio logic, if aio_non_seq is true for the board, the manual
mapping is used, otherwise the old mathematical mapping is used.
Signed-off-by: Nick Crast <nrcrast@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
The Native PIO API provides both the libraries and headers for use with
the Android Things Peripheralanager client. This commit removes these
from the MRAA repo in favor of the FindAndroidThings.cmake provided by
the Native PIO API.
Signed-off-by: Noel Eck <noel.eck@intel.com>
GT/GrosseTete -> Joule. This commit deprecates the MRAA_INTEL_GT_TUCHUCK
mraa_platform_t value and links the grossetete.md page to joule.md.
Signed-off-by: Wai Lun Poon <wai.lun.poon@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Like the beaglebone, the phyBOARD-Wega also got an am335x.
So I merged the four mmap-functions for gpio_context and some
identical defines in a separate header and c-file.
The new platform support-files are based on beaglebone-files.
The documentation of phyBOARD-Wega is still in process,
but for now there are enough informations.
At this time it is possible to use GPIO-Pins and Uart0
(tested via python with mraa). The code for using SPI, I2C and
PWM is also still in process and not tested yet.
Signed-off-by: Norbert Wesp <nwesp@phytec.de>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Bus number no longer has to be the same as its id and all busses are
disabled until a configuration entry is found.
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Added standard context validity check, another check for a replace function
and corrected a return statement to fit our standard code style.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Mock platform allows one to use mraa without having any real HW.
This commit makes necessary foundational changes and implements
GPIO functionality as well as adds respective tests.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
As described in issue #91, on Edison setting 0% duty doesn't
disable the PWM on a pin completely.
Therefore we add a couple of Edison-specific _pre functions
and an internal PWM state variable, which we use to toggle PWM
enabled/disabled based on what duty is set for the pin.
Closes#91.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Make better use of unsigned/signed ints, signed ints are preffered unless there
is a good reason not to.
Signed-off-by: Alexandru Timohi <alexandru.timohi@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit changes also the _replace function and adds exceptions to the C++
API for errors in AIO read
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>