/********************************************************************* * * LCD_X_Config * * Purpose: * Called during the initialization process in order to set up the * display driver configuration. */ void LCD_X_Config(void) { // // Set display driver and color conversion for 1st layer // GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER, COLOR_CONVERSION, 0, 0); // // Display driver configuration, required for Lin-driver // _InitController(0); LCD_SetPosEx (0, 0, 0); if (LCD_GetSwapXYEx(0)) { LCD_SetSizeEx (0, YSIZE_PHYS , XSIZE_PHYS); LCD_SetVSizeEx (0, VYSIZE_PHYS, VXSIZE_PHYS); } else { LCD_SetSizeEx (0, XSIZE_PHYS , YSIZE_PHYS); LCD_SetVSizeEx (0, VXSIZE_PHYS, VYSIZE_PHYS); } LCD_SetVRAMAddrEx(0, (void*)VRAM_ADDR_VIRT); // // Set user palette data (only required if no fixed palette is used) // #if defined(PALETTE) LCD_SetLUTEx(0, PALETTE); #endif }
/********************************************************************* * * LCD_X_Config * * Purpose: * Called during the initialization process in order to set up the * display driver configuration. * */ void LCD_X_Config(void) { int i, BitsPerPixel; U32 Addr; // // Video RAM start address. // // This address is only required for display drivers with memory // mapped video RAM like the LIN_xxx driver. It does not need to // be adapted for display controllers with a simple bus interface. // Addr = 0x12345678; // // Display driver configuration // for (i = 0; i < GUI_COUNTOF(_aConfigPara); i++) { // // Set display driver and color conversion for 1st layer // GUI_DEVICE_CreateAndLink(_aConfigPara[i].pDisplayDriver, _aConfigPara[i].pColorConv, 0, i); // // Display driver configuration // LCD_SetPosEx (i, _aConfigPara[i].xPos, _aConfigPara[i].yPos); LCD_SetSizeEx (i, _aConfigPara[i].xSize, _aConfigPara[i].ySize); LCD_SetVSizeEx (i, _aConfigPara[i].vxSize, _aConfigPara[i].vySize); LCD_SetVRAMAddrEx(i, (void *)Addr); LCD_SetVisEx (i, 1); // // Set user palette data (only required if no fixed palette is used) // if (_aConfigPara[i].pPalette) { LCD_SetLUTEx(i, _aConfigPara[i].pPalette); } // // Calculate video RAM address for the following layer // BitsPerPixel = LCD_GetBitsPerPixelEx(i); Addr += ((_aConfigPara[i].vxSize * BitsPerPixel) * _aConfigPara[i].vySize) / 8; } }