Hi
When defining to (or more) registers at the same address the linker return error (memory overlap). How to solve this ?
Ex:
// Read only volatile union { U32 REG; struct { U32 MIS : 1; // RD U32 :31; // RD } BIT; } I2CMMIS __at (0x40020018);
// Write only volatile union { U32 REG; struct { U32 IC : 1; // WR U32 :31; // WR } BIT; } I2CMICR __at (0x40020018);
Have a union encompassing both definitions?
No because want to use different name to the registers when reading or writing
"want to use different name to the registers when reading or writing"
Isn't that exactly what a union gives you?
Why not:
volatile union { // Read-Only volatile union { U32 REG; struct { U32 MIS : 1; } BIT; } MIS; // Write-Only union { U32 REG; struct { U32 IC : 1; } BIT; } ICR ; } I2CM __at (0x40020018);