aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-02-28radxa cm3: fix pin 26HEADmasterNascs
Signed-off-by: Nascs <nascs@radxa.com>
2024-01-23cmake: Use a regular expression to match x86 architecturesKhem Raj
in OE we use i686 for qemux86 and this results in -- INFO - Target arch is i686 CMake Error at CMakeLists.txt:191 (message): Only x86, arm, mips, PERIPHERALMAN and mock platforms currently supported So using a wildcard helps in using any x86 arch Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-23gpio: Include limits.h for PATH_MAXKhem Raj
Musl exposes this problem where PATH_MAX is used but limits.h is not included, it works with glibc perhaps due to limits.h being indirectly included by another system header. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-23mraa: Use posix basenameKhem Raj
Musl has removed the declaration from string.h [1] which exposes the problem especially with clang-17+ compiler where implicit function declaration is flagged as error. Use posix basename and make a copy of string to operate on to emulate GNU basename behaviour. [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 Signed-off-by: Khem Raj <raj.khem@gmail.com>
2024-01-23platform: add radxa e25 supportNascs
Signed-off-by: Nascs <nascs@radxa.com>
2024-01-23Adding in RPI 5 supportChuckduey
Signed-off-by: Chuckduey <cduey@msn.com>
2023-12-05types.h: fix Radxa ROCK 3B and Radxa CM5 IO wiringNascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-12-05platform: add Radxa ROCK 3A platform supportNascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-11-08platform: add Radxa CM5 IO platform supportnascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-10-26platform: add Radxa CM3 platform supportnascs
Signed-off-by: Nascs <nascs@radxa.com> Co-authored-by: ZHANG Yuntian <yt@radxa.com>
2023-10-20platform: add Radxa ROCK 3B platform supportnascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-10-19Add support for Orange Pi PrimeGunjan Gupta
2023-10-12platform: add Radxa ROCK 5B platform supportNascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-10-11readme: add Radxa ROCK 3C linknascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-10-11readme: fix Radxa ROCK 5A linknascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-09-26platform: add Radxa ROCK 5A platform supportnascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-09-21CMakeLists.txt: Fix option string errorHsuan-Ting Lu
Inferred desired behavior from conditional add_subdirectory code at https://github.com/eclipse/mraa/blob/8b1c54934e80edc2d36abac9d9c96fe1e01cb669/CMakeLists.txt#L224-L226 Signed-off-by: Hsuan-Ting Lu <hsuan.ting.lu@nyu.edu>
2023-09-21platform: Add RISC-V architecture with VisionFiveDaniel Bovensiepen
Add RISC-V architecture and StarFive JH71x0-based boards VisionFive and VisionFive 2. Signed-off-by: Daniel Bovensiepen <oss@bovi.li> Signed-off-by: Zhu Jia Xing <jiaxing.zhu@siemens.com>
2023-09-11radxa rock 3c: add documentNascs
Signed-off-by: Nascs <nascs@radxa.com> Co-authored-by: ZHANG Yuntian <yt@radxa.com>
2023-09-11platform: add Radxa ROCK 3C platform supportnascs
Signed-off-by: Nascs <nascs@radxa.com>
2023-06-07rockpi4: add java supportnascs
Signed-off-by: nascs <nascs@radxa.com>
2023-06-07rockpi4: fixed the issuse 'spi not work'nascs
Signed-off-by: nascs <nascs@radxa.com>
2023-06-07rockpi4: fixed the issuse 'No Pins'nascs
Signed-off-by: nascs <nascs@radxa.com>
2022-08-05iot2050: Add USER buttonJan Kiszka
A simple GPIO, no muxing needed, no pulling supported. Therefore, reject any mode changes that request pull up/down, ignore the others. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-08-05platform: add iot2050 platform supportIvan Mikhaylov
This patch introuduce iot2050 platform support, it is the port from meta-iot2050 layer. Based on original patch by Le Jin. Signed-off-by: Le Jin <le.jin@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
2022-08-05gpio: chardev: Add function to retrieve sysfs base for a gpiochipJan Kiszka
This allows to full mux structures which still need the sysfs GPIO numbers. In combination with mraa_find_gpio_line_by_name, this allows for platform setup that is independent of the gpiochip probing order. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-08-05gpio: chardev: Add helper to retrieve gpiochip and line offset by line nameJan Kiszka
This makes the retrieval robust against chips being reordered during boot. The results can be used to fill out mraa_pin_t while initializing a board. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-08-05uart: add 4800 baud speedIvan Mikhaylov
Signed-off-by: Le Jin <le.jin@siemens.com> Signed-off-by: Ivan Mikhaylov <fr0st61te@gmail.com>
2022-08-05uart: disable timeout on read <= 0Ivan Mikhaylov
Signed-off-by: Le Jin <le.jin@siemens.com> Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
2022-08-05mux: add mux interfaceIvan Mikhaylov
Add mux_init_reg interface with different mux modes for GPIO, UART, SPI, I2C, PWM, AIO. Signed-off-by: Le Jin <le.jin@siemens.com> Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
2022-07-01Support for swig 4.1.0Hirokazu MORIKAWA
In swig 4.1.0, the complicated handling of "SWIG_V8_VERSION" has been cleaned up a bit. I made the same changes as in this swig. Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2022-07-01feat: add newer raspberry pi 4b variantsAaron Shaw
add newer pi 4 variants a03112, a03115, b03114, b03115, c03114, c03115, d03115 Signed-off-by: Aaron Shaw <shawaj@gmail.com>
2022-07-01gpio: fix incorrect assignment of *cinfos in mraa_get_chip_infosIvan Mikhaylov
*cinfos in mraa_get_chip_infos is not set in case of mraa_get_chip_info_by_name failure which happens on access of /dev/gpiochip* files which leads to memory free by invalid pointer in *cinfos. As example, it can be easy recreated with non-root run of mraa-gpio: test@iot2050-debian:~$ mraa-gpio free(): invalid pointer Aborted Signed-off-by: Ivan Mikhaylov <ivan.mikhaylov@siemens.com>
2022-07-01gpio: Silence own use of deprecated mraa_gpio_use_mmapedJan Kiszka
The warning is aiming at external use, not our own one. Silence the latter by adding an internal service that the deprecated function calls and use that service in the remaining mraa use cases. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-07-01python3: Drop bogus CMAKE_C_FLAGSJan Kiszka
CMake automatically pulls CMAKE_C_FLAGS and CMAKE_CXX_FLAGS, according to the source file. Adding CMAKE_C_FLAGS unconditionally only raises cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit’ is not valid for C++ cc1plus: warning: ‘-Werror=’ argument ‘-Werror=missing-parameter-type’ is not valid for C++ Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-07-01iio: Silence format-truncation warningsJan Kiszka
Truncation warnings are default-on with many gcc-10 packages but the module is fine with the potential truncations of sysfs paths as they are. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-07-01iio: Add missing parameter in error log outputJan Kiszka
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2022-05-25rockpi4.c: Add chardev GPIO supportJames Jones
The recommended config for upstream kernels (arm64 defconfig) on the Radxa "mainline" kernel Wiki does not include GPIO sysfs support, so libmraa applications and utilies don't work out of the box. This change marks the board as supporting the GPIO character device interface and fixes the group and line number assignments such that it actually works. Performance is also noticeably better with the chardev path. I tested this by using mraa-gpio to toggle various pins on the 40-pin header with a multimeter attached, and with a program I have that that toggles 8 GPIO pins at the same time to upload data to another system using a parallel protocol. On upstream/mainline kernels, chardev support is now used. On the older 4.4 kernels from Radxa, chardev support is not available and libmraa gracefully falls back to sysfs. Note another significant difference compared to the Radxa kernels in upstream kernels is the default devicetree must be tweaked to disable the 'i2s1' device in order to use GPIO pins 12, 35, 36, 38, and 40 via libmraa. For example, I appended the following section: &i2s1 { status = "disabled"; }; to arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4b.dts to accomplish this. Signed-off-by: James Jones <linux@theinnocuous.com>
2021-08-23aio: Update shifter_value and max_analog_value on mraa_aio_set_bitJan Kiszka
mraa_aio_set_bit() changes value_bit, so the calculations of shifter_value and max_analog_value become outdated. Move their initialization to mraa_aio_set_bit and call that function from mraa_aio_init instead. Based on original patch by Le Jin. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-30gpio: Avoid spurious value reset without output mode changesJan Kiszka
When a GPIO controlled via sysfs is set again to output mode, the kernel also sets the value to 0. This can cause spurious output or mux changes, e.g. when calling "mraa-gpio set <n> 1" for a pin that was already set. Avoid this by checking the current direction, only writing it when actually needed. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-29include: Declare gVERSION global as 'extern'.Björn Esser
Fixes build with '-fno-common'. Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2021-06-29api: Add explicit close methods to classesJan Kiszka
This is needed for bindings to languages which perform implicit and lazy object cleanups. The explicit close methods allow to release resources when they are no longer required, permitting deterministic reuse. One example is node-red-node-intel-gpio which will use the new calls on node closing. Fixes #1044. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-29led: Fix and cleanup initializationJan Kiszka
The structure returned by readdir is may be statically allocated. Keeping a pointer to it is broken. The LED path is generally not a directory, it's a link to a directory. And even if it were a directory, that would tell nothing about the caller's access permissions. And then there is a lot of duplication between mraa_led_init and mraa_led_init_raw. This addresses that all. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-29examples: uart: Fix port configurationJan Kiszka
mraa_uart_settings retrieves the settings, it does not apply them. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-29uart: Convert rtscts and xonxoff in mraa_uart_settings into mraa_boolean_tJan Kiszka
This aligns the getter with the setter (mraa_uart_set_flowcontrol). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-06-29uart: Fix software flow control managementJan Kiszka
Rather than updating IXON/IXOFF in termios, mraa_uart_set_flowcontrol was incorrectly issuing a stop or start character on mode changes. This lead to spurious transmission in setups that actually wanted to disable software flow control. And it prevented enabling it (which could have been checked also by reading back the state via mraa_uart_settings). Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2021-04-07docs: fix simple typo, repeately -> repeatedlyTim Gates
There is a small typo in examples/c/pwm.c, examples/c/spi.c. Should read `repeatedly` rather than `repeately`.
2021-04-07Added Intel Learning kit to platforms.Arora, Jeet
Signed-off-by: Arora, Jeet <jeet.arora@intel.com> Signed-off-by: Thomas Ingleby <thomas.ingleby@intel.com>
2021-02-01Added Raspberry Pi 400 to platformsChuckduey
Signed-off-by: Chuckduey <cduey@msn.com>
2020-10-28mraa: update to v2.2.0Mihai Tudor Panu
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>