问题
I came across the follow line of code:
#define ADCA (*(volatile ADC_t*)0x200)
It is for embedded C code for an AVR microcontroller. ADC_t
is a union.
I know that (volatile ADC_t*)0x200
its a pointer to an absolute memory address but I am still not quite sure what the first *
means.
回答1:
That first *
dereferences the pointer. In other words ADCA
is the contents of the memory at 0x200
.
来源:https://stackoverflow.com/questions/7522351/pointer-made-from-an-integer-in-c-on-an-embedded-platform