Angry Badger
Member
Hi,
Firstly, hope the thread title is not misleading (it probably is) but not sure how to title this question. I'm positioning a cursor on an LCD screen. Works ok, done it loads of times in previous programs. But trying to make the code a little 'neater / tighter'. This is what I have been doing thus far...
I might be mistaken but I think I've seen something like this somewhere that would be neater...
What's wrong with the second two code snippets? Any help greatly appreciated.
Thanks in advance.
Firstly, hope the thread title is not misleading (it probably is) but not sure how to title this question. I'm positioning a cursor on an LCD screen. Works ok, done it loads of times in previous programs. But trying to make the code a little 'neater / tighter'. This is what I have been doing thus far...
Code:
void LCD_data_init (void)
{
clrscrn();
csrpos = 0x8F;
putcsr();
Code:
void putcsr (void)
{
data2LCD = csrpos; //Line x Coloumn x
write2LCD();
}
Code:
putcsr(0x8f);
Code:
void putcsr (char)
{
data2LCD = putcsr; //Line x Coloumn x
write2LCD();
}
Thanks in advance.