Good afternoon everyone
I have written two functions to write data to a LCD screen.One writes a character and the other writes a string.
Is there any way i can combine them into a single function ,so that i don't have to use 2 separate functions to write a char and string?Code:void write(unsigned char z) { enable = 0; rs = 1; rw = 0; delay(9000); P10_OUT = z; delay(9000); enable = 1; } void str_write(char *buffer) { int i = 0; for(i=0; i<=(strlen(buffer)-1); i++) { if(i > 19) break; delay(100000); write(buffer[i]); } }
Something like:
uni_write('h') ==> should write h.
uni_write(str_Array) ==>should write contents of str_Array.
Thanks in advance