Page 846 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 846
GLCD_displayChar(ln, refcolumn, *s); /* Display one character on LCD */
refcolumn -= 16; /* Decrement the column position by 16 */
s++; /* Point on the next character */
i++; /* Increment the character counter */
}
}
void GLCD_clearLn(unsigned int ln) { //지정 라인 클리어
GLCD_displayStringLn(ln, " ");
}
void GLCD_bitmap (unsigned int x, unsigned int y, unsigned int w, unsigned int h,
unsigned char *bitmap) {
unsigned int i;
unsigned int len = w*h;
unsigned short *bitmap_ptr = (unsigned short *)bitmap;
wr_reg(0x50, y); /* Horizontal GRAM Start Address*/
wr_reg(0x51, y+h-1); /* Horizontal GRAM End Address (-1) */
wr_reg(0x52, x); /* Vertical GRAM Start Address*/
wr_reg(0x53, x+w-1); /* Vertical GRAM End Address (-1) */
wr_reg(0x20, y);
wr_reg(0x21, x);
Clr_Cs;
wr_cmd(0x22);
for (i = 0; i < len; i++) {
wr_dat(*bitmap_ptr++);
}
Set_Cs;
}
void GLCD_Test(void)
{
u16 i,j;
wr_reg(0x20, 0);
wr_reg(0x21, 0);
Clr_Cs;
wr_cmd(0x22);
for(i=0;i<320;i++)
- 839 -