//------------------------------------------------------------------------------------------------- // //------------------------------------------------------------------------------------------------- void GLCD_WriteChar(char charToWrite) { int i; charToWrite -= 32; for(i = 0; i < 5; i++) GLCD_WriteData(GLCD_ReadByteFromROMMemory((char *)((int)font5x8 + (5 * charToWrite) + i))); GLCD_WriteData(0x00); }
void GLCD_WriteCharR(uint8_t charToWriteR) // ЗАПИСЬ СИМВОЛА В ПРАВЫЙ { int i; charToWriteR -= 32; for(i = 0; i < 5; i++) dataR(GLCD_ReadByteFromROMMemory((uint8_t *)((int)font5x8 + (5 * charToWriteR) + i))); dataR(0x00); }
void GLCD_WriteCharL(uint8_t charToWriteL) // ЗАПИСЬ СИМВОЛА В ЛЕВЫЙ { int i; charToWriteL -= 32; for(i = 0; i < 5; i++) dataL(GLCD_ReadByteFromROMMemory((uint8_t *)((int)font5x8 + (5 * charToWriteL) + i))); dataL(0x00); }
//------------------------------------------------------------------------------------------------- // //------------------------------------------------------------------------------------------------- void GLCD_Bitmap(char * bmp, unsigned char x, unsigned char y, unsigned char dx, unsigned char dy) { unsigned char i, j; for(j = 0; j < dy / 8; j++) { GLCD_GoTo(x,y + j); for(i = 0; i < dx; i++) GLCD_WriteData(GLCD_ReadByteFromROMMemory(bmp++)); } }
//----------------------- int GLCD_Write_farsi(char charToWrite) { //charToWrite -= 32; char bit_8; int i,ii=0; for(i = 0; i < 8; i++) { bit_8=GLCD_ReadByteFromROMMemory((char *)((int)farsi + (8 * charToWrite) + i)); if(bit_8 == 0x00) ii++; GLCD_WriteData(bit_8); } return (ii); }
void WriteBigChar(char num, char x_start, char y_start) { for (char i = 0; i < 6; i++) { GLCD_GoTo(x_start,(y_start + i)); for (char col_marker = 0; col_marker < 32; col_marker++) { GLCD_WriteData( GLCD_ReadByteFromROMMemory( (char *)((int)big_font + ((col_marker * 6) + (5 - i) + (num * 192))) ) ); } } }
//------------------------------------------------------------------------------------------------- // Writes INV char to screen memory //------------------------------------------------------------------------------------------------- void GLCD_WriteINVChar(char charToWrite) { char i; unsigned char t=0; charToWrite -= 32; for(i = 0; i < 5; i++) { t = GLCD_ReadByteFromROMMemory((char *)(font5x8 + (5 * charToWrite) + i)); GLCD_WriteData(~t); } GLCD_WriteData(0xFF); }
//----------------------- void GLCD_Write_font(char charToWrite) { int i; for(i = 0; i < 8; i++) GLCD_WriteData(GLCD_ReadByteFromROMMemory((char *)((int)font + (8 * charToWrite) + i))); }