void UTFT::LCD_Write_DATA(char VH,char VL) { if (display_transfer_mode!=1) { sbi(P_RS, B_RS); LCD_Writ_Bus(VH,VL,display_transfer_mode); } else { #if defined(__MK20DX128__) || defined(__MK20DX256__) sbi(P_RS, B_RS); SPI0_SR |= SPI_SR_TCF; SPI0_PUSHR = VH; while (!(SPI0_SR & SPI_SR_TCF)); SPI0_SR |= SPI_SR_TCF; SPI0_PUSHR = VL; while (!(SPI0_SR & SPI_SR_TCF)); #else LCD_Writ_Bus(0x01,VH,display_transfer_mode); LCD_Writ_Bus(0x01,VL,display_transfer_mode); #endif } }
void UTFT::clrScr() { long i; cbi(P_CS, B_CS); clrXY(); if (display_transfer_mode!=1) sbi(P_RS, B_RS); if (display_transfer_mode==16) _fast_fill_16(0,0,((disp_x_size+1)*(disp_y_size+1))); else if (display_transfer_mode==8) _fast_fill_8(0,((disp_x_size+1)*(disp_y_size+1))); else { for (i=0; i<((disp_x_size+1)*(disp_y_size+1)); i++) { if (display_transfer_mode!=1) LCD_Writ_Bus(0,0,display_transfer_mode); else { LCD_Writ_Bus(1,0,display_transfer_mode); LCD_Writ_Bus(1,0,display_transfer_mode); } } } sbi(P_CS, B_CS); }
void UTFT::LCD_Write_DATA(char VL) { if (display_transfer_mode!=1) { sbi(P_RS, B_RS); LCD_Writ_Bus(0x00,VL,display_transfer_mode); } else LCD_Writ_Bus(0x01,VL,display_transfer_mode); }
void UTFT::LCD_Write_DATA(char VH,char VL) { sbi(P_RS, B_RS); LCD_Writ_Bus(VH,VL,display_transfer_mode); }
void UTFT::LCD_Write_COM(char VL) { cbi(P_RS, B_RS); LCD_Writ_Bus(0x00,VL,display_transfer_mode); }
void ITDB02::main_W_com_data(char com1,int dat1) { *P_RS &= ~B_RS; LCD_Writ_Bus(0x00,com1); *P_RS |= B_RS; LCD_Writ_Bus(dat1>>8,dat1); }
void LCD_Write_DATA(int VH,int VL){ fastWriteHigh(LCD_RS); LCD_Writ_Bus(VH,VL); }
void ITDB02::LCD_Write_DATA(char VH,char VL) { *P_RS |= B_RS; LCD_Writ_Bus(VH,VL); }
void Lcd_Write_Data(int Val) //发送数据-8位参数 { LCD_RS_1; LCD_Writ_Bus(Val); }
void Lcd_Write_Data(char VH,char VL) //发送数据-8位参数 -8 Transmit data parameters { LCD_RS=1; LCD_Writ_Bus(VH,VL); }
void Lcd_Write_Com(char VH,char VL) //发送命令-8位参数 { LCD_RS=0; LCD_Writ_Bus(VH,VL); }
void LCD_WR_REG(char da) { LCD_DC=0; LCD_Writ_Bus(da); }
void LCD_WR_DATA(int da) { LCD_DC=1; LCD_Writ_Bus(da>>8); LCD_Writ_Bus(da); }
void LCD_WR_DATA8(char da) //发送数据-8位参数 { LCD_DC=1; LCD_Writ_Bus(da); }
void LCD_WR_DATA8(char VH,char VL) //发送数据,8位参数 { SET_LCD_RS; LCD_Writ_Bus(VH,VL); }
void Lcd_Write_Com(int Val) //发送命令-8位参数 { LCD_RS_0; LCD_Writ_Bus(Val); }
void LCD_WRITE_CMD(char cmd){//8 bit LCD_DC = 0; LCD_Writ_Bus(cmd); }
void ITDB02::LCD_Write_COM(char VL) { *P_RS &= ~B_RS; LCD_Writ_Bus(0x00,VL); }
void LCD_WRITE_COM_DATA(char com_data){//8 bit LCD_DC = 1; LCD_Writ_Bus(com_data); }
void LCD_WRITE_DATA(int a){//16位数据,分两次,每次送8位 LCD_DC = 1; LCD_Writ_Bus(a>>8); LCD_Writ_Bus(a); }
void LCD_Write_COM(int VH,int VL) { fastWriteLow(LCD_RS); LCD_Writ_Bus(VH,VL); }