Micom_Electric/GLCD_CLCD_TFT 2012. 1. 22. 17:13
윤덕용 교수님 GLCD  라이브러리에 비트맵 기능 추가

비트맵을 h 화일로 변환은 Image2GLCD을 사용하고 옵션은
LBS to MSB top to Bottom 로 할것

- 주석은 무시할 것
// ----------------------------------------------------------------------------
void GLCD_xy_pix(unsigned char cols, unsigned char rows){
unsigned char signal;
if((cols/8) <= 7) // if y <= 7, CS1
signal = 0x40;
else // if y >= 8, CS2
signal = 0x80;
GLCD_command(signal, 0xB8 + (rows/8));
if(cols < 64) GLCD_command(signal,0x40 + cols);
else GLCD_command(signal,0x40 + (cols - 64));

}
// ----------------------------------------------------------------------------
void GLCD_Bitmap(
char * bmp, unsigned char x, unsigned char y, unsigned char dx, unsigned char dy)
{

unsigned char i, j, signal;
for(j = 0; j < 8; j++){
for(i = 0; i < dx; i++){
GLCD_xy_pix(x + i, y + j*8); // display upper row
if(i < 64) // if y <= 7, CS1
signal = 0x40;
else // if y >= 8, CS2
signal = 0x80;
GLCD_data(signal,pgm_read_byte(bmp++));
}
}
}
// ----------------------------------------------------------------------------


posted by 털보네i
: