The previous version failed to run successfully on a Raspberry Pi 3 Model B because the memory location of the GPIO pins changed, and the program hard-coded the value.
This patch uses /dev/gpiomem so no hard-coded offset is needed. This allows the same code and executable to run on all generations of the Raspberry Pi. I have tested it successfully with:
The previous version failed to run successfully on a Raspberry Pi 3 Model B because the memory location of the GPIO pins changed, and the program hard-coded the value.
This patch uses /dev/gpiomem so no hard-coded offset is needed. This allows the same code and executable to run on all generations of the Raspberry Pi. I have tested it successfully with: