/********************************************************************* * * 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; LCD_X_SETORG_INFO * pSetOrg; (void) LayerIndex; 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... // // ... _InitController(0); return 0; case LCD_X_SETORG: // // Required for setting the display origin which is passed in the 'xPos' and 'yPos' element of p // pSetOrg = (LCD_X_SETORG_INFO *)pData; _SetDisplayOrigin(pSetOrg->xPos, pSetOrg->yPos); return 0; default: r = -1; } return r; }
/********************************************************************* * * 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; LCD_X_SETORG_INFO * pSetOrg; (void) LayerIndex; switch (Cmd) { // // Required // case LCD_X_INITCONTROLLER: _InitController(0); return 0; case LCD_X_SETORG: pSetOrg = (LCD_X_SETORG_INFO *)pData; _SetDisplayOrigin(pSetOrg->xPos, pSetOrg->yPos); return 0; default: r = -1; } return r; }