That suppose to be "OFFSETS" - I cannot edit the title
Physical addresses range from 0x20000000 to 0x20FFFFFF for peripherals. The bus addresses for peripherals are set up to map onto the peripheral bus address range starting at 0x7E000000. Thus a peripheral advertised in the manual at bus address 0x7Ennnnnn is available at physical address 0x20nnnnnn.
On RPI 2, the peripheral addresses are different and the bcm2835 library gets them from reading /proc/device-tree/soc/ranges. This is only availble with recent versions of the kernel on RPI 2.
The above is a quote from BCM2835 library document.
The difference between "older" Rpi and RPi 3 is obvious, what is not so clear are the usage of "tree" "offsets" .
Memory mapping prior to RPi2 was explained as "0x2000000 " plus "20000" offset with "results 0x2020000.
( I hope I got all the zeros correct, but that is relatively immaterial for my question ).
In RPi2 and up the "base" changed to 0x3f000000, the mmap is done for this base and to get to GPIO - "base again" offset of 200000 is documented.
Adding x to base pointer in 32 bit system results in address of the base pointer change by 4*x - pointer arithmetic for 32 bit system.
Is that the intend?
Or should the offset to get to GIPO be 200000/4 ?
Or does it matter?
If I only want to work with GPIO and as long as I stay with the original "size" of file descriptor am I OK?