kefir
Posts: 4
Joined: Fri Sep 02, 2011 9:17 am
Contact: Website

Re: GPIO development samples

Fri Sep 02, 2011 10:21 am

Hi,

Can anyone give me a pointer to documentation/samples showing how to code for the GPIO-pins on the Raspberry Pi? I can imagine a few cool projects where I'd use the GPIO, but I've never done that sort of development in Linux before.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26658
Joined: Sat Jul 30, 2011 7:41 pm

Re: GPIO development samples

Fri Sep 02, 2011 10:40 am

I'm afraid there isn't anything available yet about the RaspberryPi specifically.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

eggn1n3
Posts: 106
Joined: Fri Jul 29, 2011 10:36 am

Re: GPIO development samples

Fri Sep 02, 2011 10:49 am

Check out this URL: http://forum.sparkfun.com/view.....hp?p=52483. It shows an example of the memory-mapped-IO for ARM processors. As this is very platform depended, the R-Pi folks need to publish some details later....

kefir
Posts: 4
Joined: Fri Sep 02, 2011 9:17 am
Contact: Website

Re: GPIO development samples

Fri Sep 02, 2011 11:59 am

Thanks eggn1n3, the mmio example looks reasonable enough, provided all the magic numbers are documented somewhere.

User avatar
ukscone
Forum Moderator
Forum Moderator
Posts: 4223
Joined: Fri Jul 29, 2011 2:51 pm
Contact: Website

Re: GPIO development samples

Fri Sep 02, 2011 2:17 pm

[Edit: Just been informed that the link below is not valid for teh ARM1176JZF-S core in the R-Pi -- oh well i'll keep looking]

I haven't yet been able to find a table in any technical doc for the ARM1176JZF-S but I found this and it looks like it's near enough.

http://infocenter.arm.com/help.....ihjaf.html

although it looks like in the ARM1176JZF-S the base address can be remapped so it might be different in the final device

Return to “General discussion”