nikhilsigma
Full Member level 2
- Joined
- Jun 19, 2010
- Messages
- 142
- Helped
- 17
- Reputation
- 34
- Reaction score
- 16
- Trophy points
- 1,298
- Location
- Delhi, India
- Activity points
- 2,584
Hello Everyone,
I came across following statement, but I am unable to understand it.
Kindly explain in detail about what exactly is happening.
My guess is that some pointer of unsigned long type is being created with address 0x400043FC.
My understanding of pointer is as follows:[/FONT][/COLOR]
I came across following statement, but I am unable to understand it.
Kindly explain in detail about what exactly is happening.
Code:
[COLOR=#000000][FONT=monospace]#define GPIO_PORTA_DATA_R (*((volatile unsigned long *)0x400043FC))
My guess is that some pointer of unsigned long type is being created with address 0x400043FC.
My understanding of pointer is as follows:[/FONT][/COLOR]
Code:
[COLOR=#000000][FONT=monospace]unsigned long my_variable; // Creating a variable[/FONT][/COLOR][COLOR=#000000][FONT=monospace]
unsigned long *my_pointer; // Creating a pointer
my_pointer=&my_variable; // Assigning the address of my variable to my_pointer
//Now my_pointer contains the address of my_variable and [B]*my_pointer[/B] can be used to directly access the value of my_variable. [/FONT][/COLOR]