AnsweredAssumed Answered

Can someone break down this line of code for me? #define TIM1_PSCRH (*(volatile uint8_t *)0x5260)

Question asked by jackson ward on Jan 23, 2018
Latest reply on Jan 25, 2018 by Philipp Krause

#define TIM1_PSCRH (*(volatile uint8_t *)0x5260)

 

I understand that now when I set TIM1_PSCRH = <some 8 bit value> 
that the Timer 1 Prescaler High Byte register will be set because it is located at address 0x5260.

 

What I don't understand is what appears to maybe be a volatile pointer to a pointer of an unsigned 8 bit integer that is defined to the compiler as a constant value requiring at least 16 bits to represent. What am I not understanding.. because the above statement probably makes no sense, and if it does make sense then I'd say I'm even more confused.

 


Thanks!

Outcomes