cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103 firmware library

shauns87
Associate II
Posted on February 20, 2015 at 13:01

I am unable to understand the following syntax

((ADC_TypeDef *) ADC1_BASE). Please help me understand the meaning of this code. Is this some kind of a pointer?
2 REPLIES 2
qwer.asdf
Senior
Posted on February 20, 2015 at 13:40

This is basic C. Type conversion from defined constant integer to a pointer to a structure. Just find a nice book about C, it's a simple and very powerful language.

Posted on February 20, 2015 at 14:17

Casting a structure pointer to a specific memory address associated with the peripheral. The peripheral structure described the register space in memory. The in memory configuration of the registers is duplicated in USART1, USART2, etc.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..