Skip to main content
shauns87
Associate III
February 20, 2015
Question

STM32F103 firmware library

  • February 20, 2015
  • 2 replies
  • 674 views
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?
    This topic has been closed for replies.

    2 replies

    qwer.asdf
    Senior
    February 20, 2015
    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.

    Tesla DeLorean
    Guru
    February 20, 2015
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..