/* Displays a bitmap picture loaded in the internal Flash.  */
void hx8347g_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
/* Displays a bitmap picture loaded in the internal Flash.  */
void hx8347g_DrawBitmap(uint16_t Xpos, uint16_t Ypos, uint8_t *pbmp)
{
  uint32_t index = 0, size = 0;
  size = *(volatile uint16_t *) (pbmp + 2);
  size |= (*(volatile uint16_t *) (pbmp + 4)) << 16;
  index = *(volatile uint16_t *) (pbmp + 10);
  index |= (*(volatile uint16_t *) (pbmp + 12)) << 16;
  size = (size - index)/2;
  pbmp += index;
  hx8347g_WriteReg(LCD_REG_22, 0xE0);
  hx8347g_SetCursor(Xpos, Ypos);
  LCD_IO_WriteReg(LCD_REG_34);
  LCD_IO_WriteMultipleData((uint8_t*)pbmp, size*2);
  hx8347g_WriteReg(LCD_REG_22, 0xA0);
}