background image

uEZ GUI Start Here Guide 

 

UEZGUI-1788-43WQR 

 
 

Rev. 1.11    Aug 31, 2016

 

 

Page 13 

2.

 

Replace the definitions with the names and values associated with the new button 
being created: 

 

 

 

/*---------------------------------------------------------------------------* 
 * Constants: 
 *--------------------------------------------------------------------------*/

 

#define 

ID_WINDOW               (GUI_I 0x00) 

#define 

ID_TITLE_TEXT           (GUI_I 0x01) 

#define

 ID_MYBUTTON_BUTTON      (GUI_I 0x02) 

#define 

ID_FDIINFO_TEXT         (GUI_I 0x03) 

 

#define 

WINDOW_XSIZE            (UEZ_LCD_DISPLAY_WIDTH) 

#define 

WINDOW_YSIZE            (UEZ_LCD_DISPLAY_HEIGHT) 

#define 

WINDOW_XPOS             (0) 

#define 

WINDOW_YPOS             (0) 

 

#if

(UEZ_DEFAULT_LCD == LCD_RES_WVGA) 

#define 

SPACING                 (10) 

#define 

FONTSIZE                &FONT_LARGE 

#else 
#define 

SPACING                 (5) 

#define 

FONTSIZE                &FONT_SMALL 

#endif 

 

#define 

TITLE_TEXT_XSIZE        (WINDOW_XSIZE) 

#define 

TITLE_TEXT_YSIZE        ((WINDOW_YSIZE/10)) 

#define 

TITLE_TEXT_XPOS         (0) 

#define 

TITLE_TEXT_YPOS         (0) 

 

#define

 FDIINFO_TEXT_XSIZE      (WINDOW_XSIZE) 

#define 

FDIINFO_TEXT_YSIZE      ((WINDOW_YSIZE/10)) 

#define 

FDIINFO_TEXT_XPOS       (0) 

#define 

FDIINFO_TEXT_YPOS       ((WINDOW_YSIZE/10)*9 + 0) 

 

#define 

MYBUTTON_BUTTON_XSIZE    (WINDOW_XSIZE/3 + 20) 

#define 

MYBUTTON_BUTTON_YSIZE    ((WINDOW_YSIZE/5)) 

#define

 MYBUTTON_BUTTON_XPOS     (WINDOW_XSIZE/3 - 10) 

#define

 MYBUTTON_BUTTON_YPOS     ((WINDOW_YSIZE/10)*4)

 

 

Summary of Contents for uEZ GUI

Page 1: ...ny additional resources available at www TeamFDI com If you ever need more help contact us and we will be happy to assist you Hardware Used in This Guide Included in Kit UEZGUI 1788 43WQR BA SEGGER J...

Page 2: ...nt is provided solely to enable the use of Future Designs products FDI assumes no liability whatsoever including infringement of any patent or copyright FDI reserves the right to make changes to these...

Page 3: ...ect the other end of the USB cable to the provided universal AC power supply s 5V USB power output NOTE The JTAG port and J Link probe do not power the EZ GUI The following screen will appear once pow...

Page 4: ...ions http tinyurl com hlsn9qf B J Link Installation The EZ GUI uses a J Link debugger probe The SEGGER version 5 12J driver must be installed Download and install the software from the link below SEGG...

Page 5: ...only be connected one way 3 If not already done connect the EZ GUI to the power supply with the second included USB cable 4 Developing a Simple GUI Application with emWin A emWin Introduction emWin s...

Page 6: ...he core features of the EZ and emWin libraries B Building and Running the Initial Project Before digging into the code of the project examine the output by building and running the initial project as...

Page 7: ...Navigate to FreeRTOS IAR or FreeRTOS Crossworks and open the IAR uEZ_NXP_LPC1788_FreeRTOS_IAR eww or Crossworks uEZ_NXP_LPC1788_FreeRTOS_CrossWorks hzp workspace project file If you have multiple vers...

Page 8: ...roject Explorer sub window if not already selected 6 Next building the project For IAR Select Project Make or press F7 to build the EZ library project For Crossworks Select Build Build or press F7 to...

Page 9: ...For Crossworks the project file is at StartHere Build uEZGUI_1788_43WQR Crossworks uEZGUI_StartHere hzp 10 Verify that the Debug build is selected to match the library project 11 If using IAR proceed...

Page 10: ...ink probe 17 Build if needed download and run the project following the respective IDE steps For IAR Press Ctrl D or select Project Download and Debug from the menu at the top For Crossworks Press F5...

