Page 845 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 845

void GLCD_drawChar(unsigned int x, unsigned int y, unsigned short *c) {         //문자그리기
               unsigned int index = 0;
               int  i = 0;
               unsigned int Xaddress = 0;

               Xaddress = x;
               LCD_SetCursor(Xaddress,y);


               for(index = 0; index < 24; index++)
               {
                     Clr_Cs;
                 wr_cmd(0x22);              /* Prepare to write GRAM */
                 for(i = 15; i >= 0; i--)
             //    for(i = 0; i < 16; i++)
                 {
                   if((c[index] & (1 << i)) == 0x00) {
                     wr_dat(BackColor);
                   } else {
                     wr_dat(TextColor);
                   }
                 }
                     Set_Cs;
                 Xaddress++;
               LCD_SetCursor(Xaddress,y);
               }
             }


             void GLCD_displayChar(unsigned int ln, unsigned int col, unsigned char  c) {            / / 문
             자  쓰기
               c -= 32;
               GLCD_drawChar(ln, col, &ASCII_Table[c * 24]);
             }


             void GLCD_displayStringLn(unsigned int ln, unsigned char *s) {          //문장  쓰기
               unsigned int i = 0;
               unsigned int refcolumn = (WIDTH/*-1*/)-16;


               while ((*s != 0) & (i < 20))                   /* write the string character by
             character on lCD */
               {



                                                         -  838  -
   840   841   842   843   844   845   846   847   848   849   850