Commit graph

34 commits

Author SHA1 Message Date
Drew Fustini
7032af7e5f Fix warning about casting incompatible function types #308
Debian 10 (Buster) has gcc 8.2 which warns about:

cast between incompatible function types from ‘PyObject * (*)(PyObject *, PyObject *, PyObject *)’

The solution is to cast to '(PyCFunction)(void *)'
2019-12-06 10:20:18 +00: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
9fd1073982 * Fixed SEGFAULT when calling remove_event_detect() inside python callback function. 2018-02-18 00:02:50 +00:00
zserg
a9e745d451 * Added error checking for setting pin direction in gpio.setup() (Python) 2017-07-31 17:57:20 +01:00
Drew Fustini
c087b3c9e7 Merge pull request #143 from djsutton/fix-wait_for_edge-TypeError
fix TypeError: function takes exactly 3 arguments (2 given) from wait_for_edge
2017-04-02 07:33:39 -05:00
cocasema
6c489fce8e Add syslog and debugging messages 2017-03-31 02:16:21 -07:00
DJ Sutton
6e54808868 fix TypeError: function takes exactly 3 arguments (2 given) from wait_for_edge
Trying to parse 3 required arguments and then falling back to 2 will set the
PyError condition when only two arguments are present even though the
wait_for_edge function as a whole succeeds.  According to
https://docs.python.org/2/c-api/exceptions.html, returning normally after this
will lead to undefined behavior the next time the code enters the C API.

Fix this by using the PyArg_ParseTuple optional argument feature instead of
trying to parse 3 arguments and falling back to 2 if it fails.
2017-03-28 19:58:17 -06:00
Drew Fustini
43c8d5d0fe Fix unused parameter warning [-Werror=unused-parameter] 2017-01-10 10:51:59 +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
5b8a2c00a6 Added a delay parameter in order to wait for udev to make
file permission changes.
2016-11-19 16:27:29 -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
Oleg Antonyan
36c5a136df Merge remote-tracking branch 'upstream/master'
Conflicts:
	source/py_gpio.c
2016-10-20 09:13:50 +02:00
Jesse McLachlan
5510854b0c Properly support pullup configuration using pinmux 2016-10-10 14:59:53 +11:00
Matthew West
6b2aa7aabc Change return value convention for errors
Replace 1 for success and 0/-1 for failure with an enum type.
2016-08-05 13:19:54 -07:00
Justin Cooper
a764f571d5 Events should be non-reentrant #72 2014-10-13 12:35:55 -05:00
Tony DiCola
5c8db6b80d Fix #67 and fix compiler warnings. 2014-10-03 23:24:10 +00:00
João Paulo Barraca
bc9109caeb Merge branch 'master' of https://github.com/jpbarraca/adafruit-beaglebone-io-python
Conflicts:
	source/event_gpio.h
	source/py_gpio.c
2014-07-15 23:58:16 +01:00
João Paulo Barraca
3b345a7c9e Added support for timeout 2014-07-15 23:53:59 +01:00
Oleg Antonyan
6cba967bf2 Wait until GPIO file appears on the /sys filesystem (issue #36) 2014-05-21 07:04:00 +03:00
João Paulo Barraca
c86fed7263 Fix compilation error 2014-03-30 02:10:45 +01:00
João Paulo Barraca
7b1f0d4fa8 Added support for timeouts in wait_for_edge 2014-03-30 00:16:03 +00:00
Terry Hardie
8bef9b21db Fixed the use of the "initial" parameter in setup(). This allows the initial state of the port to be set correctly when setting OUTPUT mode 2014-03-09 23:35:58 -07:00
Zach Thorson
b313f8bcfc - Removed type in python export 2013-07-29 16:59:49 -05: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
Chris Desjardins
b412e17e6c Remove the gpio parameter from callbacks (it is useless) 2013-07-26 18:05:00 +02:00
Chris Desjardins
7b18706531 Fix bug in sizeof() 2013-07-26 17:55:35 +02:00
Chris Desjardins
089141070c Add type for channel argument 2013-07-26 17:43:51 +02:00
Chris Desjardins
f82caf8f35 Update the code to invoke callback with the channel 2013-07-26 17:31:04 +02: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
8bfd2680e7 remove debug statement 2013-06-12 04:41:40 +00:00
Justin Cooper
1258c651cb Initial Commit 2013-06-10 20:16:39 +00:00