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>
.c_str() works accidentally, but is technically incorrect as these
"strings" can have embedded 0 bytes in them.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
The command() function had a logic error that caused a command to be
broadcast to all devices on the DS OW bus when a proper ID was
specified. This should only be done when NO ID is specified.
This fixes UPM issue #502.
In addition, there were two cases where the C++ string accessor method
.c_str() was used when .data() should be used instead. This worked
anyway (accidentally), but is improper since the strings can have
embedded 0 bytes.
Signed-off-by: Jon Trulson <jtrulson@ics.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This adds logic to save PWM duty when disabling the pin (which sets
the duty to 0), and restore it when re-enabling the pin.
Signed-off-by: Alex Tereschenko <alext.mkrs@gmail.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Edison pwm can stuck at high if pin is disabled during ON pwm peroid.
Workaround is to force zero duty time before disabling the pin.
Signed-off-by: Billy Bai <belugon@outlook.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
When mraa_init_uart_raw is called it places the path arg in dev->path. This
works in non raw mode because the path is statically in the device
configuration but in raw mode this is a dynamic address meaning that we need to
copy it. Fix this by simply copying the device path rather than relying on the
user keeping that string path in memory.
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This strips the local RPATH when doing a `make install` rather than running
from the build/ dir
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Some details regarding the UP board are not in-sync with the
final production version of the board. This update adds an
ADC, removes a UART, and some corrections in the docs for UP.
Signed-off-by: Dan O'Donovan <dan@emutex.com>
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>
This commit gets us closer to what was intended for imraa, support of setting
sysfs user permissions
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>