9G-STM32 EWARM开发过程简介之四
WriteCMD2(0x00,0x08,0x42);//设置显示图形首地址
WriteCMD2((FRAME_BUFFER_LENGTH/8),0x00,0x43);//设置图形显示区域宽度
WriteCMD0(0x98);//图形显示开
WriteCMD0(0x88);//设定显示方式,图形/文本或的方式
}
void STM32_T6963C_Clear(void)
{
unsigned int i;
WriteCMD2(0x00,0x00,0x24);
WriteCMD0(0xb0);
for(i=0;i<0x2000;i++)
{
WriteCMD1(0x00,0xc0);
}
WriteCMD0(0xb2);
}
//设定显示地址函数
static void LCD_Set_x_y(unsigned char x,unsigned char y,unsigned char mode)
{
unsigned int temp;
temp=(FRAME_BUFFER_LENGTH/8)*y + x/8;
if(mode==IMAGE)
{ //如果图形模式要加上图形区首地址0x0800
temp+=0x0800;
}
WriteCMD2(temp&0xff,temp/256,0x24);
}
void LCD_Paint_dot(unsigned char x,unsigned char y)
{
LCD_Set_x_y(x,y,IMAGE);
WriteCMD0(0xf8|(0x07&(~(x%8))));
}
void LCD_Clear_dot(unsigned char x,unsigned char y)
{
LCD_Set_x_y(x,y,IMAGE);
WriteCMD0(0xf0|(0x07&(~(x%8))));
}
void LCD_Paint_line_x(unsigned char y) //图形方式画一条线
{
unsigned char i;
LCD_Set_x_y(0,y,IMAGE);
for(i=0;i<(VISION_PIXEL_LENGTH/8);i++)
{
WriteCMD1(0xFF, 0xc0); //数据写地址不变
}
}
void LCD_Paint_line_y(unsigned char x)
{
unsigned char i;
for(i=0;i
LCD_Paint_dot(x,i);
}
}
/*
七,其它接口自行处理
*/
9G-STM32EWARM开发过 相关文章:
- 9G-STM32 EWARM开发过程简介之五(11-29)
- 9G-STM32 EWARM开发过程简介之三(11-29)
- 9G-STM32 EWARM开发过程简介之二(11-29)
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)