This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Converting a peripheral (space) address to an integer value?

I am trying to take the address of a location and cast it into a constant integer.

in particular it is an SFR address

		case	(uint16_t)&RTCSEC:

Is what I attempted first this yeilds the following error (of course)

#61 this operator is not allowed in an integral constant expression   

Any suggestions as to how to get a peripheral hardware address as a constant?

I am trying to avoid doing dumb things like

	case	0x04B0://(uint16_t)RTCSEC:

Suggestions welcomed (really really welcomed)


Stephen