I am using the example C++ programming for GPIO from https://elinux.org/RPi_GPIO_Code_Samples
I read for the PI4 the BCM2708_PERI_BASE value is 0x3F000000 and for the PI2 it is 0x20000000. I tried the same
example on a PI2 and PI4 (adjusting the BCM2708_PERI_BASE for each version) and it works on the PI2 but not the PI4 (I am trying the button press code).
Has anyone had success programming the GPIO on the PI4 in C/C++? As a side note, I have tried Python on the GPIO and it
works fine on the PI4 but C/C++ does not.