Commit graph

42 commits

Author SHA1 Message Date
Erik Welsh
e626f07d8d Fixed GPIO export problem; Leaves GPIO in bad state on latest BeagleBone image on PocketBeagle 2018-09-30 16:24:33 +00:00
zserg
3265d156e4 * Minor style fixes
* Added comments
* Added debug logging
* Line 724 - now <initial> flag is properly reset upon removal of event detection from GPIO pin
2018-05-31 18:10:26 +01:00
zserg
b054cc083e * Fixed SEGFAULT in event_gpio,c run_callbacks()
* Added more elaborate epoll() error logging
2018-05-30 16:47:47 +01:00
zserg
e9c70f7d23 * Fixed SEGFAULT when calling remove_event_detect() inside python callback function. 2018-02-18 00:06:57 +00:00
Drew Fustini
335e105bc1
Comment out debug log in gpio hotpath #188
Signed-off-by: Drew Fustini <drew@pdp7.com>
2017-11-08 17:43:19 -06:00
Drew Fustini
5af654ca14 change fprintf() to syslog() 2017-10-31 07:19:53 +00:00
Drew Fustini
1b3dab6950 add "Adafruit_BBIO" to syslog() 2017-10-31 03:53:02 +00:00
Drew Fustini
1edb20770e change syslog mask level to DEBUG 2017-10-31 03:13:50 +00:00
Drew Fustini
5f32b56e99 convert debug output to syslog 2017-10-31 02:55:02 +00:00
Drew Fustini
8e64f67ff0 convert fprintf() to syslog() for #178 2017-10-31 02:41:07 +00:00
Drew Fustini
becbc95861 check if BeagleBone Blue before accessing non-standard LEDs
This check is needed as BeagleBone Blue has additional LEDs
connected to GPIO pins that other BeagleBone models do not
2017-10-28 05:28:51 +00:00
Drew Fustini
5e2e785b51 check if board is BeagleBone Blue or PocketBeagle
This check is needed as BeagleBone Blue and PocketBeagle
have additional LEDs connected to GPIO pins that other
BeagleBone models do not
2017-10-28 04:27:03 +00:00
Mark A. Yoder
cc96193d31 Added BAT25, BAT50, BAT75, BAT100 and WIFI LEDs 2017-09-13 11:46:09 -04:00
Mark A. Yoder
6ef19e209f Added PAUSE and MODE buttons.
Also add 100ms sleep after exporting a new pin to give the OS time to set the
correct owner and group
2017-08-30 13:41:19 -04:00
Mark A. Yoder
35718a959b Added red and green LEDs 2017-07-28 16:53:39 -04:00
Vadim-Stupakov
e0385b1707 Fixed issue #145 GPIO library doesn't free GPIO file descriptor. File descriptor leak.
Made a little bit refactoring
2017-06-25 13:30:27 +03:00
Drew Fustini
da0b0e5890 close file descriptor to avoid leak
Resolves issue #140
2017-04-12 05:48:29 +00:00
Drew Fustini
2a7e7c6862 fix file descriptor leak in gpio_set_value()
Leak of the file descriptor was reported in issue #142.

I have switched from open() to access() so no need to close fd.
2017-04-05 06:45:35 +00:00
cocasema
6c489fce8e Add syslog and debugging messages 2017-03-31 02:16:21 -07:00
Marius Elvert
dcba8f66a7 Handle already exported pins 2017-03-06 15:03:46 +01:00
Marius Elvert
5bc893a8cc Use lookup table to prevent duplicate pin export 2017-03-06 11:48:43 +01:00
Drew Fustini
43c8d5d0fe Fix unused parameter warning [-Werror=unused-parameter] 2017-01-10 10:51:59 +00:00
Drew Fustini
14f82d94a0 remove debug logging 2017-01-09 02:21:55 +00:00
Drew Fustini
f779f8898a add support for alternate USR LED naming
Related issue:
Doesn't support Ubuntu core beaglebone leds #129
https://github.com/adafruit/adafruit-beaglebone-io-python/issues/129
2017-01-04 08:56:34 +00:00
João Paulo Barraca
40e5cd36c6 Merge branch 'master' of https://github.com/adafruit/adafruit-beaglebone-io-python 2016-11-23 22:53:25 +00:00
Shawn Wilson
9553b1a7b0 Changed gpio_set_direction to ignore USR LEDs. 2016-11-21 11:34:06 -05:00
João Paulo Barraca
3791de4c0a Merge branch 'master' of https://github.com/adafruit/adafruit-beaglebone-io-python 2016-10-30 10:55:47 +00:00
cocasema
efc0a25f65 Treat warnings as errors 2016-10-18 21:59:24 -07:00
Drew Fustini
b620b3f942 Add support for on-board LEDs (USR0-USR3)
The built-in LEDs are handled by the LED class driver and have a
different /sys/ path than the GPIO pins.

See PyBBIO library for reference:
https://github.com/graycatlabs/PyBBIO/blob/master/bbio/platform/beaglebone/config.py#L44

Resolves Adafruit customer reported issue:
https://forums.adafruit.com/viewtopic.php?f=49&t=51906
2016-01-03 18:00:25 +00:00
João Paulo Barraca
7b1f0d4fa8 Added support for timeouts in wait_for_edge 2014-03-30 00:16:03 +00:00
Chris Desjardins
6f2e0cf26a Fix compiler error in gpio_set_value 2013-08-09 10:06:36 +02:00
Chris Desjardins
af62a5c9c9 Adding common.h to event_gpio.c 2013-08-09 10:01:29 +02:00
Chris Desjardins
10229240e4 The test_direction_readback fails, because gpio_get_direction wasn't properly null terminating the direction string 2013-08-09 09:57:56 +02:00
Chris Desjardins
d80be61311 Increase buffer size of filenames for value, direction, and edge files 2013-08-08 13:35:21 +02:00
Chris Desjardins
6d4aa520e6 Give extra buffer space in export, and unexport functions for gpio that are more than 2 digits 2013-08-08 12:56:21 +02:00
Zach Thorson
d30657c1ae - Fixed broke GPIO.gpio_function() It should now allow calls with the IO Name
- Added unit tests for GPIO.gpio_function()
2013-07-29 16:53:11 -05:00
Justin Cooper
691efb8eaf fix for issue 14, seg faults with gpio events 2013-07-18 21:16:00 +00:00
Justin Cooper
a17284d4bf update copyright notices 2013-07-01 21:01:58 +00:00
Justin Cooper
5343ed160a add copyright and license notices 2000-01-01 00:04:25 +00:00
Justin Cooper
c358731349 working wait_for_edge and event_detect functionality 2013-06-12 17:00:29 +00:00
Justin Cooper
95e10ef4a0 fix reading gpio inputs 2013-06-12 04:41:57 +00:00
Justin Cooper
1258c651cb Initial Commit 2013-06-10 20:16:39 +00:00