/* Displays a bitmap picture loaded in the internal Flash.  */
void LCD_WriteBMP(uint32_t BmpAddress)
/* Displays a bitmap picture loaded in the internal Flash.  */
void LCD_WriteBMP(uint32_t BmpAddress)
{
  uint32_t index = 0, size = 0;
  size = *(__IO uint16_t *) (BmpAddress + 2);
  size |= (*(__IO uint16_t *) (BmpAddress + 4)) << 16;
  index = *(__IO uint16_t *) (BmpAddress + 10);
  index |= (*(__IO uint16_t *) (BmpAddress + 12)) << 16;
  size = (size - index)/2;
  BmpAddress += index;
  LCD_WriteReg(LCD_REG_3, 0x1008);
  LCD_WriteRAM_Prepare();
  for(index = 0; index < size; index++)
  {
    LCD_WriteRAM(*(__IO uint16_t *)BmpAddress);
    BmpAddress += 2;
  }
  LCD_WriteReg(LCD_REG_3, 0x1018);
}