(LPC_GPIO_TypeDef *) LPC_GPIO1_BASE - what does it mean?

Now let me look more closely the 3 define statements.

1. #define LPC_AHB_BASE          (0x50000000UL)

2. #define LPC_GPIO_BASE         (LPC_AHB_BASE  + 0x00000)

3. #define LPC_GPIO1             ((LPC_GPIO_TypeDef   *) LPC_GPIO1_BASE )

Statement 1.

What I did not understand is the suffix UL.  I guess it might unsigned long and I googled and confirmed my guess correct.  What I am surprised is that I have never seen this notation before.  Perhaps it is unique to Keil C.

Statement 2

Nothing I don't understand.  LPC_GPIO_BASE is the same thing as LPC_AHB_BASE

Statement 3

This part is difficult.  (LPC_GPIO_TypeDef   *) LPC_GPIO1_BASE

I need to google harder, I think.  I think there are many things in #define that I don't know.

.END


No comments:

Post a Comment