Sergey A. Borshch escreveu:
The C-compliant syntax, to turn the 0x0160 constant into an absolute address would be something like this:Anthony L wrote:Hi All, #define TA0CTL ((volatile uint16_t *)(0x0160)) Note that the "volatile" keyword is a MUST, since hardware may change register contents anytime. The sfr notation comes from the Harward architecture, specially the 80x51, where the standard C notation can't cope with some processor specific features, like bit-addressing and other stuff. For modern microcontrollers such as ARM and MSP430 this is really an optional compiler extension. |
- [Mspgcc-users] sfrw macro Anthony L
- Re: [Mspgcc-users] sfrw macro chris liechti
- Re: [Mspgcc-users] sfrw macro Sergey A. Borshch
- Re: [Mspgcc-users] sfrw macro Mathias Gruber
- Re: [Mspgcc-users] sfrw macro JMGross
- Re: [Mspgcc-users] sfrw macro Anthony L
