|
发表于 2021-3-8 13:45:09
只看该作者
8#
楼主说的应该是这段代码,看到源码中写死了。
- static int rk32_mipi_dsi_read_dcs_packet(void *arg, unsigned char *data1, u32 n)
- {
- struct dsi *dsi = arg;
- unsigned char regs[2];
- u32 data = 0;
- int type = 0x06;
- regs[0] = LPDT;
- regs[1] = 0x0a;
- n = n - 1;
- rk32_dsi_set_bits(dsi, regs[0], dcs_sr_0p_tx);
- /*
- if(type == DTYPE_GEN_SWRITE_0P)
- data = (dsi->vid << 6) | (n << 4) | type;
- else
- data = (dsi->vid << 6) | ((n-1) << 4) | type;
- */
- data |= regs[1] << 8 | type;
- printk("write GEN_HDR:%08x\n", data);
- rk32_dsi_set_bits(dsi, 0xFFFF, bta_to_cnt);
- rk32_dsi_set_bits(dsi, 1, bta_en);
- rk32_dsi_set_bits(dsi, data, GEN_HDR);
- udelay(20);
- printk("rk32_mipi_dsi_read_dcs_packet==0x%x\n", rk32_dsi_get_bits(dsi, GEN_PLD_DATA));
- rk32_dsi_set_bits(dsi, 0, bta_en);
- return 0;
- }
复制代码 |
|