Home
GUI Script
Contents
1. Fast amp Easy way for graphic applications on SUN7 Enable Your Design ThaiEasyElec com all On line Electronics Shop for Embedded System Document version 1 2 Introduction What Is GUI Script Compared To Other Platforms How Does It Help Enable Your Design LU ThaiEasyElec com On line Electronics Shop for Embedded Syste 3 What Is GUI Script New concept for GUI development on SUN7 Create GUI from script file Full of selectable effects reduce code Works cooperatively with SUN7 example code e SUN7 Studio will be available in Q3 2011 2 Enable Your Design US _Thaigasy lec comMlll 4 Compared To Other Platforms Most platform doesn t support big size LCD e GUI Script let you stay on low cost hardware Non OS platform best for MCS 51 AVR PIC ARM programmers Not just display but reduce lot of coding UI Senior ThaiEasyElec comllll On line Electronics Shop for Embedded System 5 How Does It Help 1 Writing script doesn t need programming experience GUI work may be done with anyone GUI firmware other firmware other firmware ThaiEasyElec com d On line Electronics Shop for Embedded System 6 How Does It Help 2 Faster demo on real hardware With backgrounds and button images and some script demo may be done without programming needed BT G 1 go to screen 1 BT G 3 dad W 30 go to screen 3 ue 3 sec then go to
2. CU Serio ThaiEasyElec com d On line Electronics Shop for Embedded System How Does It Help 3 Provided effects reduce programming time Example Button changes amp moves when it s pressed Script file GUI BI N 1 GUI BT P 2 GUI BT M5 5 Press Image ID 1 Image ID 2 N Normal P Pressed M Move Enable Your Design ThaiEasyElec com All On line Electronics Shop for Embedded System CU Serio 8 How Does It Help 4 Advance GUI features provided Example Textbox and key buttons when a key button pressed its character added to textbox TXT K set it to be key textbox BT V 1 BT X 1 X 1 make it a key button V 1 is its key character BT V Ox08 BT X 1 X 1 make it a key button V 0x08 is its key character CU Serio ThaiEasyElec com Mi On line Electronics Shop for Embedded System 2 How Does It Help 5 MP3 file playback supported with additional MP3 decoder module add sound to screens with a line of script Can be connected directly to the SUN7 VS1011 MP3 Decoder Module CS U l S C q ex ThaiEasyElec com dl On line Electronics Shop for Embedded System 10 How Does It Help 6 Up to 8 languages can be set to buttons place them on the same position the correct one will be activated applicable to background image button label and sound Background Language 1 Language 2 Language va
3. CU Serio Se 30 Example Features Label Left center and right alignment supported Script file GUI LBL O 400 50 ext GUI LBL A O GUI LBL O 400 250 SERE Text GUI LBL O 400 450 277 Text A Alignment CU Serio _ThaiEasyElec c com I r Embedded Syst SC 31 Example Features Table Define dimension color and caption text with script Content writable by software Events provided with calculated column and row Script file GUI TAB O 200 170 GUI TAB c 0 250 0x07E0 Oxffff Product GUI TAB c 1 100 0x07E0 Oxffff Score GUI TAB R 404 GUI TAB A 1 GUI TAB E Example function usage GUIWriteTable 0 1 0 SUN7 ThaiEasyElec com ill On line Electronics Shop for Embedded System CU Serio SC 32 Example Features Font Supports English font and extension font default is Thai for other language please contact us for more detail Script file GUI RFONT 0 GUI RXFONT 0 T t 9 GUI TXT O 100 200 ex 9l p AIIN GUI TXT S 400 100 GUI TXT F 0 0 First O is English font ID second O is extension font ID Ui S enpt ThaiEasyElec com On Shop for Embedded System Enable Your Design 7 SC 33 Example Features Image Font Display image font on textbox or label images must have same height can t be used with Thai font 0123 Script file ID 0 first character is O GUI RIFONT 0 0 10 25 2 10 images us
4. RGO RGC Sound Sound folder refer to root of SD card E ThaiEasyElec comlMll On line Electronics Shop for Embedded System 45 Making Script Write script screen by screen E ends current component setting Script file 175 32 GUI SCS S O gt gt PRESS HERE TO ENTER lt lt GUIBG AO cui et 0175 32 z Je D A DES z A E End of the first button Enable Your Design Ii o suo c ThaiEasyElec com seing of the On line Electronics Shop for Embedded Sys Enable Your Design CU Serio Mi ThaiEasyElec com On line Electronics Shop for Embedded System 46 Making Script Put the script file in script folder name it main txt TXT Script File main txt Script Folder CU Serio ThaiEasyElec com Mi On line Electronics Shop for Embedded System 47 Making Script Name the script folder with the same as in the code default name is sr put it onto SD card insert it to SUN7 Script Folder SD Card default name sr CU Serio ThaiEasyElec com Mi On line Electronics Shop for Embedded System CU Serio 48 Compile amp Run From example project cleanup source code in AppScrinit compile download firmware to the board and run it Source code app_scr_func c Source code app_scr_func c GUIGotoScreen 5 void AppScrlnit void void AppScrinit void 1 unsigned char i memset all vote 0 5 The in
5. System SC 21 Example Features Button Selectable plain color button with text or image button Script file GUI RIMG 0 3 200 100 255 OxF800 Mi co NEUSS size 200x100 color blue GUI BT N O GUI BT T Save GUI BT C OxFFFF GUI BT E ThaiEasyElec com Ml On line Electronics Shop for Embedded System CU Serio SC 22 Example Features Button Assignable images for normal disabled pressed state Script file GUI BT N O GUI BT D 1 GUI BT P 2 GUI BT E Image ID 0 Image ID 1 Image ID 2 N Normal D Disable Disable Normal Pressed D pracced ThaiEasyElec com Mi On line Electronics Shop for Embedded System CU Serio SC 23 Example Features Button Inverse when pressed Script file GUI BT N 1 GUI BT Image ID 1 GUI BT E Image ID 1 Normal Pressed Enable Your Design j U l S c q ex ThaiEasyElec com On line Electronics Shop for Embedded System SC 24 Example Features Button Shift interlock mode button switched to the next one when pressed up to 8 buttons in the sequence Script file GUI BI N O GUI BI P 1 GUI BT O GUI BT E GUI BT N 2 GUI BT P 3 GUI BT 1 GUI BT E Pause _ThaiEasyElec c com d line Elec s Shop for Embedded System QU Serio SC 25 Example Features Button Repeated event occurs while being pressed both press and release run repeatedly Script file GUI CFG r
6. works as same as Linux serial console The default baud rate for console on SUN7 is 57600 and the default serial port is port O not the port on your PC It can be change by user to use other serial port or baud rate Normally the target devices accept characters the user types from PC and echo back to the same serial port The echo then appear on PC There are many commands implemented on SUN7 by default see SUN7 s user manual Anyway the user can create their commands on purpose To display commands available on SUN7 type help lt enter gt ThaiEasyElec comllll On line Electronics Shop for Embedded System CU Serio SC 15 How GUI Script Works When a register command found GUI engine read and decode if required the file then store it to SDRAM space and save the address to image parameter Script file GUIRIMGO 05050 255 img a bin GUIRIMGO 15050255 img b bin GUI RIMGO 25050255 img c b v ME address stored guiimage 0 address sr img C U l S C q ex ThaiEasyElec com dl On line Electronics Shop for Embedded System SC 16 How GUI Script Works 3 The AppScrinit function from app scr func c allows the user to bind events to user functions inei tek ed void Applnit void Source code app scr func c u GUlIInit 1 ReadScript AppScrinit ee a h Mri ScrObjlnit GUIScreenlnit void AppScrinit void 1 guisc O init scrO init guibt O releas
7. b 101 1 second 10x100 ms for first time and 100 ms 1x100 ms for the rest GUI BT N O GUI BT r Turns repeat mode on GUI BT E for the button C U l S C q ex ThaiEasyElec com dl On line Electronics Shop for Embedded System SC 26 Example Features Button Events for button do every case the button associated press release do do do Normal Press Press amp Hold Release S U l S C q ex ThaiEasyElec com dl On line Electronics Shop for Embedded System ee Zi Example Features Textbox Password mode supported Password Script file GUI TXT O 400 300 GUI TXT S 300 100 GUI TXT K Password mode set usin GUI TXT p GUI TXT E character Enable Your Design j U l S c q ex ThaiEasyElec com On line Electronics Shop for Embedded System SC 28 Example Features Textbox Left center and right alignment supported Script file Text GUI TXT A O GUI TXT A 1 Text GUI TXT A 2 A Alignment Text 2 Enable Your Design GU Sede _Thaigasy lec comMlll Se 29 Example Features Textbox Multi line supported textbox that contains more lines than it can display with move up and down functions provided can t be used with image font Script file GUI TXT K Me a name call myself ee GUI TXT m Far a long long way to run GUI TXT E M multi line ThaiEasyElec c com d s Shop for Embedded System
8. ce the system boot and can be used for background only Best for on line system that upgrade is required 06 C372 8F b ee ee Binary files are small 2 bytes per pixel for 16 bpp and take 87 CEB5 3B 425 shortest time to boot best for final state 73 59 FE 33 B2 6A Using binary file needs image size to be specified in the script 14 OF FF FC Binary Image File CU Serio ThaiEasyElec com d On line Electronics Shop for Embedded System 43 Resource Gathering Fonts can be made by writing array of characters in BMP files then convert it using bmp2h conv to binary file downloadable from our website 00 000200 FE 000000 wa 00 04 80 00 00 0 00 01 FE 00 00 00 04 00 00 000200 FE 00 00 00 000480000004 0001FE 000000 04 00 07 FC Binal _ Binary Font File Font images bmp bmp2h_conv Binary files CU Serio ThaiEasyElec com All On line Electronics Shop for Embedded System 44 Making Script GUI RFONT 1 D GUI RXFONT 0 GUI RXFONT 1 D gt GUI RIFONT 0 File paths GUI RIFONT 1 C TNT Au REG BS script folder GUI RBG 1 GUI RIMG O D gt GUI RIMG 1 SND CFG D sr snd SND RGO 0 SND RGC SND RGO SND RGC CU Serio Register resource files with register command RFONT Normal font RXFONT Extension font RIFONT Image font RBG Background RIMG Image
9. compatibility between firmware and script can make the board run improperly ThaiEasyElec com Mi On line Electronics Shop for Embedded System 49 Compile amp Run 4 LUM A HyperTerminal Da ss ag amp HHHHSHHHHHHHSHHHSHSEHHSEHESHSHSSSHSSSHU Monitor console port serial port O by default using terminal software while loading GUI script to see if there are any error ag image s loaded a button s created 3j image s on screen set 2 textboxes created 1 table s created e f there are any error shown on LCD try capturing the serial data and search for words ERROR 0 box es created text pool sizethyte 11 label s created When maximum number of a component Een QUID EESSPIU x reached or exceeded the red warning shown BAUDRATE1 9600 3lz line s read from script file on LCD after GUI END script found r 4 k Connected 15 44 ANSTIW 57600 amp N 1 SCROLL F euseda rene Yow Denon HI ThaiEasyElec com On line Electronics Shop for Embedded System 50 Compile amp Run Start coding your application by creating user functions and bind them to events Source code app scr func c void AppScrinit void 1 guisc O init user scr initO guisc 1 init user scr init1 guibt GUIGetBtID 0 2 release user bt release 0 first screen N 2 3 button user xxx functions are user functions can ha
10. e btO release Enable Your Design j C U S C I OT ThaiEasyElec com On line Electronics Shop for Embedded System SC 17 How GUI Script Works 4 The ScrObjlnit starts the graphic application it initializes background components as set from guisclscr_id SeObit gt Gearatobjeets void Applnit void GUlInit 1 ReadScript AppScrinit ScrObjlnit GUIScreenlnit scr id is a global variable states the current screen ID guisc is the structure that keeps parameters for screens Enable Your Design j C U l S C q ex ThaiEasyElec com On line Electronics Shop for Embedded System Se 18 How GUI Script Works 5 The scan pen function app bs sun demp c scanning every 10 ms for a touch leads to native object s events Source code app bs sun demo c and user functions sen pen c void AppTask10ms void scan pen j CU Serio Enable Your Design ThaiEasyElec com d line Electronics Shop for Embedded System m Un ee 19 Components Supported Button Image box e Textbox Table Label Box for simple line or rectangular Percent bar progress bar volume bar lt ThaiEasytlec c com il line Electronics Shop for Embedded System CU Serio Button Textbox Label Table Font Image Font Percent Bar Popup Thai amp asyElec c com d line Electronics Shop for Embedded
11. ed with first ID 25 GUI RIMG 25 255 num0 bmp gap between characters 2 pixels GUI RIMG 26255 num1 bmp GUI RIMG 27 255 num2 bmp GUI RIMG 28 255 num3 bmp GUI RIMG 29 255 num4 bmp 4 C U l S C q ex ThaiEasyElec com dl On line Electronics Shop for Embedded System ee 34 Example Features Bar Horizontal or vertical bars Move and stop events Tube image Bar image ThaiEasyklec c com d s Shop for Embedded System CU Serio SC 25 Example Features Bar 4 touch response styles No response change value by software only Move to the touch Follow the touch movement Slide with touch movement ThaiEasyElec com I Shop for Embedded Syst CU Serio ry ee 36 Example Features Bar Pin supported pin E ox 50 100 ThaiEasytlec c com i On line Electronics Shop for Embedded System SC 37 Example Features Bar e 2 movement types CU Serio ThaiEasyklec c com LL line Electronics Shop for Embedded System SC 38 Example Features Popup Show popup window on any screen Enable Your Design ThaiEasyElec com dl L m Open popup window by script or software Enable Your Design f ll i System Close popup window ThaiEasyElec com by script or software line Electronics S edd Resume the main screen Neither init nor init2 runs ThaiEasyElec comillll On line E
12. io 54 gt I Thank You Please feel free to contact us at Support thaieasyelec com Enable Your Design ThaiEasyElec com d On line Electronics Shop for Embedded System
13. lectronics Shop for Embedded System CU Serio 39 gt Implementation e Resource Gathering e Making Script e Compile amp Run Enable Your Design ThaiEasyElec com d On li line Electronics Shop for Embedded System 40 Resource Gathering Prepare resource files and put them in script folder recommend to create subfolder Images background only JPG gt Images Sounds BMP MP3 gt ad 06 C3728F 00000200 95 AA 30 65 a FE 000000 3 EC 87 CE B5 3B 425 00 04 80 00 OO C 73 59 FE 33 B2 6A 00 01 FE 00 00 00 14 OF FF FC 04 00 07 FC l l l l Script Folder Binary Image File Binary Font File Images Fonts ThaiEasyElec com d On line Electronics Shop for Embedded System CU Serio 41 Resource Gathering Image files can be BMP JPEG or converted binary format BMP Files 06 C3728F L i 95 AA 30 65 BMP 87 CE B5 3B 42 5 7359 FE 33 B2 6A 14 OF FF FC Binary Image File id bmp2h_conv Binary Files y Script Folder JPG Files background only CU Serio ThaiEasyElec com d On line Electronics Shop for Embedded System 42 Resource Gathering Compare between BMP JPEG and binary image files BMP files are large 3 bytes per pixel can be used for both BMP D background and general images Good for development state or simple application IPG Y JPEG files are smallest but takes extra time to decode on
14. lue maybe 1 2 4 8 16 32 64 128 to support one language from 1 8 respectively setting to 255 make it supports all language CAU Semon ThaiEasyElec comllll 11 How it Works How GUI Script Works Components Supported Enable Your Design J ThaiEasyElec com On line Electronics Shop for Embedded Syste SC 12 How GUI Script Works 1 The GUIInit function reserves SDRAM memory for GUI component structures wit h t h e q u a ntit l es Source code app_bs_sun_demo c defined in app scr func h void appinit voia i GUIInit 1 ReadScript Source code app_scr_func h AppScrinit detine MAX SCR 20 ScrObjlnit GUIScreenlnit define MAX BACKGROUND 50 define MAX IMAGE 100 C U l S C q ex ThaiEasyElec com dl On line Electronics Shop for Embedded System SC 13 How GUI Script Works 2 The ReadScript function read script line by line and put them to console Script file Source code app bs sun demo c GUI BT N O GUI BI P 1 void Applnit void GUI BT M55 GUIInit 1 ReadScript AppScrinit ScrObjlnit GUIScreenlnit Set button parameter GUI is console command the rest are processed by GUI engine other console commands can be placed in script S U l S C q ex ThaiEasyElec com dl On line Electronic s Shop for Embedded System pp Co n SO e in this document means the user interface that use serial port for communication It
15. ve any names CU Serio ThaiEasyElec com d On line Electronics Shop for Embedded System 51 More Info Checkout the latest GUI Script User Manual htto www thaieasvelec net archives Manual GUI Script User Manual v1 03 pdf Includes All features All script commands All GUI function description Programming guidelines Enable Your Design j C U S C I OT ThaiEasyElec com On line Electronics Shop for Embedded System 52 More Info Checkout the board s user manual http www thaieasyelec net archives Manual BlueScreen SUN7 User 2 OManual v1 02 pdf Includes Peripherals on SUN7 Example code description Console command description How to download firmware Enable Your Design j C U S C I OT ThaiEasyElec com On line Electronics Shop for Embedded System 53 Try it now Download example project for Eclipse amp Yagarto free software http www thaieasyelec net archives Manual 4 3inch9620Yagarto9620Example9620Pro ject zip http www thaieasyelec net archives Manual 7inch9620Yagarto9620Example9620Projec t zip Example project description http www thaieasyelec net archives Manual ANGS1 OO O1 Example Project pdf Startup guide for Eclipse and Yagarto http www thaieasyelec net archives Manual ANSUN71 OO O1 Startup Guide for Ec lipse amp Yagarto pdf ThaiEasyElec com d On line Electronics Shop for Embedded System CU Ser
Download Pdf Manuals
Related Search
Related Contents
dermatologie USER GUIDE - Soundcraft Jabra SPEAK 450 para Cisco ADX03T_FN-168_CL HAVAb.indd Mode d`emploi du Twist 397 Orientteppiche Raja - Taunus Nachrichten Copyright © All rights reserved.
Failed to retrieve file