Page 11: ...ile contains the information that is used to create a window and any widgets buttons etc that will load with the window The beginning of the file contains the includes and a list of definitions that d...

Page 12: ...an additional widget is as simple as setting it to the next value GUI_ID_USER is equal to 0x800 by default and needs to be used to avoid conflicts with other areas of the program Constants define ID_W...

Page 13: ...NDOW_XPOS 0 define WINDOW_YPOS 0 if UEZ_DEFAULT_LCD LCD_RES_WVGA define SPACING 10 define FONTSIZE FONT_LARGE else define SPACING 5 define FONTSIZE FONT_SMALL endif define TITLE_TEXT_XSIZE WINDOW_XSIZ...

Page 14: ...DIINFO_TEXT_YPOS FDIINFO_TEXT_XSIZE FDIINFO_TEXT_YSIZE TEXT_CF_HCENTER TEXT_CF_VCENTER 0 0 Generic Mapping of Screen Layout static T_LAFMapping HomeScreenMapping ID_WINDOW GUI_BLACK GUI_WHITE FONT_SMA...

Page 15: ...ning Folder For Crossworks Select Select in File Explorer 2 Copy the HomeScreen c file located in the emWin directory and rename it SecondScreen c 3 Back in the IDE right click the emWin folder For IA...

Page 16: ...H to open the Find and Replace dialog Insert HomeScreen in the Find what field and SecondScreen in the Replace with field Select Match case and make sure Match whole word is unselected Click Replace...

Page 17: ...the information for the various widgets on a window are shown below Delete the lines highlighted in red that are specific to the first window The only remaining values within each of these array vari...

Page 18: ...to setup a blank window The final step to creating the window is to update the WindowManager c file Open the file and update the WindowManager_Create_All_Active _Windows function as shown below You al...

Page 19: ...M_MESSAGE TInt32 TInt32 IHandleSecondScreen to make the function name easily understandable 2 Declare the callback function s prototype between the Global Data and Local Data sections of the HomeScree...

Page 20: ...text fields and give the temperature text an update function 2 Define a new ID for the Temperature Text 3 Define the temperature fields position and size NOTE We use WINDOW_XSIZE and WINDOW_YSIZE to s...

Page 21: ...ocal Data Structure to hold all of the widgets used in this dialog static const GUI_WIDGET_CREATE_INFO _iSecondScreenDialog Function Name ID XP YP XS YS WINDOW_CreateIndirect ID_WINDOW WINDOW_XPOS WIN...

Page 22: ...are equivalent to threads It is important that a small delay is introduced into the task s loop to avoid bogging down the processor Doing this allows the other tasks to take priority during the delay...

Page 23: ...ng 10 String to hold temperature TInt32 i f Variables for conversion T_uezDevice temp uEZ device variable TInt32 Temperature Variable to hold temperature reading UEZTemperatureOpen Temp0 temp Open the...

Page 24: ...EZ GUI s onboard LED is also included in the project s MyTask c file It may be implemented using the same instructions provided for the temperature task by calling UEZTaskCreate H Adding a Back Button...

Page 25: ...ISPLAY_HEIGHT define WINDOW_XPOS 0 define WINDOW_YPOS 0 define TITLE_TEXT_XSIZE WINDOW_XSIZE define TITLE_TEXT_YSIZE WINDOW_YSIZE 10 define TITLE_TEXT_XPOS 0 define TITLE_TEXT_YPOS 0 define TEMP_TEXT_...

Page 26: ...TEXT_CF_HCENTER TEXT_CF_VCENTER 0 0 TEXT_CreateIndirect ID_TEMP_TEXT TEMP_TEXT_XPOS TEMP_TEXT_YPOS TEMP_TEXT_XSIZE TEMP_TEXT_YSIZE TEXT_CF_HCENTER TEXT_CF_VCENTER 0 0 BUTTON_CreateIndirect ID_BACK_BUT...

Page 27: ...or how to restore the factory demo to the EZ GUI if desired 5 Restoring the Out of Box OOB Demo Optional 1 Remove the SD card from the EZ GUI 2 Insert the EZ GUI s SD card into the PC depending on you...

Page 28: ...http tinyurl com zlu9ood Bootloader User s Manual http tinyurl com z6lw2fd JTAG Programming EZ GUI http tinyurl com h9dnu96 7 Website and Support Documentation EZ Library Online Documentation http ww...

Reviews: