This commit introduces mraa_gpio_init_by_name API for initializing
a GPIO by its line name provided by the kernel. This feature depends
on the GPIO chardev support and also the line names present in devicetree
or board files. Accessing GPIO using its line name, removes the dependency
from MRAA specific pin mapping and provides a cleaner way to access GPIOs.
This will solve the issue created by an external gpiochip probing before
the SoC's internal gpio controller and thereby making the MRAA pin mapping
wrong.
Currently, this API only supports initializing a single GPIO at a time.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This fixes the problem of detecting if pins 74-77 are available for gpio/spi use. These pins were sown to be used by the emmc, but actually used by the sound pcm. If the sound PCM is disabled and the emmc is enabled the pinse can now be used. mraa-gpio list output Pins 74-77
73 GPIO115: GPIO
74 GPIO113: GPIO SPI
75 GPIO111: GPIO SPI
76 GPIO112: GPIO SPI
77 GPIO110: GPIO SPI
to build:
1. clone repo
2. sudo apt-get install build-essential python-dev cmake automake libpcre3 libpcre3-dev byacc flex swig3.0
3. cd mraa, mkdir build, cd build
4. cmake -D CMAKE_INSTALL_PREFIX=/usr ..
5. make
6. sudo make install
This has been verified to work on BBGW, and BBBW with 9.0-9.5 with emmc enabled and PCM aduio turned off. It is so nice to have control of these pins when running with out an SD card.
Closes#953
Signed-off-by: Chuck Duey <cduey@msn.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
mraa is packaged in Fedora so add details for how people can consume mraa on that
distribution.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
Add onboard LED support for Dragonboard410c. There are 4 user LEDs and
two LEDs for BT and WLAN.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1. Add support for initializing onboard LEDs based on board definition.
Maximum LED count has been set to 12.
2. Introduce mraa_led_init_raw API for initializing LEDs based on
function name. This API can be used by platforms which doesn't have mapping
in board definition.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
On Dragonboard410c, configure SPI0_CS pin as GPIO for enabling the
user to control it without adding chip select property in Devicetree.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1. Extend the lookup count to phy_pin_count to cover all physical pins
exposed on the board
2. Ignore the non GPIO pins by checking for GPIO capability
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Multiple changes necessary to enable this. The main goal is to build
and run the C++ ioinit unit tests (which require c++11)
* Updated mraa required CMake version to 2.8.11 (this is needed for
the target_xxx_xxx CMake syntax.
* Added function for adding the c++11 flag give a CMake target.
* Updated unit tests for range of CMake versions (tested on 2.8.11,
3.8.2, 3.9.6, and 3.12.0).
* Added C++ unit test file (more needed here).)
Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit adds Ultra96, one of the Consumer Edition boards of the
96Boards family.
Ultra96 is an Arm-based, Xilinx Zynq UltraScale+ MPSoC development board.
This board runs petalinux distribution on the ARM core and integrates
Xilinx programmable logic (PL) UltraScale architecture in a single fabric.
This board supports standard peripherals defined by 96Boards CE
Specification. Since it ships with >4.8 kernel, only chardev mapping
is supported for accessing GPIO.
More information about this board can be found in 96Boards product
page: https://www.96boards.org/product/ultra96/
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
This commit cleans up the 96boards board support by sorting the boards
in alphabetical manner and also executing clang-format for 96boards.c
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
If strtol fails to process any characters, return a failure.
Added protocol chunk string to each parse_xxx method for completeness
when printing to syslog.
Added more tests - passing and failing cases.
Signed-off-by: Noel Eck <noel.eck@intel.com>