/* Read pixel from LCD RAM in RGB888 format.  */
static ST7789H2_Rgb888 ST7789H2_ReadPixel_rgb888(uint16_t Xpos, uint16_t Ypos)
/* Read pixel from LCD RAM in RGB888 format.  */
static ST7789H2_Rgb888 ST7789H2_ReadPixel_rgb888(uint16_t Xpos, uint16_t Ypos)
{
  ST7789H2_Rgb888 rgb888;
  uint16_t         rgb888_part1, rgb888_part2;
  ST7789H2_SetCursor(Xpos, Ypos);
  ST7789H2_WriteReg(ST7789H2_READ_RAM, (uint8_t*)NULL, 0);
  LCD_IO_ReadData();
  rgb888_part1 = LCD_IO_ReadData();
  rgb888_part2 = LCD_IO_ReadData();
  rgb888.red   = (rgb888_part1 & 0xFC00) >> 8;
  rgb888.green = (rgb888_part1 & 0x00FC) >> 0;
  rgb888.blue  = (rgb888_part2 & 0xFC00) >> 8;
  return rgb888;
}