IPC@CHIP® Graphics Library – API Documentation

Header image

Main page


GcErrorCode gcInit ( BOOL  doubleBuffering,
unsigned short  screenWidth,
unsigned short  screenHeight,
const GcInitParams params 
)

This function initialises as well the graphics library as the graphics controller. It must be called before any other graphics library function. Note that the behaviour of other graphics library functions is undefined, if the initialisation is omitted.

Parameters:
doubleBuffering Indicates whether double buffering it to be used. Double buffering reduces visible artifacts from the drawing process. Two frame buffers are used alternately. While one buffer is shown on the display, the other is drawn on to prepare the next frame.
screenWidth Width of the connected screen in pixels
screenHeight Height of the connected screen in pixels
params Initialisation parameters for the graphics controller. See the type GcInitParams for details.
Returns:
One of the following error codes is returned:
Example:
GcInitParamsGc01 initParams;  // Initialization parameters (GC01 specific version)
GcErrorCode result;           // Result of gcInit()


// Fill the initialization parameter structure
initParams.controllerType     = GC_CONTROLLER_TYPE_GC01;
initParams.structVer          = 1;
initParams.hSync              = ...  // Anything else is display dependant

// Call gcInit()
result = gcInit(TRUE,                          // Double buffering is enabled.
                MY_SCREEN_WIDTH,               // Screen width is a constant.
                MY_SCREEN_HEIGHT,              // Screen height is a constant. 
                (GcInitParams *)&initParams);  // Cast the initialization
                                               // parameters to the type expected
                                               // by gcInit().

// Check the result
if(result != GC_ERROR_NO)
  ;  // Error handling goes here
Since:
1.00
Targets:

GC01

GC04

X

X

See also:
gcDeinit
Examples:
example00.c.





Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Tue Jun 27 14:21:34 2017 by Doxygen 1.6.1