相关代码 |
|
#ifndef _LCDInit_DEFINE #include "LCD.c" #endif void LCDPrint(BYTE locate,CHAR *text); void LCDPrint(BYTE locate,CHAR *text) { data BYTE i,j,m; bit flag; data BYTE length; length=strlen(text); LCD_WRITE_COMMAND(locate|0x80); for(i=0;i m=0; flag=(text[0] for(i=locate&0x07;(m { i++; LCD_WRITE_DATA(text[m++]); for(j=0;j if (text[m] flag=1; else { if (flag&&(i%2)) { LCD_WRITE_DATA(0x20); for(j=0;j i++; } flag=0; } } }