jobin-sun / raspberry-gpio-python

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

Support for P5 headers #37

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

I made a few (and I mean very few) changes to your code in common.c and 
common.h to accommodate the additional pins made available on the P5 header in 
Model B Revision 2. I simply appended the pin_to_gpio_rev1 and _rev2 arrays and 
changed their sizes (and the if conditions later in your function) to reflect 
this.

BTW, thanks for the info on gpio_function() in my issue report. That saved me 
quite a few lines in the script I was writing.

Original issue reported on code.google.com by R.E.dela...@gmail.com on 18 Apr 2013 at 12:29

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by btcros...@googlemail.com on 22 Apr 2013 at 8:25

GoogleCodeExporter commented 9 years ago
That's one approach - treating the P5 header as 'extra pins' on the P1 header 
when in BOARD mode. I discussed an alternative approach here 
http://raspi.tv/2013/rpi-gpio-basics-2-how-to-check-what-pi-board-revision-you-h
ave of making BOARD_P1 a synonym of BOARD, and then adding a corresponding 
BOARD_P5 numbering scheme.

With the current API of RPi.GPIO I guess there's not really any easy solution.

Original comment by gc...@loowis.durge.org on 16 Jul 2013 at 11:31