?? uglinit.h
字號(hào):
/* uglInit.h - UGL configuration file */
/* Copyright 2000 Wind River Systems, Inc. All Rights Reserved */
/*
modification history
--------------------
01i,10nov00,jlb Change INCLUDE_UGL_BMF_UNICODE to INCLUDE_UGL_UNICODE
01h,20oct00,jlb Adjusted default configuration to be a legal configuration
01g,13oct00,jlb Removed IDT9510 special compile
01f,15sep00,rfm Changed default memory size from 0x8000 to 0x100000
01e,14sep00,jlb Added memory pool as configuration item
01d,08sep00,jlb Added powerPC CHRP/PRep memory model
01c,30aug00,gav Added PPC 821.
01b,15aug00,jlb added SH Q2SD graphics device
01a,28jan00,jlb written
*/
/*
DESCRIPTION
This header file provides definitions to configure an WindML system when the
configuration mechanism is the command line. This file is typically not used
when the WindML configuration tool is used. The only instance when this file
is used when the WindML configuration tool is used is when default parameters
are not satisfactory. The default parameters are assigned at the end of this
file just prior to the inclusion of the uglDepend.h file.
To successfully configure WindML, requires that each of the following items be
configured:
\is
\i Graphics device
\i Input devices
\i Fonts
\i Audio
\ie
The first step to establishing an WindML configuration is to select the
device drivers that match the hardware configuration. To select the
device drivers that are to be used, define the appropriate INCLUDE_
driver statement. For example, to include the MediaGX graphics
device define the INCLUDE_MEDIAGX_GRAPHICS, as follows:
\cs
#define INCLUDE_MEDIAGX_GRAPHICS
\ce
All other graphics drivers must be undefined. The similar operation
should be performed for the keyboard, pointer, and audio,
After the device drivers are selected, then each of the selected device
drivers must be configured.
\sh Graphics Device
The characteristics of the graphics device and output display device needs to
be configured for frame buffer format, monitor dimensions, refresh
rate, and output device type. These characteristics vary among graphics
drivers. For a list of the capabilities for a particular graphics device,
please refer to the '*.txt' file within the 'h/ugl/driver/graphics/<device>'
directory.
The following items must be set up to configure the graphics device:
\is
\i Display dimensions (width and height)
The width and height of a display is provided in the number of pixels
\i Display Refresh rate
\i Output device type (flat panel type)
The output device type defaults to a CRT monitor if a flat panel type
is not selected.
\i Graphics color format
The graphics color format, called the frame buffer format, must be
defined.
\i Optional components
Optional graphics device components such as JPEG, Video, etc. can be
selected, as appropriate.
\ie
\sh Input Devices
WindML supports two general categories of input devices; keyboard and pointer.
A default set of device names are selected for the input devices, as follows:
\is
\i PC Keyboard - Default name is /sysKeyboard/0
\i PS-2 mouse - Default name is /sysMouse/0
\i Serial mouse - Default name is /tyCo/0
\i touchscreen - Default name is /touchScreen/0
\ie
These default names may be changed by defining the macros SYS_KEYBOARD_NAME
and SYS_POINTER_NAME at the end of this file (prior to the inclusion of the
header file <uglDepend.h>. For example, to change a Microsoft serial mouse
to use /tyCo/1, the following line should be added immediately before
the inclusion of uglDepend.h:
\cs
#define SYS_POINTER_NAME /tyCo/1
\ce
\sh Fonts
For any application that will use text, a font engine must be selected.
\sh Audio
To use audio, the audio channel on the audio board must be defined.
\sh Target specific requirements
Some target systems has to enable unique features for use of the WindML. It
is very rare for target specific features to be enabled. These are
typically required when the BSP for a target board is non-standard.
\sh Configuration Process
When a chosen configuration is not valid for the selected hardware, the
configuration process may override the specified configuration by selecting
default values. Please refer to the hardware device description in the readme
file for the applicable device in the 'h/ugl/driver/<type>/<device>'
directory.
\sh Adding a custom driver
A custom device driver (graphics, keyboard, or pointer) may be configured that
is not within the directory structure of WindML. A custom device driver requires
the following items to be defined for a graphics device:
\is
\i UGL_GRAPHICS_NAME
string defining the graphics device name
\i UGL_GRAPHICS_CREATE
name of the function to initialize the device
\i UGL_COLOR_DEPTH
depth of the frame buffer (8 or 16)
\i UGL_MODE_FLAGS
type of frame buffer (UGL_MODE_DIRECT_COLOR or UGL_MODE_INDEXED_COLOR)
\i UGL_GRAPHICS_INSTANCE
defines the occurrence of the graphics device. For PCI type devices
this is typically the location on the PCI bus with 0 being the
first device. For other devices this may indicate the physical
address of the graphics device. An then other graphics devices may not
use this parameter.
\i UGL_GRAPHICS_IRQ
specifies the interrupt request level. For most graphics devices this
parameter is not used.
\i UGL_GRAPHICS_VECTOR
specifies the interrupt vector number.For most graphics devices this
parameter is not used.
\ie
When adding a custom keyboard device, the following parameters must be
defined:
\is
\i SYS_KEYBOARD_CREATE
specifies the name of the function that creates the keyboard device
driver. This parameter is not defined if the keyboard device is
previously created by VxWorks (as is the case with the serial devices
/tyCo/0, /tyCo/1 ....)
\i UGL_KEYBOARD_INIT
name of the function to initialize the keyboard device and to hook
it into the UGL event services
\i SYS_KEYBOARD_NAME
name of the keyboard device
\ie
When adding a custom pointer device, the following parameters must be
defined:
\is
\i SYS_POINTER_CREATE
specifies the name of the function that creates the pointer device
driver. This parameter is not defined if the pointer device is
previously created by VxWorks (as is the case with the serial devices
/tyCo/0, /tyCo/1 ....)
\i UGL_POINTER_INIT
name of the function to initialize the pointer device and to hook
it into the UGL event services
\i SYS_POINTER_NAME
name of the pointer device
\ie
The file <h/ugl/config/uglTemplateCustom.h> provides an example of defining
these parameters. To add a custom driver, the steps required are:
\ml
\m 1. Copy the uglTemplateCustom.h file to the another file to use as a
basis for the custom driver definition.
\m 2. Make the necessary changes to the file to reflect the custom driver.
\m 3. Define the appropriate INCUDE_CUSTOM_.. definitions to reflect
the custom device drivers.
\m 4. Define UGL_CUSTOM_DRIVER_DEFS to reference the custom driver header
file.
\m 4. Build WindML
\me
*/
#ifndef __INCuglinith
#define __INCuglinith
#if __cplusplus
extern "C" {
#endif
#include <ugl/uglclr.h>
#ifndef CONFIG_TOOL
/******************************************************************
Select the device drivers to include in system
*******************************************************************/
#ifndef BUILD_DRIVER
/* Specify the graphics device to use (Select 1) */
#undef INCLUDE_BIOS_GRAPHICS
#undef INCLUDE_CHIPS_GRAPHICS
#undef INCLUDE_CUSTOM_GRAPHICS /* User defined graphics device */
#undef INCLUDE_IGS_GRAPHICS
#undef INCLUDE_MEDIAGX_GRAPHICS
#undef INCLUDE_SA11XX_GRAPHICS
#undef INCLUDE_SIMULATOR_GRAPHICS
#undef INCLUDE_Q2SD_GRAPHICS
#undef INCLUDE_M821_GRAPHICS
#define INCLUDE_VGA_GRAPHICS
/* Specify the keyboard type (Select 1) */
#define INCLUDE_PC_AT_KEYBOARD /* Standard PC AT style */
#undef INCLUDE_CUSTOM_KEYBOARD /* User defined keyboard device */
#undef INCLUDE_SIMULATOR_KEYBOARD /* Simulator keyboard device */
/* Specify the type of pointer device (Select 1) */
#undef INCLUDE_ASSABET_POINTER /* Assabet touchscreen */
#undef INCLUDE_CUSTOM_POINTER /* User defined pointer device */
#undef INCLUDE_MS_POINTER /* Microsoft serial mouse */
#define INCLUDE_PS2_POINTER /* PS-2 type mouse */
#undef INCLUDE_SIMULATOR_POINTER /* Simulator pointer device */
/* Specify the audio hardware device (Select 1) */
#undef INCLUDE_IGS_AUDIO
#undef INCLUDE_CUSTOM_AUDIO /* User defined audio device */
/* Specify the font engine (Select 1) */
#define INCLUDE_BMF_FONTS
#undef INCLUDE_AGFA_FONTS
#endif /* BUILD_DRIVER */
/******************************************************************
Define configuration of the keyboard device
*******************************************************************/
/* Specify the keyboard key mapping (Select 1) */
#define INCLUDE_KMAP_ENGLISH_US
#undef INCLUDE_KMAP_ENGLISH_UK
#undef INCLUDE_KMAP_GERMAN
#undef INCLUDE_KMAP_ITALIAN
#undef INCLUDE_KMAP_FRENCH
#undef INCLUDE_KMAP_SWEDISH
#undef INCLUDE_KMAP_NONE
/******************************************************************
Define configuration of the output device
*******************************************************************/
/*
* Specify characteristics of the display
*/
#define UGL_DISPLAY_WIDTH 640
#define UGL_DISPLAY_HEIGHT 480
#define UGL_REFRESH_RATE 60
/*
* When using a flat panel, select the flat panel type
* (Defaults to a CRT monitor)
*/
#undef INCLUDE_UGL_KYOCERA_KCS057QV1AA /* Passive, 320x240x8 */
#undef INCLUDE_UGL_SHARP_LM9V385 /* Dual panel passive, 640x480x8 */
#undef INCLUDE_UGL_SHARP_LQ039Q2DS01 /* TFT, 320x240x(8 or 16) */
/*
* Specify the frame buffer format (Select 1)
*/
#undef INCLUDE_UGL_MONO
#undef INCLUDE_UGL_GREYSCALE2
#undef INCLUDE_UGL_GRAYSCALE4
#undef INCLUDE_UGL_GRAYSCALE8
#define INCLUDE_UGL_INDEXED4
#undef INCLUDE_UGL_INDEXED8
#undef INCLUDE_UGL_ARGB4444
#undef INCLUDE_UGL_RGB565
#undef INCLUDE_UGL_ARGB8888
/*
* Select graphics driver optional components
*/
#undef INCLUDE_UGL_ALPHA /* Alpha blending */
#undef INCLUDE_UGL_DOUBLE_BUFFERING /* Double buffering */
#undef INCLUDE_UGL_JPEG /* JPEG extension */
#undef INCLUDE_UGL_OVERLAY /* Video overlay support */
#define INCLUDE_UGL_SW_CURSOR /* Software cursor */
#undef INCLUDE_UGL_VIDEO /* Video extension */
/******************************************************************
Define configuration for audio
*******************************************************************/
/*
* Specify the channel on the device to use for audio
*/
#define SOUND_CHANNEL 0
/******************************************************************
Define configuration for fonts
*******************************************************************/
/*** General font engine definitions ***/
/* Include Unicode fonts */
#define INCLUDE_UGL_UNICODE
/*** UGL Bitmap font engine specific definitions ***/
/* The BMF Glyph cache can be sized according to number of glyphs or
* number of bytes of memory with a separate memory pool. The final
* number of glyphs that are actually cachable is limited by the amount
* of memory in the memory pool. */
/* Size of cache */
#define BMF_FONT_GLYPH_CACHE_SIZE UGL_BMF_GLYPH_CACHE_SIZE_MAX
/* Memory pool to use for glyph cache */
#define BMF_FONT_GLYPH_CACHE_MEM_POOL UGL_DEFAULT_MEM_POOL_ID
/* Specific fonts that are to be used are defined within the file
* uglBmfCfg.c
*/
/******************************************************************
Define Memory pool configuration
*******************************************************************/
/* When INCLUDE_UGL_MEM_POOL is defined a private memory pool is
* used for all memory allocations within UGL. When not defined,
* the system memory pool is used for all allocations
*/
#undef INCLUDE_UGL_MEM_POOL
/* The size of the memory pool in bytes */
#define UGL_MEM_POOL_SIZE 0x100000
/******************************************************************
*
* Define miscellaneous items
*
* When the processor type is the powerPC, the memory model needs to
* be defined. When UGL_TARGET_CHRP is defined the Common Hardware
* Reference Platform (CHRP) is used. When UGL_TARGET_CHRP is not
* defined, then the PowerPC Reference Platform (PReP) memory model
* is used.
*
*/
#define UGL_TARGET_CHRP
/*
* Enable unique features for non-standard target boards
*/
/* Define the path and file name for a custom driver header file */
#define UGL_CUSTOM_DRIVER_DEFS "ugl/config/uglCustom.h"
#endif /* CONFIG_TOOL */
/* Add any configuration values that are to be overridden from the
* defaults here. Examples of items are size of the input event queue,
* name of the keyboard device, name of the pointer device, mechanism
* to access the keyboard/pointer, and memory management mechanism. Refer
* to the WindML documentation for a complete list of items that may be
* modified.
*
* Any definitions that are placed here are used whether the WindML is
* configured from the command line or by the WindML configuration tool.
*
*/
#include <ugl/config/uglDepend.h>
#endif /* __INCuglinith */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -