151 Commits
Author SHA1 Message Date
Vanya A. Sergeev c2aa7d164f update version to v2.2.1 v2.2.1 2020-05-31 22:25:08 -05:00
Vanya A. Sergeev d73c4b7307 changelog: update to v2.2.1 2020-05-31 22:25:08 -05:00
Vanya A. Sergeev 6cd2061ae6 gpio: fix argument name in prototype for gpio_set_bias()
resolves #25.
2020-05-31 22:22:21 -05:00
Joris Offouga cfc722e518 gpio: add feature test macro for POLLRDNORM
The code needs _XOPEN_SOURCE for some poll() flags.

Fix build with uclibc:
src/gpio.c: In function gpio_poll_multiple»:
src/gpio.c:242:61: error: «POLLRDNORM» undeclared (first use in this function)
(POLLPRI | POLLERR) : (POLLIN | POLLRDNORM);
                                ^

closes #24.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-05-31 22:22:21 -05:00
Vanya A. Sergeev a750f96355 update version to v2.2.0 v2.2.0 2020-05-29 01:24:25 -05:00
Vanya A. Sergeev 58bc7bde65 changelog: update to v2.2.0 2020-05-29 01:24:25 -05:00
Vanya A. Sergeev e41e7e4b68 license: update copyright years 2020-05-29 01:24:25 -05:00
Vanya A. Sergeev 38866124f6 readme: add links to contributed libraries 2020-05-29 01:24:25 -05:00
Vanya A. Sergeev f51e7317b9 changelog: rename to CHANGELOG.md 2020-05-29 01:24:25 -05:00
Vanya A. Sergeev 7e7b91ac90 gpio: add advanced open functions for cdev implementation
resolves #22.
2020-05-28 20:35:06 -05:00
Vanya A. Sergeev 0f20c96265 gpio: initialize inverted property in open for sysfs implementation 2020-05-28 20:35:06 -05:00
Vanya A. Sergeev ecbd5aa85a gpio: add getters and setters for bias, drive, inverted
resolves #23.
2020-05-28 20:35:06 -05:00
Vanya A. Sergeev 3719a82eb9 gpio: add getter for line consumer label 2020-05-28 20:35:06 -05:00
Vanya A. Sergeev 7523093695 gpio: add write direction retry loop to export in open for sysfs implementation
for EACCES errors due to delayed udev permission rule application after
export.
2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 1949c0dbc5 gpio: make value string array static in write for sysfs implementation 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev dddf05ac3d gpio: normalize direction and edge error strings in gpio_tostring() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev be9b842410 gpio: organize implementation state in union of structs 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 001b9aa2e1 docs/gpio: fix argument name in description of gpio_open_name() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev eb65744736 gpio: only unexport in close if exported in open in sysfs implementation
see vsergeev/python-periphery#39.
2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 0ca76260f8 tests/serial: add vmin and vtime test cases to loopback test 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev e0d8632896 serial: add support for termios timeout to serial_read()
see vsergeev/python-periphery#28, vsergeev/python-periphery#30.
2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 03420b4718 serial: add getters and setters for vmin and vtime 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 42d9b38fb3 serial: clean up variables in serial_read() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev cd91ddd6fe docs/serial: improve wording in description for serial_read() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev d74a3c9774 docs/serial: improve wording in description for serial_poll() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev a700bd1359 docs/serial: improve indentation of prototype for serial_open_advanced() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 4a62aebe36 gpio: add gpio_poll_multiple() api
see vsergeev/python-periphery#21.
2020-05-28 00:04:13 -05:00
Vanya A. Sergeev e914e48ace docs/gpio: improve wording in description for gpio_poll() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev 06de19088c docs/spi: improve indentation of prototype for spi_open_advanced() 2020-05-28 00:04:13 -05:00
Vanya A. Sergeev e5d58d2a51 cmake: simplify variables in pc file generation 2020-04-30 01:52:21 -05:00
Joris Offouga 671e6182cd cmake: add pkg-config pc file generation
Create libperiphery.pc file for pkg-config. Allows to use
PKG_CHECK_MODULE in cmake, meson or autotools projet.

Example with cmake:
In CMakeLists:
pkg_check_modules(CPERIPHERY libperiphery REQUIRED)

-- Checking for module 'libperiphery'
--   Found libperiphery, version 2.1.0

Signed-off-by: Joris Offouga <offougajoris@gmail.com>

Rebase to use fixed variable names and updated cmake project name.
Also, rearrange some definitions in CMakeLists.txt.

Resolves #21.

Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-04-30 01:52:21 -05:00
Vanya A. Sergeev 2e7ae374c0 cmake: change project name to periphery
for consistency with library name.
2020-04-30 01:52:16 -05:00
Vanya A. Sergeev 868990e9d1 cmake: fix variable name typos 2020-04-30 00:41:14 -05:00
Vanya A. Sergeev e30fea74a5 readme: improve build sections and add vanilla make instructions 2020-01-16 23:53:25 -06:00
Vanya A. Sergeev 7273c82c89 cmake: improve organization and comments in CMakeLists.txt 2020-01-16 23:52:44 -06:00
Joris Offouga 952e1e906a cmake: add cmake build support
CMake is used to control the software compilation process using simple
platform and compiler independent configuration files, and generate
native makefiles and workspaces that can be used in the compiler
environment of your choice. See: https://cmake.org/

Also with cmake support, build shared or static library, install to
$libdir, and install headers files to $includir/c-periphery.

With cmake support, it's possible to check if kernel headers is required
for build c-periphery.

Keep Makefile, because lua-periphery's build process currently expects
it.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
Signed-off-by: Vanya A. Sergeev <v@sergeev.io>
2020-01-16 23:48:17 -06:00
Vanya A. Sergeev d42d85555f update version to v2.1.0 v2.1.0 2020-01-07 23:44:14 -06:00
Vanya A. Sergeev 6ae4ef6e62 changelog: update to v2.1.0 2020-01-07 23:44:14 -06:00
Vanya A. Sergeev 72a2be6e69 readme: update sample build outputs 2020-01-07 23:44:14 -06:00
Vanya A. Sergeev 37174127a3 pwm: add pwm module 2020-01-07 23:44:14 -06:00
Vanya A. Sergeev 6d3f48e573 led: add led module 2020-01-07 23:44:14 -06:00
Vanya A. Sergeev 85c163f353 docs/spi: reword description for getters 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev ca2cd97f4b docs/serial: reword description for getters 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev 7185281ee7 docs/gpio: reword description for getters 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev f08e0402ef gpio: improve formatting in sysfs implementation 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev 2bc8321b99 gpio: simplify set direction and edge in sysfs implementation 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev 396e2fdf64 gpio: replace null with newline term in writes for sysfs implementation 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev c230b2087c tests/gpio_sysfs: fix non-existent gpio line number 2020-01-07 00:34:48 -06:00
Vanya A. Sergeev cc19afa0c9 gpio: use unsigned specifier in format strings 2020-01-04 02:28:59 -06:00
Vanya A. Sergeev 8734b5888b spi: use unsigned specifier in format strings 2020-01-04 02:28:47 -06:00