Embedded C: Registers Access
问题 Suppose we want to write at address say 0xc000 , we can define a macro in C as: #define LCDCW1_ADDR 0xc000 #define READ_LCDCW1() (*(volatile uint32_t *)LCDCW1_ADDR) #define WRITE_LCDCW1(val) ((*(volatile uint32_t *)LCDCW1_ADDR) = (val)) My question is that when using any micro-controller, consider an example MSP430, P1OUT register address is 0x0021. But when we use P1OUT=0xFFFF; // it assigns P1OUT a value 0xFFFF. My question is how does it write to that address e.g. in this case 0x0021. The