We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi friends,
I don't know what is the exact meaning of the expresion (->) in Keil? thanks for any idea.
The same as in bog standard C.
The following code is a part of example for lpc1768 in keil. if you could please describe me this code:
LPC_PINCON->PINSEL1 &= ~(3<<18); /* P0.25 is GPIO
Have you programmed with pointers before? If not, it might be an idea to take a look in some programming book - in this case, the code uses a pointer to a struct.
LPC_PINCON is a pointer to a structure. PINSEL1 is a member of it.
The comment ain't too clever either!
GET A BOOK ON C!
I had not heard about pointer to a structure. Thanks for your advise.
A pointer can point to an int. Or a char. Or a struct. Or a float. Or a function. It doesn't really care - in the general case it can point to anything that can have an address. Note that some architectures have limitations because of non-uniform addressing of the memory.
Oh dear!
In that case, as already noted, you really need to spend some time with some good 'C' textbooks...
Here's some resources: blog.antronics.co.uk/.../