/*********************************************************************
* SEGGER Microcontroller GmbH & Co. KG *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2015 SEGGER Microcontroller GmbH & Co. KG *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V5.28 - Graphical user interface for embedded applications **
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with a license and should not be re-
distributed in any way. We appreciate your understanding and fairness.
----------------------------------------------------------------------
File : LCDConf.c
Purpose : Display controller configuration (single layer)
---------------------------END-OF-HEADER------------------------------
*/
#include "GUI.h"
/*********************************************************************
*
* Layer configuration (to be modified)
*
**********************************************************************
*/
//
// Physical display size
//
#define XSIZE_PHYS 320
#define YSIZE_PHYS 240
#define VYSIZE_PHYS (YSIZE_PHYS << 1)
//
// Color conversion
//
#define COLOR_CONVERSION GUICC_888
//
// Display driver
//
#define DISPLAY_DRIVER GUIDRV_WIN32
/*********************************************************************
*
* Configuration checking
*
**********************************************************************
*/
#ifndef VXSIZE_PHYS
#define VXSIZE_PHYS XSIZE_PHYS
#endif
#ifndef VYSIZE_PHYS
#define VYSIZE_PHYS YSIZE_PHYS
#endif
#ifndef VRAM_ADDR
#define VRAM_ADDR 0
#endif
#ifndef XSIZE_PHYS
#error Physical X size of display is not defined!
#endif
#ifndef YSIZE_PHYS
#error Physical Y size of display is not defined!
#endif
#ifndef COLOR_CONVERSION
#error Color conversion not defined!
#endif
#ifndef DISPLAY_DRIVER
#error No display driver defined!
#endif
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* 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
//
LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS);
LCD_SetVSizeEx (0, VXSIZE_PHYS, VYSIZE_PHYS);
LCD_SetVRAMAddrEx(0, (void *)VRAM_ADDR);
//
// Set user palette data (only required if no fixed palette is used)
//
#if defined(PALETTE)
LCD_SetLUTEx(0, PALETTE);
#endif
}
/*********************************************************************
*
* LCD_X_DisplayDriver
*
* Purpose:
* This function is called by the display driver for several purposes.
* To support the according task the routine needs to be adapted to
* the display controller. Please note that the commands marked with
* 'optional' are not cogently required and should only be adapted if
* the display controller supports these features.
*
* Parameter:
* LayerIndex - Index of layer to be configured
* Cmd - Please refer to the details in the switch statement below
* pData - Pointer to a LCD_X_DATA structure
*
* Return Value:
* < -1 - Error
* -1 - Command not handled
* 0 - Ok
*/
int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * pData) {
int r;
switch (Cmd) {
//
// Required
//
case LCD_X_INITCONTROLLER: {
//
// Called during the initialization process in order to set up the
// display controller and put it into operation. If the display
// controller is not initialized by any external routine this needs
// to be adapted by the customer...
//
// ...
return 0;
}
case LCD_X_SETVRAMADDR: {
//
// Required for setting the address of the video RAM for drivers
// with memory mapped video RAM which is passed in the 'pVRAM' element of p
//
LCD_X_SETVRAMADDR_INFO * p;
p = (LCD_X_SETVRAMADDR_INFO *)pData;
//...
return 0;
}
case LCD_X_SETORG: {
//
// Required for setting the display origin which is passed in the 'xPos' and 'yPos' element of p
//
LCD_X_SETORG_INFO * p;
p = (LCD_X_SETORG_INFO *)pData;
//...
return 0;
}
case LCD_X_SETLUTENTRY: {
//
// Required for setting a lookup table entry which is passed in the 'Pos' and 'Color' element of p
//
LCD_X_SETLUTENTRY_INFO * p;
p = (LCD_X_SETLUTENTRY_INFO *)pData;
//...
return 0;
}
case LCD_X_ON: {
//
// Required if the display controller should support switching on and off
//
return 0;
}
case LCD_X_OFF: {
//
// Required if the display controller should support switching on and off
//
// ...
return 0;
}
default:
r = -1;
}
return r;
}
/*************************** End of file ****************************/
没有合适的资源?快使用搜索试试~ 我知道了~
emWin多界面切换程序
共133个文件
h:85个
o:10个
exe:10个
需积分: 50 93 下载量 120 浏览量
2018-11-21
00:27:35
上传
评论 5
收藏 4.26MB RAR 举报
温馨提示
SeggerEval_WIN32_MSVC_MinGW_GUI_V528_002多个页面窗口切换
资源推荐
资源详情
资源评论
收起资源包目录
emWin多界面切换程序 (133个子文件)
GUI.a 3.39MB
GUISim.a 218KB
CleanUp.bat 478B
LCDConf.c 6KB
FramewinDLG0.c 3KB
FramewinDLG2.c 3KB
FramewinDLG1.c 3KB
GUIConf.c 2KB
FramewinDLG3.c 2KB
WinMain.c 2KB
SIMConf.c 2KB
GUIDEMO_Start.c 640B
SimulationTrial.cbp 7KB
SimulationTrial.cscope_file_list 7KB
SimulationTrial.depend 40KB
SimulationTrial.dsp 35KB
SimulationTrial.dsw 553B
emWinSPY.exe 3.23MB
GUIBuilder.exe 1.04MB
GUISimulationDebug.exe 630KB
SetupFontCvtDemo_V530.exe 414KB
BmpCvt.exe 308KB
emVNC.exe 124KB
emWinView.exe 108KB
JPEG2Movie.exe 80KB
Bin2C.exe 76KB
U2C.exe 76KB
SimulationTrial.vcxproj.filters 42KB
GUI.h 89KB
WM.h 32KB
LCD.h 29KB
GUI_Private.h 28KB
GUI_Type.h 21KB
GUI_SetOrientationCX.h 18KB
WIDGET.h 14KB
FRAMEWIN.h 11KB
LISTVIEW.h 11KB
MENU.h 10KB
GUI_JPEG_Private.h 10KB
WM_Intern.h 10KB
MULTIPAGE.h 10KB
TREEVIEW.h 9KB
LISTBOX.h 9KB
BUTTON.h 9KB
HEADER.h 9KB
GRAPH.h 9KB
DROPDOWN.h 8KB
EDIT.h 8KB
CHECKBOX.h 8KB
LCD_SIM.h 7KB
GUI_Debug.h 7KB
SPINBOX.h 7KB
FRAMEWIN_Private.h 7KB
LISTVIEW_Private.h 7KB
SCROLLBAR.h 7KB
RADIO.h 7KB
SLIDER.h 7KB
MULTIEDIT.h 7KB
LISTWHEEL.h 6KB
PROGBAR.h 6KB
MULTIPAGE_Private.h 6KB
ICONVIEW.h 6KB
MENU_Private.h 6KB
SPINBOX_Private.h 6KB
SIM.h 6KB
RADIO_Private.h 5KB
TEXT.h 5KB
SCROLLBAR_Private.h 5KB
CALENDAR.h 5KB
CHOOSEFILE.h 5KB
KNOB.h 5KB
IMAGE_Private.h 5KB
TREEVIEW_Private.h 5KB
CHECKBOX_Private.h 5KB
GRAPH_Private.h 5KB
GUI_ConfDefaults.h 5KB
GUI_GIF_Private.h 5KB
LISTBOX_Private.h 4KB
LISTWHEEL_Private.h 4KB
GUI_VNC.h 4KB
LCDSIM_Private.h 4KB
GUI_SIM_Win32.h 4KB
EDIT_Private.h 4KB
IMAGE.h 4KB
CHOOSECOLOR.h 4KB
DIALOG_Intern.h 4KB
DROPDOWN_Private.h 4KB
LCD_Protected.h 4KB
PROGBAR_Private.h 4KB
GUI_BMP_Private.h 4KB
HEADER_Private.h 4KB
ICONVIEW_Private.h 4KB
BUTTON_Private.h 4KB
SLIDER_Private.h 4KB
LCD_Private.h 3KB
GUI_FontIntern.h 3KB
DIALOG.h 3KB
KNOB_Private.h 3KB
GUI_ARRAY.h 3KB
TEXT_Private.h 3KB
共 133 条
- 1
- 2
资源评论
dailianchao
- 粉丝: 4
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功