Nuvoton emWin NUC126 Скачать руководство пользователя страница 14

 

 

  

 

 

 

 

Oct. 18, 2018 

Page 

14

 of 18 

Rev 1.00 

NUC126 emWin 

  hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); 

  EDIT_SetText(hItem, "126"); 

  value = 126; 

// 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 '+ 1' 

switch(NCode) 

case WM_NOTIFICATION_CLICKED: 

// USER START (Optionally insert code for reacting on notification message) 

// USER END 

            value += 1; 

            sprintf(sBuf,"%d    ", value); 

            hItem = WM_GetDialogItem(pMsg->hWin, ID_EDIT_0); 

            EDIT_SetText(hItem, sBuf); 

            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; 

...... 

Содержание emWin NUC126

Страница 1: ...property of Nuvoton Technology Corporation and shall not be reproduced without permission from Nuvoton Nuvoton is providing this document only for reference purposes of NuMicro microcontroller based s...

Страница 2: ...2 4 Include Files ThirdParty emWin Include 4 2 5 Library ThirdParty emWin Lib 4 2 6 Tools ThirdParty emWin Tool 5 3 EMWIN SAMPLE CODE 6 3 1 Project Structure 6 3 2 System Initialization 7 3 3 emWin I...

Страница 3: ...ide an efficient processor and display controller independent GUI for any application that operates with a graphical display Nuvoton provides emWin GUI library for free with the NUC126 series microcon...

Страница 4: ...system dependent code for GUI GUIConf c Display controller initialization source code GUIConf h A header file configures emWins features fonts etc LCDConf c Display controller configuration source co...

Страница 5: ...ing common image file formats like BMP PNG or GIF into the desired emWin bitmap format emWinPlayer exe This tool can show the previously created emWin Movie File EMF on a Computer with a Windows opera...

Страница 6: ...roject structure in BSP This sample contains a frame window four buttons a text and a text editor User can update the number shown in the text field by clicking four buttons shown on the display panel...

Страница 7: ...el User can switch between different targets using the pull down menu marked in the red rectangle shown below 3 2 System Initialization The system initialization code is located in main function inclu...

Страница 8: ...en TIMER0 TIMER_PERIODIC_MODE 1000 Enable Timer0 interrupt TIMER_EnableInt TIMER0 NVIC_EnableIRQ TMR0_IRQn Start Timer0 TIMER_Start TIMER0 multi function pin configuration GPIO_SetMode PB BIT13 GPIO_M...

Страница 9: ...TE GUI_Clear ifdef __DEMO_160x128__ GUI_DrawBitmap bmnuvoton_logo 1 55 else GUI_DrawBitmap bmnuvoton_logo 320 bmnuvoton_logo XSize 1 240 bmnuvoton_logo YSize 1 endif GUI_Delay 3000 GUI_SetBkColor GUI_...

Страница 10: ...een To support resistive touch screen use ADC to convert the voltage of X axis and Y axis and then use the open source tslib to map the ADC conversion result into the coordination The conversion resul...

Страница 11: ...If APROM is used to store the calibration parameter main function will load the parameter from APROM If the parameter doesn t exist main function will call ts_calibrate to generate a copy Unlock prot...

Страница 12: ...Oct 18 2018 Page 12 of 18 Rev 1 00 NUC126 emWin ts_readfile endif Disable FMC ISP function FMC_Close Lock protected registers SYS_LockReg...

Страница 13: ...ramewinDLG c for the widget of target application Please refer to chapter 20 of UM03001_emWin5 pdf for the usage of GUIBuilder 4 2 Handle Widget Event FramewinDLG c is only the framework of widget and...

Страница 14: ...witch Id case ID_BUTTON_0 Notifications sent by 1 switch NCode case WM_NOTIFICATION_CLICKED USER START Optionally insert code for reacting on notification message USER END value 1 sprintf sBuf d value...

Страница 15: ...d according to the display panel attached to the system void LCD_X_Config void Orientation Config Orientation DISPLAY_ORIENTATION GUIDRV_FlexColor_Config pDevice Config Set controller and operation mo...

Страница 16: ...Oct 18 2018 Page 16 of 18 Rev 1 00 NUC126 emWin using the EBI interface For systems connecting display with the SPI or I2 C interface spi c or i2c c needs to be added to the project...

Страница 17: ...Oct 18 2018 Page 17 of 18 Rev 1 00 NUC126 emWin Revision History Date Revision Description 2018 10 18 1 00 1 Initially issued...

Страница 18: ...d to equipment for surgical implementation atomic energy control instruments airplane or spaceship instruments the control or operation of dynamic brake or safety systems designed for vehicular use tr...

Отзывы: