MTK LCD
时间:10-02
整理:3721RD
点击:
1.背光
uem_GPIO.c 文 件 里 custom_cfg_gpio_set_level ( ) -->PWM3_level(gpio_dev_level);
//cwd2013.4.22
2.显示
/*
描述: 写某个区域
输入: 无
输出: 无
*/
void LCD_BlockWrite_hx8347(kal_uint16 startx,kal_uint16 starty,kal_uint16 endx,kal_uint16
endy)
{
while (LCD_IS_RUNNING);
SET_LCD_CMD_PARAMETER(0,LCD_CMD,0x0002);
SET_LCD_CMD_PARAMETER(1,LCD_DATA,(startx>>8));
SET_LCD_CMD_PARAMETER(2,LCD_CMD,0x0003);
SET_LCD_CMD_PARAMETER(3,LCD_DATA,((startx&0x00FF)));
SET_LCD_CMD_PARAMETER(4,LCD_CMD,0x0004);
SET_LCD_CMD_PARAMETER(5,LCD_DATA,(endx>>8));
SET_LCD_CMD_PARAMETER(6,LCD_CMD,0x0005);
SET_LCD_CMD_PARAMETER(7,LCD_DATA,((endx&0x00FF)));
SET_LCD_CMD_PARAMETER(8,LCD_CMD,0x0006);
SET_LCD_CMD_PARAMETER(9,LCD_DATA,(starty>>8));
SET_LCD_CMD_PARAMETER(10,LCD_CMD,0x0007);
SET_LCD_CMD_PARAMETER(11,LCD_DATA,((starty&0x00FF)));
SET_LCD_CMD_PARAMETER(12,LCD_CMD,0x0008);
SET_LCD_CMD_PARAMETER(13,LCD_DATA,(endy>>8));
SET_LCD_CMD_PARAMETER(14,LCD_CMD,0x0009);
SET_LCD_CMD_PARAMETER(15,LCD_DATA,((endy&0x00FF)));
SET_LCD_CMD_PARAMETER(16,LCD_CMD,0x0022); //写数据到 lcd buf
SET_LCD_ROI_CTRL_NUMBER_OF_CMD(17); //表示上面有 17 个数据
ENABLE_LCD_TRANSFER_COMPLETE_INT; //使能发送完成中断
ENABLE_LCD_ROI_CTRL_CMD_FIRST;//
START_LCD_TRANSFER; //开始传输
//lcd_assert_fail = KAL_FALSE;
}
uem_GPIO.c 文 件 里 custom_cfg_gpio_set_level ( ) -->PWM3_level(gpio_dev_level);
//cwd2013.4.22
2.显示
/*
描述: 写某个区域
输入: 无
输出: 无
*/
void LCD_BlockWrite_hx8347(kal_uint16 startx,kal_uint16 starty,kal_uint16 endx,kal_uint16
endy)
{
while (LCD_IS_RUNNING);
SET_LCD_CMD_PARAMETER(0,LCD_CMD,0x0002);
SET_LCD_CMD_PARAMETER(1,LCD_DATA,(startx>>8));
SET_LCD_CMD_PARAMETER(2,LCD_CMD,0x0003);
SET_LCD_CMD_PARAMETER(3,LCD_DATA,((startx&0x00FF)));
SET_LCD_CMD_PARAMETER(4,LCD_CMD,0x0004);
SET_LCD_CMD_PARAMETER(5,LCD_DATA,(endx>>8));
SET_LCD_CMD_PARAMETER(6,LCD_CMD,0x0005);
SET_LCD_CMD_PARAMETER(7,LCD_DATA,((endx&0x00FF)));
SET_LCD_CMD_PARAMETER(8,LCD_CMD,0x0006);
SET_LCD_CMD_PARAMETER(9,LCD_DATA,(starty>>8));
SET_LCD_CMD_PARAMETER(10,LCD_CMD,0x0007);
SET_LCD_CMD_PARAMETER(11,LCD_DATA,((starty&0x00FF)));
SET_LCD_CMD_PARAMETER(12,LCD_CMD,0x0008);
SET_LCD_CMD_PARAMETER(13,LCD_DATA,(endy>>8));
SET_LCD_CMD_PARAMETER(14,LCD_CMD,0x0009);
SET_LCD_CMD_PARAMETER(15,LCD_DATA,((endy&0x00FF)));
SET_LCD_CMD_PARAMETER(16,LCD_CMD,0x0022); //写数据到 lcd buf
SET_LCD_ROI_CTRL_NUMBER_OF_CMD(17); //表示上面有 17 个数据
ENABLE_LCD_TRANSFER_COMPLETE_INT; //使能发送完成中断
ENABLE_LCD_ROI_CTRL_CMD_FIRST;//
START_LCD_TRANSFER; //开始传输
//lcd_assert_fail = KAL_FALSE;
}