I bought an ILI9488 module recently, and it took me a few hours to make it work with uGFX. I think I found a bug in the ILI9488 driver. The driver uses this command the set the RGB565 mode:
write_index(g, 0x3A);
write_data(g, 0x55);
This mode requires two bytes per pixel, but the gdisp_lld_write_color() function calls write_data() only once. Everywhere else the driver expects write_data() to send only the lower byte to the controller, as in the example above. However, gdisp_lld_write_color() assumes that write_data() would transmit both bytes of the 16-bit data.
There is no way to implement write_data() so that it would send either one byte or two bytes, depending on the context. Well, there might be a way, but it would be ugly.
I would expect gdisp_lld_write_color to call write_data16(), as ILI9341 driver does. Ideally, I'd prefer to be able to implement write_data16() myself in the board file, as it could be done a bit more efficiently than just calling write_data() twice. Or, even better, to remove the assumption about the color mode, the board file could implement these two functions:
static GFXINLINE void write_byte(GDisplay *g, gU8 data);
static GFXINLINE void write_pixel(GDisplay *g, gColor pixel);
This would allow support for 18bits/pixel and 24bits/pixel as well.
What do you think?