I have 3.5" display with SPI interface and ili9488 driver. On first look is this chip similar to ili9341 (small differences in init sequence), but only on first look. Main difference is that this display do not support RGB565 mode over SPI. This display supports only RB666 mode (which is “stripped” RGB888 - 2 lowest bits from each color is not used), so each pixel has 3 bytes instead of 2 bytes in RGB565 mode.
So, there is my question… As a first try I used ili9341 driver from LVGL, changed init sequence and nothing happened, then I noticed problem with unsupported RGB565 mode. Solution should be change color mode from 16 bits to 24, but this is not supported in LVGL.
Another solution is rewrite each pixel before send. I identified relevant code:
def flush(): ... self.send_cmd(0x2C) size = (area.x2 - area.x1 + 1) * (area.y2 - area.y1 + 1) data_view = color_p.__dereference__(size * lv.color_t.SIZE) esp.get_ccount(self.end_time_ptr) if self.end_time_ptr.int_val > self.start_time_ptr.int_val: self.flush_acc_setup_cycles += self.end_time_ptr.int_val - self.start_time_ptr.int_val esp.get_ccount(self.start_time_ptr) self.send_data_dma(data_view)
So, I must change each pixel before sending. Do you have some tips how to do it fast and in correct way?