Goran_
Newbie level 3
- Joined
- Jun 5, 2012
- Messages
- 3
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,304
(1)volatile unsigned char * ADC_address;
--------ADC_address is a pointer which stores a volatile unsigned character .
(2)volatile unsigned int ADC_voltage = 0;
--------ADC_voltage is volatile unsigned integer variable ,
(3)volatile unsigned char * ADC_REAL_ADDRESS;
ADC_REAL_ADDRESS = (volatile unsigned char *)STA_MEMORY_BASE;
---------Typecasting STA_MEMORY_BASE to volatile unsigned char pointer and assigned to ADC_REAL_ADDRESS.
If I wrong means please correct me.
(4)Can anyone explain the below statements
#define PINSEL_BASE_ADDR 0xE002C000
#define PINSEL0 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00))
what I understood is (volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00) in this statement (PINSEL_BASE_ADDR + 0x00) is typecasts to volatile unsigned long pointer. But (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00)) , what is for the starting star(dereferencing operator) after first bracket.
--------ADC_address is a pointer which stores a volatile unsigned character .
(2)volatile unsigned int ADC_voltage = 0;
--------ADC_voltage is volatile unsigned integer variable ,
(3)volatile unsigned char * ADC_REAL_ADDRESS;
ADC_REAL_ADDRESS = (volatile unsigned char *)STA_MEMORY_BASE;
---------Typecasting STA_MEMORY_BASE to volatile unsigned char pointer and assigned to ADC_REAL_ADDRESS.
If I wrong means please correct me.
(4)Can anyone explain the below statements
#define PINSEL_BASE_ADDR 0xE002C000
#define PINSEL0 (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00))
what I understood is (volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00) in this statement (PINSEL_BASE_ADDR + 0x00) is typecasts to volatile unsigned long pointer. But (*(volatile unsigned long *)(PINSEL_BASE_ADDR + 0x00)) , what is for the starting star(dereferencing operator) after first bracket.