It will be more convenient for me to use all the MSP430 ports as one port. I was thinking maybe to overflow the registers until the next memory address, but it's not working (or maybe i'm not doing it right).
To access BIT0 of PORT2, I tried Something like that:
P1OUT |= 0x80000000000;
because in the memory P2OUT (0x0029) is 8 addresses after P1OUT (0x0021), and those are 8bit registers in the middle. so 8x8=64.
I know I can access the P2OUT with an offset like this:
*(char *)(0x0021 + 0x0008) |= BIT0;
I want to define myself a list of GPIO's from 1 to 13, and turn them on and off without checking if GPIO11 is on PORT2 or on PORT1, I want one command to do it all.
is is possible?