Volatile issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Volatile issue

1,815 Views
jberri
Contributor II
I am trying to use the following documentation AN2616 and follow an example.  In the example they initialize the data direction register as such:
 
PTADD = 0;    //initialize as input (Data Direction Register) */
 
when I compile this I get an error saying the following
 
Error   : C1019: Incompatible type to previous declaration (found 'int ', expected 'PTAPESTR volatile ')
main.c line 9  
 
what is the proper way of doing this or am I missing something.
Labels (1)
0 Kudos
Reply
2 Replies

870 Views
CompilerGuru
NXP Employee
NXP Employee
Are you placing
>PTADD = 0;
inside of a function, inside of main?

Daniel
0 Kudos
Reply

870 Views
jberri
Contributor II
Daniel, you hit it on the dot.....  I had the code placed outside the main loop.  What I don't understand is, I thought it should have been outside the main.  Maybe I am thinking C++
Anyway, thank you so much.
0 Kudos
Reply