NXP to Offer emWin Graphic Library Free with ARM Microcontrollers(Segger GUIBu
NXP to Offer emWin Graphic Library Free with ARM Microcontrollershttp://www.nxp.com/news/content/file_1974.html
下载地址(GUI以库文件给出,包含GUIBuilder):
http://www.lpcware.com/content/page/put-your-lcd-expertise-display-contest-announcement
由于emWin和uC/GUI其实是一个东西,因而GUIBuilder应该是可以通用的.我觉得GUIBuilder用在uC/GUI 3.98上应该没问题.
其实这个GUIBuilder还是比较初级的,具体自己试用吧!
ourdev_682337EWPB4L.zip(文件大小:9.64M) (原文件名:NXP_emWin512_EA1788_320240_260911.zip) 不要期待像VC++的界面设计那样功能强大!
看一下生成的效果吧(简单的拖了几下):
(对比了一下http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=5084369&bbs_id=9999中网友开发的uCGUIBuilder生成的代码,应该uCGUIBuilder就是参考这个设计的.不过说实在的,uCGUIBuilder的界面还好看些!)
/*********************************************************************
* *
* SEGGER Microcontroller GmbH & Co. KG *
* Solutions for real time microcontroller applications *
* *
**********************************************************************
* *
* C-file generated by: *
* *
* GUI_Builder for emWin version 5.12 *
* Compiled Jun 29 2011, 15:28:47 *
* (c) 2011 Segger Microcontroller GmbH & Co. KG *
* *
**********************************************************************
* *
* Internet: www.segger.comSupport: support@segger.com *
* *
**********************************************************************
*/
// USER START (Optionally insert additional includes)
// USER END
#include "DIALOG.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#define ID_WINDOW_0 (GUI_ID_USER + 0x00)
#define ID_BUTTON_0 (GUI_ID_USER + 0x01)
#define ID_PROGBAR_0 (GUI_ID_USER + 0x03)
#define ID_LISTVIEW_0 (GUI_ID_USER + 0x05)
#define ID_CHECKBOX_0 (GUI_ID_USER + 0x06)
// USER START (Optionally insert additional defines)
// USER END
/*********************************************************************
*
* Static data
*
**********************************************************************
*/
// USER START (Optionally insert additional static data)
// USER END
/*********************************************************************
*
* _aDialogCreate
*/
static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
{ WINDOW_CreateIndirect, "Window", ID_WINDOW_0, 0, 0, 320, 240, 0, 0, 0 },
{ BUTTON_CreateIndirect, "Button", ID_BUTTON_0, 13, 168, 80, 20, 0, 0, 0 },
{ PROGBAR_CreateIndirect, "Progbar", ID_PROGBAR_0, 116, 126, 168, 20, 0, 0, 0 },
{ LISTVIEW_CreateIndirect, "Listview", ID_LISTVIEW_0, 0, 0, 140, 98, 0, 0, 0 },
{ CHECKBOX_CreateIndirect, "Checkbox", ID_CHECKBOX_0, 172, 57, 80, 20, 0, 0, 0 },
// USER START (Optionally insert additional widgets)
// USER END
};
/*********************************************************************
*
* Static code
*
**********************************************************************
*/
// USER START (Optionally insert additional static code)
// USER END
/*********************************************************************
*
* _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
WM_HWIN hItem;
int Id, NCode;
// USER START (Optionally insert additional variables)
// USER END
switch (pMsg->MsgId) {
case WM_INIT_DIALOG:
//
// Initialization of 'Button'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_BUTTON_0);
BUTTON_SetText(hItem, "Button");
//
// Initialization of 'Progbar'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_PROGBAR_0);
PROGBAR_SetFont(hItem, GUI_FONT_6X8);
//
// Initialization of 'Listview'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_LISTVIEW_0);
LISTVIEW_AddColumn(hItem, 30, "Col 0", GUI_TA_HCENTER | GUI_TA_VCENTER);
LISTVIEW_AddColumn(hItem, 30, "Col 1", GUI_TA_HCENTER | GUI_TA_VCENTER);
LISTVIEW_AddColumn(hItem, 30, "Col 2", GUI_TA_HCENTER | GUI_TA_VCENTER);
LISTVIEW_AddRow(hItem, NULL);
LISTVIEW_SetGridVis(hItem, 1);
//
// Initialization of 'Checkbox'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_CHECKBOX_0);
CHECKBOX_SetText(hItem, "Check");
// USER START (Optionally insert additional code for further widget initialization)
// USER END
break;
case WM_NOTIFY_PARENT:
Id = WM_GetId(pMsg->hWinSrc);
NCode = pMsg->Data.v;
switch(Id) {
case ID_BUTTON_0: // Notifications sent by 'Button'
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_RELEASED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
// USER START (Optionally insert additional code for further notification handling)
// USER END
}
break;
case ID_LISTVIEW_0: // Notifications sent by 'Listview'
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_RELEASED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_SEL_CHANGED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
// USER START (Optionally insert additional code for further notification handling)
// USER END
}
break;
case ID_CHECKBOX_0: // Notifications sent by 'Checkbox'
switch(NCode) {
case WM_NOTIFICATION_CLICKED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_RELEASED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
case WM_NOTIFICATION_VALUE_CHANGED:
// USER START (Optionally insert code for reacting on notification message)
// USER END
break;
// USER START (Optionally insert additional code for further notification handling)
// USER END
}
break;
// USER START (Optionally insert additional code for further Ids)
// USER END
}
break;
// USER START (Optionally insert additional message handling)
// USER END
default:
WM_DefaultProc(pMsg);
break;
}
}
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* CreateWindow
*/
WM_HWIN CreateWindow(void);
WM_HWIN CreateWindow(void) {
WM_HWIN hWin;
hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), &_cbDialog, WM_HBKWIN, 0, 0);
return hWin;
}
// USER START (Optionally insert additional public code)
// USER END
/*************************** End of file ****************************/ 另外,其中的GUI.lib库可能能用于所有ARMv7M的芯片,应该不仅仅局限于NXP的M3.
有兴趣的可以试一下. 好东西 很好 好东西,下载下来 支持。。。研究中 研究中 mark~~ mark! 本帖最后由 Yoran 于 2012-6-28 14:45 编辑
NXP_emWin512_EA1788_320240_260911.zip中的emWGUIBuilder V5.12,生成的代码不能在uC/GUI 3.98中运行的,参数不对应 nxp的5.16也出了,除了没source,其它好像全功能的。最新的keik mdk也包括了,以后用arm就可以放心用emwin了,不怕侵权了:)
来自:amoBBS 阿莫电子论坛 Android客户端
页:
[1]