STM32F407上移植emwin
本文博客链接:http://blog.csdn.net/jdh99,作者:jdh,转载请注明.
环境:
主机:WIN8
开发环境:MDK5.13
emwin版本:STemWinLibrary522
mcu: stm32f407VGT6
开发板:安富莱STM32-X3
TFT型号:艾蓝2.8寸TFT,主控芯片:ILI9325
说明:
在STM32F407上移植emwin,驱动屏幕接口为FSMC
移植步骤:
1.MDK新建文件结构:
2.GUIConf.c文件修改
a)增加宏定义:
#define GUI_NUMBYTES (1024 * 80)#define GUI_BLOCKSIZE 0x80
b)GUI_X_Config(void)函数中增加语句:
GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE);
修改后:
/*********************************************************************** GUI_X_Config** Purpose:* Called during the initialization process in order to set up the* available memory for the GUI.*/void GUI_X_Config(void) { // // 32 bit aligned memory area // static U32 aMemory[GUI_NUMBYTES / 4]; // // Assign memory to emWin // GUI_ALLOC_AssignMemory(aMemory, GUI_NUMBYTES); GUI_ALLOC_SetAvBlockSize(GUI_BLOCKSIZE); //<