This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

i don't understand the syntax ((typedef *) address value)

hi Everybody,
i copy and paste a line of code bellow as an example:

"#define USB (( USB_TypeDef *) USB_BASE)"

( suppose #define USB_BASE 0x0C000 )

i don't understand the "(( USB_TypeDef *) USB_BASE)"?
why the *, the pointer operator, is placed with type inside parenthesis?

thanks,
Ras

Parents
  • (( USB_TypeDef *) USB_BASE)
    

    It just states that the value USB_BASE is a pointer of type USB_TypeDef. If you didn't have the *, then it would be saying that the value USB_BASE is of the type USB_TypeDef.

Reply
  • (( USB_TypeDef *) USB_BASE)
    

    It just states that the value USB_BASE is a pointer of type USB_TypeDef. If you didn't have the *, then it would be saying that the value USB_BASE is of the type USB_TypeDef.

Children