I'm compiling the following lines:
volatile Uint32 *gpioDataReg;
.
.
.
gpioDataReg = (volatile Uint32 *)&GpioDataReg + (104/32)*GPY_DATA_OFFSET;
After the above gpioDataReg pointer should be 0x7F18 but it seems like the "plus" is not done and I get the value 0x7F00 (the address of GpioDataReg).
To solve it I split the above to two lines:
gpioDataReg = (volatile Uint32 *)&GpioDataRegs;
gpioDataReg += (104/32)*GPY_DATA_OFFSET;
now it works.
What am I missing here?