lcm_get_params 里的参数如何配置?
params->type = LCM_TYPE_DBI;
params->ctrl = LCM_CTRL_PARALLEL_DBI;
params->width = FRAME_WIDTH;
params->height = FRAME_HEIGHT;
params->io_select_mode= 1;
params->dbi.port = 0;
// params->dbi.clock_freq = LCM_DBI_CLOCK_FREQ_7M;
params->dbi.data_width = LCM_DBI_DATA_WIDTH_8BITS;
params->dbi.data_format.color_order = LCM_COLOR_ORDER_RGB;
params->dbi.data_format.trans_seq = LCM_DBI_TRANS_SEQ_LSB_FIRST;
params->dbi.data_format.padding = LCM_DBI_PADDING_ON_MSB;
params->dbi.data_format.format = LCM_DBI_FORMAT_RGB565;
params->dbi.data_format.width = LCM_DBI_DATA_WIDTH_16BITS;
params->dbi.cpu_write_bits = LCM_DBI_CPU_WRITE_32_BITS;
// params->dbi.io_driving_current = LCM_DRIVING_CURRENT_4MA;
params->dbi.parallel.write_setup = 1;
params->dbi.parallel.write_hold = 1;
params->dbi.parallel.write_wait = 3;
params->dbi.parallel.read_setup = 4;
params->dbi.parallel.read_hold = 0;
params->dbi.parallel.read_latency = 18;
params->dbi.parallel.wait_period = 1;
// params->dbi.parallel.cs_high_width = 1; //cycles of cs high level between each transfer
// enable tearing-free
params->dbi.te_mode = 0;
}
自己顶一下,有没有大神解释解释!
根据72 chip datasheet里面进行适配的,请查看datasheet寄存器:14012060 DBI_ROICON ,里面有对这些参数的详细描述。
并且需要注意,这里配置出来的格式,要和lcm的格式一致才行,如果不一致,lcm无法识别。
params->dbi.data_width = LCM_DBI_DATA_WIDTH_18BITS; //表示的是使用的parallel线的宽度。也就是你当前那有几根data line?
params->dbi.data_format.color_order = LCM_COLOR_ORDER_BGR; //表示的是每个pixel里面三种颜色的显示顺序,一般是使用LCM_COLOR_ORDER_RGB。
params->dbi.data_format.trans_seq = LCM_DBI_TRANS_SEQ_MSB_FIRST;//表示先传输每个pixel里面的MSB,也就是最重要的一个bit。
params->dbi.data_format.padding = LCM_DBI_PADDING_ON_LSB;//表示使用LSB填充。
params->dbi.data_format.format = LCM_DBI_FORMAT_RGB565;//表示像素格式,RGB565表示使用5bit表示red,6bit表示green,5bit表示blue。
params->dbi.data_format.width = LCM_DBI_DATA_WIDTH_16BITS; //表示每个pixel传输使用多少个bit表示
params->dbi.cpu_write_bits = LCM_DBI_CPU_WRITE_16_BITS;//每次写的有效位数。查一下你的lcm datasheet,如果寄存器是低8为有效的话,这里就配置成 LCM_DBI_CPU_WRITE_8_BITS
路过............
感谢,能不能也解释一下下面的参数
params->dbi.parallel.write_setup = 1;
params->dbi.parallel.write_hold = 1;
params->dbi.parallel.write_wait = 3;
params->dbi.parallel.read_setup = 4;
params->dbi.parallel.read_hold = 0;
params->dbi.parallel.read_latency = 18;
params->dbi.parallel.wait_period = 1;
这个是指屏的时序吧
这个要看屏的规格书,让FAE帮你调