Hi there. I have some C code that follows the examples here:
http://elinux.org/RPi_Low-level_peripherals#C_2
...using "/dev/mem" to memory map GPIOs that I can configure and then read/write on my Raspberry Pi. This code worked fine under Arch Linux on my Pi model B, which I unfortunately broke a few weeks ago.
On my replacement "Pi 2" the same code has no effect on the GPIO pins at all.
Two questions:
1. Has anyone here had success driving GPIOs from C under Arch Linux on a Raspberry Pi 2?
2. If so, would it be possible to see a snippit so that I can determine what the devil I'm doing wrong?
Rob
P.S. I've used WiringPi to show that the ports do work, so there is something I need to change with my configuration/code since the Raspberry Pi B (not B+, B, the one with the smaller connector) days. The GPIOs I am using are not in the extended pins area.
P.P.S. The author of WiringPi notes on his website, "The Pi 2 has the same GPIO interface, however presumably due to the 1GB of RAM the GPIO base location has changed". However I can't find anywhere that tells me what this new GPIO base location is...