You need to use constants instead of those defines:
#define uart0 0x860
#define uart1 0x880
like so:
const int * uart0 = 0x860;
const int * uart1 = 0x868;
Also noted that incrementing a pointer of type int *
by 1
, moves it pointing to and address +sizeof(int*)
. So assuming an int
being 4 bytes long, uart1 + 1
would point to address 0x884
.