资源简介
icn6211是mipi转RGB的国产IC,价格合适,笔者已在高通平台上批量使用,支持较低分辨率,笔者使用的分辨率为320X240,效果较好,推荐使用
代码片段和文件信息
#ifdef BUILD_LK
#include
#else
#include
#endif
#ifdef BUILD_LK
#include
#include
#else
#include
#include
#include
#endif
#include “lcm_drv.h“
// ---------------------------------------------------------------------------
// Local Constants
// ---------------------------------------------------------------------------
#define frame_WIDTH (768)
#define frame_HEIGHT (1024)
#define LCM_DSI_CMD_MODE 0
// ---------------------------------------------------------------------------
// Local Variables
// ---------------------------------------------------------------------------
static LCM_UTIL_FUNCS lcm_util = {
.set_gpio_out = NULL
};
#define SET_RESET_PIN(v) (lcm_util.set_reset_pin((v)))
#define UDELAY(n) (lcm_util.udelay(n))
#define MDELAY(n) (lcm_util.mdelay(n))
// ---------------------------------------------------------------------------
// Local Functions
// ---------------------------------------------------------------------------
#define dsi_set_cmdq_V2(cmd count ppara force_update) lcm_util.dsi_set_cmdq_V2(cmd count ppara force_update)
#define dsi_set_cmdq(pdata queue_size force_update) lcm_util.dsi_set_cmdq(pdata queue_size force_update)
#define wrtie_cmd(cmd) lcm_util.dsi_write_cmd(cmd)
#define write_regs(addr pdata byte_nums) lcm_util.dsi_write_regs(addr pdata byte_nums)
#define read_reg lcm_util.dsi_read_reg()
#define read_reg_v2(cmd buffer buffer_size) lcm_util.dsi_dcs_read_lcm_reg_v2(cmd buffer buffer_size)
int mipi_transfer = 0;
struct LCM_setting_table {
unsigned cmd;
unsigned char count;
unsigned char para_list[64];
};
#define REGFLAG_DELAY 0xFE
#define REGFLAG_END_OF_TABLE 0xFF
#ifdef BUILD_LK
#define I2C_CH I2C0
#define MT8193_I2C_ADDR 0x5A
#endif
static void push_table(struct LCM_setting_table *table unsigned int count unsigned char force_update)
{
unsigned int i;
for(i = 0; i < count; i++)
{
unsigned cmd;
cmd = table[i].cmd;
switch (cmd)
{
case REGFLAG_DELAY :
MDELAY(table[i].count);
break;
case REGFLAG_END_OF_TABLE :
break;
default:
dsi_set_cmdq_V2(cmd table[i].count table[i].para_list force_update);
}
}
}
static void lcd_stb(unsigned char enabled){
if (enabled)
{
mt_set_gpio_out(GPIO_LCM_STB GPIO_OUT_ONE);
}
else
{
mt_set_gpio_out(GPIO_LCM_STB GPIO_OUT_ZERO);
}
}
static void lcd_power_en(unsigned char enabled)
{
if (enabled)
{
#ifdef BUILD_LK
/* VGP2_PMU 3V */
upmu_set_rg_vgp1_vosel(5);
upmu_set_rg_vgp1_en(1);
#else
hwPowerOn(MT6323_POWER_LDO_VGP1 VOL_2800 “LCM“);
#endif
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2942464 2017-03-03 20:48 ICN6211调试文档.doc
文件 685578 2017-03-03 20:48 ICN6211调试文档.pdf
文件 28817 2017-03-03 20:48 MIPI_RGB参考电路.pdf
文件 12519 2017-03-03 20:48 MTK_MIPI COMMAND.c
文件 11970 2017-03-03 20:48 R61526_qvga.c
文件 26197 2017-03-03 20:48 彩条.jpg
文件 62464 2017-03-03 20:48 ICN6211 Config.exe
----------- --------- ---------- ----- ----
3770009 7
评论
共有 条评论