Re: Basic C question



int* ptr;
int i;

ptr = (int*)0xb0000000; // Memory mapped register for ADC reads.

i = *ptr;

The above patch of code should do what you need.

T.


eeh wrote:
> Hi,
>
> I am a beginner to use C in TI C6000 series dsp. I have a very basic
> question:
>
> I want to read the AD converter value from address 0xc00000000. I have
> written the following statements but gets compilation error.
>
> unsigned int j;
> unsigned int *i;
> i=0xb0000000;//adc
> for(;;)
> {
> j=*i;
> }
>
> error: a value of type "unsigned int" cannot be assigned to an entity
> of type "unsigned int *"
>
> Why?
>
> Thanks!

.



Relevant Pages