I would define the 0xfffff00 somewhere else (and make it intuitive) so that if you do change hardware configuration, you can just change the definition section and the code will compil and run correctly.
Use the set and clear registers whenever you can. They are much 'safer'. You should only use the direct GPIO if you really need to, and it's slower if you are just doing this basic set or clear.
It depends on how the program logic is working, but either:
SET_PORTA_REGISTER = BIT8;
or SET_PORTA_REGISTER = 0x01 << 8;
If you are clearing, just change it to the clear register.
If it's single pin operations, I usually define my pins like this:
I'm not reading your code that closely, but if it's like the SAM7, I see two problems here. One is that the read register is totally different from the GPIO setting register. On the SAM7 it's called the Pin Data Status Register. You might want to look for the equivelant on the LPC. Also, if it's the same, the peripheral clock needs to be enabled in order to use inputs at all.
Ya, mine definitely works differently. I have an Output Data Status Register with what I'm currently telling it to output for the output lines, and a Pin Data Status Register with the input values.
I can see, I screwed up with one of your previous questions as well. Looks like you were asking about changing the data direction of a pin. I thought you meant setting the output on/off.
Ok i think i got it now lol i tried it on button and works nicely... First i was using char instead of long for a pin so causing a overflow type thing....
also i made a function to read a single pin... works nice i think...
Ya, mine definitely works differently. I have an Output Data Status Register with what I'm currently telling it to output for the output lines, and a Pin Data Status Register with the input values.
not sure how your program or the controller works, but isn't RS the same as DI (Data or instruction)? pin P0.8 (GLCD_RS) isn't connected to anything, though it is defined to pin 8 - DI is on pin 11. so maybe you change RS to pin 11 too or fix the program for the inconsistency.
otherwise, try to step through ClearScreen() to see what's going on.
Ill try to step through it but RS and DI are the same. My GLCD is using DI not RS. That RS was meant to be RST (reset) i ended up tie-ing it to VCC. i just forgot to take that out but it doesnt affect anything i think
looks like it is writing to the lcd, except that it does so every other page. what if you hardwire y=0 or y=1 in the clearscreen() and see what happens.
by the way, y should go to 127 (columns), not 64 (rows).