jobin-sun / raspberry-gpio-python

Automatically exported from code.google.com/p/raspberry-gpio-python
MIT License
0 stars 0 forks source link

Checking for pin direction #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm wondering if a way to check whether pins are currently set as inputs or 
outputs can be implemented.

It'd be useful so we can toggle the direction of a pin, i.e., for 
bi-directional I/Os, or logging actual pin directions.

Original issue reported on code.google.com by R.E.dela...@gmail.com on 11 Apr 2013 at 6:39

GoogleCodeExporter commented 9 years ago
There is a GPIO.gpio_function(gpio) function - gpio must be a BCM number at the 
moment.  The details of this are missing from documentation on the wiki of this 
project so I will have to add it.

Tasks required to fix this issue:
- add documentation of gpio_function()
- accept BOARD numbers depending on current mode

Original comment by btcros...@googlemail.com on 11 Apr 2013 at 7:00

GoogleCodeExporter commented 9 years ago
Altered gpio_function() to accept BOARD numbers as well as GPIO numbers, 
depending on current mode

Made return values of gpio_function() more descriptive (INPUT, OUTPUT, SPI, 
I2C, PWM, SERIAL, UNKNOWN)

Still needs documenting in wiki

Original comment by btcros...@googlemail.com on 14 Sep 2013 at 9:46

GoogleCodeExporter commented 9 years ago
Fixed in 0.5.4
Documentation is in the RPi.GPIO project wiki (now on Sourceforge)

Original comment by btcros...@googlemail.com on 23 Dec 2013 at 11:33