/* ********************************************************************************************************* * 函 数 名: BSP_Init * 功能说明: 初始化CPU时钟、按键和LED灯GPIO、设置systick中断。这个函数由应用程序调用。 * 形 参:无 * 返 回 值: 无 ********************************************************************************************************* */ void BSP_Init (void) { bsp_InitLed(); /* 初始化LED的GPIO */ bsp_InitLCD(); bsp_InitTouch(); SysTick_Config(BSP_CPU_ClkFreq() / OS_TICKS_PER_SEC); }
/********************************************************************* * * LCD_X_DisplayDriver * * Function description: * 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; (void) LayerIndex; (void) pData; switch (Cmd) { 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... // // ... bsp_InitLCD(); //modify by fire return 0; } default: r = -1; } return r; }