Commit ae080420 authored by sam's avatar sam

N9H20K5 TFT-LCD 4.3" 發電機畫面顯示以表格方式呈現 (使用 emWin 之 API)

parent a8df964e
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="0.1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="EventRecorderStub" version="1.0.0"/> <!--name and version of the component-->
<events>
</events>
</component_viewer>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_mpw.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<WorkspaceName>WorkSpace</WorkspaceName>
<project>
<PathAndName>.\N9H20_GTR_GUI.uvproj</PathAndName>
<NodeIsActive>1</NodeIsActive>
<NodeIsExpanded>1</NodeIsExpanded>
</project>
<project>
<PathAndName>..\..\..\Loaders\NandLoader\KEIL\N9H20K5_NandLoader.uvproj</PathAndName>
</project>
<project>
<PathAndName>..\..\..\Loaders\NVTLoader\KEIL\N9H20K5_NVTLoader.uvproj</PathAndName>
</project>
<project>
<PathAndName>..\..\SampleCode\emWin\emWinSample\KEIL\eMwinSample.uvproj</PathAndName>
<NodeIsExpanded>1</NodeIsExpanded>
</project>
<project>
<PathAndName>..\..\SampleCode\FreeRTOS\FreeRTOS_SimpleDemo\KEIL\FreeRTOS_SimpleDemo.uvproj</PathAndName>
</project>
<project>
<PathAndName>..\..\SampleCode\FreeRTOS\FreeRTOS_GUIDemo\KEIL\FreeRTOS_GUIDemo.uvproj</PathAndName>
</project>
</ProjectWorkspace>
......@@ -152,7 +152,7 @@
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>1</aSer1>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
......@@ -211,7 +211,7 @@
<Group>
<GroupName>FreeRTOS</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
......@@ -367,6 +367,150 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>14</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\pic1_480x272_RGB565_u8.dat</PathWithFileName>
<FilenameWithoutPath>pic1_480x272_RGB565_u8.dat</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\pic2_480x272_RGB565_u8.dat</PathWithFileName>
<FilenameWithoutPath>pic2_480x272_RGB565_u8.dat</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\GTR_HMIDLG.c</PathWithFileName>
<FilenameWithoutPath>GTR_HMIDLG.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\gWinDLG.c</PathWithFileName>
<FilenameWithoutPath>gWinDLG.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\GUI_X_FreeRTOS.c</PathWithFileName>
<FilenameWithoutPath>GUI_X_FreeRTOS.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\green_LED_30x30.c</PathWithFileName>
<FilenameWithoutPath>green_LED_30x30.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\MainWin.c</PathWithFileName>
<FilenameWithoutPath>MainWin.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\pexels-photo-371589.c</PathWithFileName>
<FilenameWithoutPath>pexels-photo-371589.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\pexels-photo-457882.c</PathWithFileName>
<FilenameWithoutPath>pexels-photo-457882.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>23</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\pexels-photo-693521.c</PathWithFileName>
<FilenameWithoutPath>pexels-photo-693521.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>24</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\pexels-photo-753626.c</PathWithFileName>
<FilenameWithoutPath>pexels-photo-753626.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>25</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\AppleLiGothicFont24.c</PathWithFileName>
<FilenameWithoutPath>AppleLiGothicFont24.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
......@@ -377,19 +521,91 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>14</FileNumber>
<FileNumber>26</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_SYS_FreeRTOS.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_SYS_FreeRTOS.lib</FilenameWithoutPath>
<PathWithFileName>..\..\Library\IPLib\N9H20_VPOST_FW043TFT_480x272.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_VPOST_FW043TFT_480x272.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>15</FileNumber>
<FileNumber>27</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_ADC.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_ADC.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>28</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_SIC.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_SIC.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>29</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\GNANDLib\N9H20_GNAND.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_GNAND.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>30</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\NVTFATLib\N9H20_NVTFAT.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_NVTFAT.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>31</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_BLT.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_BLT.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>32</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_JPEG.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_JPEG.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>33</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -399,17 +615,53 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>34</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_SYS_FreeRTOS.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_SYS_FreeRTOS.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>35</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\ThirdParty\emWin\Lib\NUemWin_ARM9_Keil.lib</PathWithFileName>
<FilenameWithoutPath>NUemWin_ARM9_Keil.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>36</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\NVTFATLib\N9H20_NVTFAT_FreeRTOS.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_NVTFAT_FreeRTOS.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>inc</GroupName>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>16</FileNumber>
<FileNumber>37</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -421,7 +673,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>17</FileNumber>
<FileNumber>38</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -433,7 +685,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>18</FileNumber>
<FileNumber>39</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -445,4 +697,116 @@
</File>
</Group>
<Group>
<GroupName>emWinConifg</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>40</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\emWinConfig\LCDConf.c</PathWithFileName>
<FilenameWithoutPath>LCDConf.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>41</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\emWinConfig\GUIConf.h</PathWithFileName>
<FilenameWithoutPath>GUIConf.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>42</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\emWinConfig\LCDConf.h</PathWithFileName>
<FilenameWithoutPath>LCDConf.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>43</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\emWinConfig\GUIConf.c</PathWithFileName>
<FilenameWithoutPath>GUIConf.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>tslib</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>44</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\tslib\fbutils.c</PathWithFileName>
<FilenameWithoutPath>fbutils.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>45</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\tslib\N9H20TouchPanel.c</PathWithFileName>
<FilenameWithoutPath>N9H20TouchPanel.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>46</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\tslib\testutils.c</PathWithFileName>
<FilenameWithoutPath>testutils.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>47</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\tslib\ts_calibrate.c</PathWithFileName>
<FilenameWithoutPath>ts_calibrate.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>
......@@ -78,10 +78,10 @@
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<RunUserProg1>1</RunUserProg1>
<RunUserProg2>1</RunUserProg2>
<UserProg1Name>fromelf.exe --bin --output "$L@L.bin" "$L@L.axf"</UserProg1Name>
<UserProg2Name>fromelf.exe --bin --output "$P../Bin/@L.bin" "$L@L.axf"</UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
......@@ -168,7 +168,7 @@
</DebugOption>
<Utilities>
<Flash1>
<UseTargetDll>0</UseTargetDll>
<UseTargetDll>1</UseTargetDll>
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>0</UpdateFlashBeforeDebugging>
......@@ -350,7 +350,7 @@
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>1</Optim>
<Optim>3</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
......@@ -362,7 +362,7 @@
<wLevel>2</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
<uC99>0</uC99>
<useXO>0</useXO>
<v6Lang>1</v6Lang>
<v6LangP>1</v6LangP>
......@@ -375,7 +375,7 @@
<MiscControls></MiscControls>
<Define>__480x272__</Define>
<Undefine></Undefine>
<IncludePath>.\FreeRTOS\Source\include;.\FreeRTOS\ARM9_N9H20;.\User\Inc;..\..\Driver\Include</IncludePath>
<IncludePath>.\FreeRTOS\Source\include;.\FreeRTOS\ARM9_N9H20;.\User\Inc;..\..\Driver\Include;.\User\Src;..\..\ThirdParty\emWin\Include;.\emWinConfig;..\..\Driver\Include;.\tslib</IncludePath>
</VariousControls>
</Cads>
<Aads>
......@@ -409,7 +409,7 @@
<ScatterFile>..\..\Script\N9H20K5\N9H20K5.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<Misc>--entry 0</Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
......@@ -494,21 +494,245 @@
<FileType>1</FileType>
<FilePath>.\User\Src\standalone.c</FilePath>
</File>
<File>
<FileName>pic1_480x272_RGB565_u8.dat</FileName>
<FileType>5</FileType>
<FilePath>.\User\Src\pic1_480x272_RGB565_u8.dat</FilePath>
</File>
<File>
<FileName>pic2_480x272_RGB565_u8.dat</FileName>
<FileType>5</FileType>
<FilePath>.\User\Src\pic2_480x272_RGB565_u8.dat</FilePath>
</File>
<File>
<FileName>GTR_HMIDLG.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\GTR_HMIDLG.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>
<useXO>2</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>2</vShortEn>
<vShortWch>2</vShortWch>
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
</File>
<File>
<FileName>gWinDLG.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\gWinDLG.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>
<useXO>2</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>2</vShortEn>
<vShortWch>2</vShortWch>
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
</File>
<File>
<FileName>GUI_X_FreeRTOS.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\GUI_X_FreeRTOS.c</FilePath>
</File>
<File>
<FileName>green_LED_30x30.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\green_LED_30x30.c</FilePath>
</File>
<File>
<FileName>MainWin.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\MainWin.c</FilePath>
</File>
<File>
<FileName>pexels-photo-371589.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\pexels-photo-371589.c</FilePath>
</File>
<File>
<FileName>pexels-photo-457882.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\pexels-photo-457882.c</FilePath>
</File>
<File>
<FileName>pexels-photo-693521.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\pexels-photo-693521.c</FilePath>
</File>
<File>
<FileName>pexels-photo-753626.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\pexels-photo-753626.c</FilePath>
</File>
<File>
<FileName>AppleLiGothicFont24.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\AppleLiGothicFont24.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Lib</GroupName>
<Files>
<File>
<FileName>N9H20_SYS_FreeRTOS.lib</FileName>
<FileName>N9H20_VPOST_FW043TFT_480x272.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_SYS_FreeRTOS.lib</FilePath>
<FilePath>..\..\Library\IPLib\N9H20_VPOST_FW043TFT_480x272.lib</FilePath>
</File>
<File>
<FileName>N9H20_ADC.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_ADC.lib</FilePath>
</File>
<File>
<FileName>N9H20_SIC.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_SIC.lib</FilePath>
</File>
<File>
<FileName>N9H20_GNAND.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\GNANDLib\N9H20_GNAND.lib</FilePath>
</File>
<File>
<FileName>N9H20_NVTFAT.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\NVTFATLib\N9H20_NVTFAT.lib</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds/>
</FileOption>
</File>
<File>
<FileName>N9H20_BLT.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_BLT.lib</FilePath>
</File>
<File>
<FileName>N9H20_JPEG.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_JPEG.lib</FilePath>
</File>
<File>
<FileName>N9H20_GPIO.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_GPIO.lib</FilePath>
</File>
<File>
<FileName>N9H20_SYS_FreeRTOS.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_SYS_FreeRTOS.lib</FilePath>
</File>
<File>
<FileName>NUemWin_ARM9_Keil.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\ThirdParty\emWin\Lib\NUemWin_ARM9_Keil.lib</FilePath>
</File>
<File>
<FileName>N9H20_NVTFAT_FreeRTOS.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\NVTFATLib\N9H20_NVTFAT_FreeRTOS.lib</FilePath>
</File>
</Files>
</Group>
<Group>
......@@ -531,6 +755,56 @@
</File>
</Files>
</Group>
<Group>
<GroupName>emWinConifg</GroupName>
<Files>
<File>
<FileName>LCDConf.c</FileName>
<FileType>1</FileType>
<FilePath>.\emWinConfig\LCDConf.c</FilePath>
</File>
<File>
<FileName>GUIConf.h</FileName>
<FileType>5</FileType>
<FilePath>.\emWinConfig\GUIConf.h</FilePath>
</File>
<File>
<FileName>LCDConf.h</FileName>
<FileType>5</FileType>
<FilePath>.\emWinConfig\LCDConf.h</FilePath>
</File>
<File>
<FileName>GUIConf.c</FileName>
<FileType>1</FileType>
<FilePath>.\emWinConfig\GUIConf.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>tslib</GroupName>
<Files>
<File>
<FileName>fbutils.c</FileName>
<FileType>1</FileType>
<FilePath>.\tslib\fbutils.c</FilePath>
</File>
<File>
<FileName>N9H20TouchPanel.c</FileName>
<FileType>1</FileType>
<FilePath>.\tslib\N9H20TouchPanel.c</FilePath>
</File>
<File>
<FileName>testutils.c</FileName>
<FileType>1</FileType>
<FilePath>.\tslib\testutils.c</FilePath>
</File>
<File>
<FileName>ts_calibrate.c</FileName>
<FileType>1</FileType>
<FilePath>.\tslib\ts_calibrate.c</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
......
......@@ -82,19 +82,19 @@
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMAX_PRIORITIES ( 8 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 512 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
#define configMAX_PRIORITIES ( 8 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 512 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configCHECK_FOR_STACK_OVERFLOW 0
#define configUSE_RECURSIVE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 10
......@@ -107,15 +107,15 @@
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1
#define INCLUDE_pcTaskGetTaskName 1
#define INCLUDE_xTaskGetSchedulerState 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1
#define INCLUDE_pcTaskGetTaskName 1
#define INCLUDE_xTaskGetSchedulerState 1
#endif /* FREERTOS_CONFIG_H */
......@@ -3,4 +3,8 @@
#include "mysys.h"
#define IMG1_ADDRESS (0x00400000)
#define IMG2_ADDRESS (0x0050A000 + 0xA00)
#define IMG3_ADDRESS (0x0050A000 + 0xA00*2)
#endif
......@@ -12,9 +12,6 @@
#include "semphr.h"
#include "event_groups.h"
#include "wblib.h"
#include "wbio.h"
#include "wbtypes.h"
#include "N9H20.h"
#endif
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
FreeRTOS V8.2.3 - Copyright (C) 2015 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License (version 2) as published by the
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
***************************************************************************
>>! NOTE: The modification to the GPL is included to allow you to !<<
>>! distribute a combined work that includes FreeRTOS without being !<<
>>! obliged to provide the source code for proprietary components !<<
>>! outside of the FreeRTOS kernel. !<<
***************************************************************************
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. Full license text is available on the following
link: http://www.freertos.org/a00114.html
***************************************************************************
* *
* FreeRTOS provides completely free yet professionally developed, *
* robust, strictly quality controlled, supported, and cross *
* platform software that is more than just the market leader, it *
* is the industry's de facto standard. *
* *
* Help yourself get started quickly while simultaneously helping *
* to support the FreeRTOS project by purchasing a FreeRTOS *
* tutorial book, reference manual, or both: *
* http://www.FreeRTOS.org/Documentation *
* *
***************************************************************************
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
the FAQ page "My application does not run, what could be wrong?". Have you
defined configASSERT()?
http://www.FreeRTOS.org/support - In return for receiving this top quality
embedded software for free we request you assist our global community by
participating in the support forum.
http://www.FreeRTOS.org/training - Investing in training allows your team to
be as productive as possible as early as possible. Now you can receive
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
Ltd, and the world's leading authority on the world's leading RTOS.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
compatible FAT file system, and our tiny thread aware UDP/IP stack.
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
licenses offer ticketed support, indemnification and commercial middleware.
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
1 tab == 4 spaces!
*/
#ifndef FREERTOS_CONFIG_H
#define FREERTOS_CONFIG_H
/*-----------------------------------------------------------
* Application specific definitions.
*
* These definitions should be adjusted for your particular hardware and
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configTICK_RATE_HZ ( ( TickType_t ) 100 )
#define configMAX_PRIORITIES ( 8 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) (4 * 1024 / 4) )
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 256 * 1024 ) )
#define configMAX_TASK_NAME_LEN ( 16 )
#define configUSE_TRACE_FACILITY 1
#define configUSE_16_BIT_TICKS 0
#define configIDLE_SHOULD_YIELD 1
#define configUSE_MUTEXES 1
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configUSE_RECURSIVE_MUTEXES 1
#define configQUEUE_REGISTRY_SIZE 10
#define configUSE_COUNTING_SEMAPHORES 1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */
#define INCLUDE_vTaskPrioritySet 1
#define INCLUDE_uxTaskPriorityGet 1
#define INCLUDE_vTaskDelete 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#define INCLUDE_xTaskGetCurrentTaskHandle 1
#define INCLUDE_pcTaskGetTaskName 1
#define INCLUDE_xTaskGetSchedulerState 1
#endif /* FREERTOS_CONFIG_H */
This source diff could not be displayed because it is too large. You can view the blob instead.
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2018 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V5.48 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2019-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : GUIConf.c
Purpose : Display controller initialization
---------------------------END-OF-HEADER------------------------------
*/
#include "GUI.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
//
// Define the available number of bytes available for the GUI
//
#define GUI_NUMBYTES (1 * 1024 * 1024)
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* 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);
//
// Set default font
//
GUI_SetDefaultFont(GUI_FONT_6X8);
}
/*************************** End of file ****************************/
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2018 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V5.48 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2019-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : GUI_X_FreeRTOS.c
Purpose : Config / System dependent externals for GUI
---------------------------END-OF-HEADER------------------------------
*/
#include <stdio.h>
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"
#include "GUI.h"
/*********************************************************************
*
* Static data
*
**********************************************************************
*/
static SemaphoreHandle_t _Semaphore;
//static TaskHandle_t _pGUITask;
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* Timing:
* GUI_GetTime()
* GUI_Delay(int)
Some timing dependent routines require a GetTime
and delay funtion. Default time unit (tick), normally is
1 ms.
*/
int GUI_X_GetTime(void) {
return xTaskGetTickCount() * portTICK_PERIOD_MS;
}
void GUI_X_Delay(int Period) {
vTaskDelay(Period / portTICK_PERIOD_MS);
}
/*********************************************************************
*
* GUI_X_ExecIdle()
*
*/
void GUI_X_ExecIdle(void) {
vTaskDelay(1 / portTICK_PERIOD_MS);
}
/*********************************************************************
*
* Multitasking:
*
* GUI_X_InitOS()
* GUI_X_GetTaskId()
* GUI_X_Lock()
* GUI_X_Unlock()
*
* Note:
* The following routines are required only if emWin is used in a
* true multi task environment, which means you have more than one
* thread using the emWin API.
* In this case the
* #define GUI_OS 1
* needs to be in GUIConf.h
*/
void GUI_X_InitOS(void) { _Semaphore = xSemaphoreCreateMutex(); }
void GUI_X_Unlock(void) { xSemaphoreGive(_Semaphore); }
void GUI_X_Lock(void) { xSemaphoreTake(_Semaphore, portMAX_DELAY); }
U32 GUI_X_GetTaskId(void) { return (U32)xTaskGetCurrentTaskHandle(); }
/*********************************************************************
*
* Logging: OS dependent
Note:
Logging is used in higher debug levels only. The typical target
build does not use logging and does therefor not require any of
the logging routines below. For a release build without logging
the routines below may be eliminated to save some space.
(If the linker is not function aware and eliminates unreferenced
functions automatically)
*/
#define OS_SendString(s) GUI_USE_PARA(s)
void GUI_X_Log (const char *s) { /*sysprintf(s);*/ }
void GUI_X_Warn (const char *s) { /*sysprintf(s);*/ }
void GUI_X_ErrorOut(const char *s) { /*sysprintf(s);*/ }
/*********************************************************************
*
* GUI_X_Init()
*
* Note:
* This routine is called from GUI_Init() in any case whether there
* is an RTOS or not. You can use it for additional initializations
* needed.
*/
void GUI_X_Init(void) {
}
/*************************** End of file ****************************/
#include <stdlib.h>
#include "GUI.h"
#include "mysys.h"
#include "N9H20TouchPanel.h"
extern GUI_CONST_STORAGE GUI_BITMAP bmgreen_LED_30x30;
extern GUI_CONST_STORAGE GUI_BITMAP bmpexelsphoto371589;
extern GUI_CONST_STORAGE GUI_BITMAP bmpexelsphoto457882;
extern GUI_CONST_STORAGE GUI_BITMAP bmpexelsphoto693521;
extern GUI_CONST_STORAGE GUI_BITMAP bmpexelsphoto753626;
void vStartGUITasks(UBaseType_t uxPriority);
static portTASK_FUNCTION_PROTO(vGUITaskProducer, pvParameters);
void fn_PictureSlideShow(void);
static void fn_ShowInfoPage(void);
void fn_DrawInfoItemValueBg(GUI_RECT* pParentRect, GUI_RECT* pItemRect, GUI_RECT* pValueRect, uint8_t col_num);
void vStartGUITasks(UBaseType_t uxPriority) {
xTaskCreate(vGUITaskProducer, "GUI Task", configMINIMAL_STACK_SIZE, NULL,
uxPriority, NULL);
}
/*-----------------------------------------------------------*/
#define GTR_BKG_COLOR GUI_MAKE_COLOR(0x00292421)
uint16_t RS_Volt, ST_Volt, TR_Volt;
uint16_t RN_Volt, SN_Volt, TN_Volt;
uint16_t R_Amp, S_Amp, T_Amp;
uint16_t Avg_Volt, Avg_Amp;
uint16_t Freq;
static portTASK_FUNCTION_PROTO(vGUITaskProducer, pvParameters) {
RS_Volt = 0;
ST_Volt = 0;
TR_Volt = 0;
RN_Volt = 0;
SN_Volt = 0;
TN_Volt = 0;
R_Amp = 0;
S_Amp = 0;
T_Amp = 0;
Avg_Volt = (RS_Volt + ST_Volt + TR_Volt) / 3;
Avg_Amp = (R_Amp + S_Amp + T_Amp) / 3;
Freq = 0;
GUI_Init();
GUI_Clear();
#if 0
// GUI_DrawBitmap 將圖檔資料繪到 LCD 畫面上
GUI_DrawBitmap(&bmgreen_LED_30x30, 50, 50);
GUI_Delay(1000);
GUI_ClearRect(50, 50, bmgreen_LED_30x30.XSize + 50, bmgreen_LED_30x30.YSize + 50);
#endif
#if 1
// GUI_DrawRoundedFram Test
#endif
#if 0
GUI_SetColor(GTR_BKG_COLOR);
//GUI_DrawRoundedFrame(10, 10, XSIZE_PHYS - 10, YSIZE_PHYS - 10, 10, 2);
GUI_FillRoundedFrame(10, 10, XSIZE_PHYS - 10, YSIZE_PHYS - 10, 10, 2);
GUI_SetColor(GUI_BLUE);
GUI_SetFont(&GUI_Font24B_ASCII);
//GUI_SetTextMode(GUI_TM_NORMAL);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringHCenterAt("This is a gui test!!", XSIZE_PHYS / 2, 50);
GUI_Delay(5000);
GUI_SetColor(GTR_BKG_COLOR);
GUI_FillRoundedFrame(10, 10, XSIZE_PHYS - 10, YSIZE_PHYS - 10, 10, 2);
GUI_SetColor(GUI_YELLOW);
GUI_DispStringHCenterAt("Monicon Instrument Co., Ltd", XSIZE_PHYS / 2, 50);
#endif
#if 1
fn_ShowInfoPage();
#endif
#if 0
while(TRUE) {
fn_PictureSlideShow();
}
#else
while (TRUE) {
GUI_Delay(100);
}
#endif
}
static void fn_SlideDelay(void) {
GUI_Delay(3000);
}
void fn_PictureSlideShow(void) {
#if 1
GUI_DrawBitmapEx(&bmpexelsphoto371589, 0, 0, 0, 0, XSIZE_PHYS *1000 / bmpexelsphoto371589.XSize, YSIZE_PHYS * 1000/bmpexelsphoto371589.YSize);
fn_SlideDelay();
GUI_Clear();
GUI_DrawBitmapEx(&bmpexelsphoto457882, 0, 0, 0, 0, XSIZE_PHYS *1000 / bmpexelsphoto457882.XSize, YSIZE_PHYS * 1000/bmpexelsphoto457882.YSize);
fn_SlideDelay();
GUI_Clear();
#if 0
GUI_DrawBitmapEx(&bmpexelsphoto693521, 0, 0, 0, 0, XSIZE_PHYS *1000 / bmpexelsphoto693521.XSize, YSIZE_PHYS * 1000/bmpexelsphoto693521.YSize);
fn_SlideDelay();
GUI_Clear();
GUI_DrawBitmapEx(&bmpexelsphoto753626, 0, 0, 0, 0, XSIZE_PHYS *1000 / bmpexelsphoto753626.XSize, YSIZE_PHYS * 1000/bmpexelsphoto753626.YSize);
fn_SlideDelay();
GUI_Clear();
#endif
#endif
}
#define TITLE_HEIGHT 40
GUI_RECT PageTitleRect = {0, 0, XSIZE_PHYS-1, TITLE_HEIGHT}; // 水平寬度為 480,繪製外框時要從 0 -- 479
//static char _gInfoTitleText[] = "發電機資訊";
static char _gInfoTitleText[] = "\xe7\x99\xbc\xe9\x9b\xbb\xe6\xa9\x9f\xe8\xb3\x87\xe8\xa8\x8a";
//static char _gInfoTitleText[] = "Genset Infomation";
#define INFO_MARGIN 10
#define INFO_BG_ROUND_RADIUS 10
#define INFO_RECT_WIDTH (XSIZE_PHYS - 3 * INFO_MARGIN) / 2
#define INFO_RECT_HEIGHT (YSIZE_PHYS - TITLE_HEIGHT - INFO_MARGIN * 2)
GUI_RECT PageLeftInfoRect = {INFO_MARGIN, TITLE_HEIGHT + INFO_MARGIN, INFO_RECT_WIDTH + INFO_MARGIN, YSIZE_PHYS - INFO_MARGIN};
GUI_RECT PageRightInfoRect = {INFO_RECT_WIDTH + INFO_MARGIN * 2, TITLE_HEIGHT + INFO_MARGIN, INFO_RECT_WIDTH * 2 + INFO_MARGIN * 2, YSIZE_PHYS - INFO_MARGIN};
extern GUI_CONST_STORAGE GUI_FONT BM_Font_AppleLiGothicFont24;
#define ITEM_TEXT_COLOR GUI_WHITE
#define VALUE_TEXT_COLOR GUI_BLUE
#define UNIT_TEXT_COLOR GUI_GREEN
static void fn_ShowInfoPage(void) {
GUI_RECT itemRect, valueRect, unitRect;
// 顯示 title
GUI_UC_SetEncodeUTF8();
GUI_SetColor(GUI_YELLOW);
GUI_SetFont(&BM_Font_AppleLiGothicFont24);
//GUI_DrawRect(PageTitleRect.x0, PageTitleRect.y0, PageTitleRect.x1, PageTitleRect.y1);
GUI_DispStringHCenterAt(_gInfoTitleText, XSIZE_PHYS/2, 8);
//GUI_DispStringInRect(_gInfoTitleText, &PageTitleRect, GUI_TA_HCENTER | GUI_TA_VCENTER);
// 顯示左資訊欄
GUI_SetColor(GTR_BKG_COLOR);
GUI_FillRoundedFrame(PageLeftInfoRect.x0, PageLeftInfoRect.y0, PageLeftInfoRect.x1, PageLeftInfoRect.y1, INFO_BG_ROUND_RADIUS, 0);
// 顯示資訊項目及其數值
itemRect.x0 = PageLeftInfoRect.x0 + INFO_MARGIN;
itemRect.y0 = PageLeftInfoRect.y0 + INFO_MARGIN;
itemRect.x1 = itemRect.x0 + 120;
itemRect.y1 = itemRect.y0 + 30;
valueRect.x0 = itemRect.x1;
valueRect.y0 = itemRect.y0;
valueRect.x1 = PageLeftInfoRect.x1 - 24;
valueRect.y1 = itemRect.y1;
unitRect.x0 = PageLeftInfoRect.x1 - 24;
unitRect.y0 = itemRect.y0;
unitRect.x1 = PageLeftInfoRect.x1 - 5;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageLeftInfoRect, &itemRect, &valueRect, 0);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("R-S \xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(UNIT_TEXT_COLOR);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(VALUE_TEXT_COLOR);
GUI_DispStringInRect("220.0", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageLeftInfoRect, &itemRect, &valueRect, 1);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("S-T \xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(UNIT_TEXT_COLOR);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(VALUE_TEXT_COLOR);
GUI_DispStringInRect("221.0", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageLeftInfoRect, &itemRect, &valueRect, 2);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("T-R \xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(UNIT_TEXT_COLOR);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(VALUE_TEXT_COLOR);
GUI_DispStringInRect("220.5", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageLeftInfoRect, &itemRect, &valueRect, 3);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("R-N \xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(UNIT_TEXT_COLOR);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(VALUE_TEXT_COLOR);
GUI_DispStringInRect("127.9", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageLeftInfoRect, &itemRect, &valueRect, 4);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("S-N \xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(UNIT_TEXT_COLOR);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(VALUE_TEXT_COLOR);
GUI_DispStringInRect("127.5", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageLeftInfoRect, &itemRect, &valueRect, 5);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("T-N \xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(UNIT_TEXT_COLOR);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(VALUE_TEXT_COLOR);
GUI_DispStringInRect("127.8", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
//----------------------------------------------------------------------------------------------------//
// 顯示右資訊欄
GUI_SetColor(GTR_BKG_COLOR);
GUI_FillRoundedFrame(PageRightInfoRect.x0, PageRightInfoRect.y0, PageRightInfoRect.x1, PageRightInfoRect.y1, INFO_BG_ROUND_RADIUS, 0);
// 顯示資訊項目及其數值
itemRect.x0 = PageRightInfoRect.x0 + INFO_MARGIN;
itemRect.y0 = PageRightInfoRect.y0 + INFO_MARGIN;
itemRect.x1 = itemRect.x0 + 120;
itemRect.y1 = itemRect.y0 + 30;
valueRect.x0 = itemRect.x1;
valueRect.y0 = itemRect.y0;
valueRect.x1 = PageRightInfoRect.x1 - 24;
valueRect.y1 = itemRect.y1;
unitRect.x0 = PageRightInfoRect.x1 - 24;
unitRect.y0 = itemRect.y0;
unitRect.x1 = PageRightInfoRect.x1 - 5;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageRightInfoRect, &itemRect, &valueRect, 0);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("R \xe7\x9b\xb8\xe9\x9b\xbb\xe6\xb5\x81", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringInRect("A", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(GUI_BLUE);
GUI_DispStringInRect("50.0", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageRightInfoRect, &itemRect, &valueRect, 1);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("S \xe7\x9b\xb8\xe9\x9b\xbb\xe6\xb5\x81", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringInRect("A", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(GUI_BLUE);
GUI_DispStringInRect("50.2", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageRightInfoRect, &itemRect, &valueRect, 2);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("T \xe7\x9b\xb8\xe9\x9b\xbb\xe6\xb5\x81", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringInRect("A", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(GUI_BLUE);
GUI_DispStringInRect("50.5", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageRightInfoRect, &itemRect, &valueRect, 3);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("\xe5\xb9\xb3\xe5\x9d\x87\xe7\xb7\x9a\xe9\x9b\xbb\xe5\xa3\x93", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringInRect("V", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(GUI_BLUE);
GUI_DispStringInRect("220.5", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageRightInfoRect, &itemRect, &valueRect, 4);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("\xe5\xb9\xb3\xe5\x9d\x87\xe9\x9b\xbb\xe6\xb5\x81", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringInRect("A", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
GUI_SetColor(GUI_BLUE);
GUI_DispStringInRect("50.2", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
itemRect.y0 += 30;
itemRect.y1 = itemRect.y0 + 30;
valueRect.y0 += 30;
valueRect.y1 = itemRect.y1;
unitRect.y0 += 30;
unitRect.y1 = itemRect.y1;
fn_DrawInfoItemValueBg(&PageRightInfoRect, &itemRect, &valueRect, 5);
GUI_SetColor(ITEM_TEXT_COLOR);
GUI_SetTextMode(GUI_TM_TRANS);
GUI_DispStringInRect("\xe9\xa0\xbb\xe7\x8e\x87", &itemRect, GUI_TA_LEFT | GUI_TA_VCENTER);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringInRect("Hz", &unitRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
valueRect.x1 -= 12;
GUI_SetColor(GUI_BLUE);
GUI_DispStringInRect("60.2", &valueRect, GUI_TA_RIGHT | GUI_TA_VCENTER);
}
void fn_DrawInfoItemValueBg(GUI_RECT* pParentRect, GUI_RECT* pItemRect, GUI_RECT* pValueRect, uint8_t col_num) {
uint32_t col_color = GUI_GRAY_3F;
if (col_num % 2 != 0) {
col_color = GTR_BKG_COLOR;
}
// 畫底色
GUI_SetColor(col_color);
GUI_FillRoundedFrame(pParentRect->x0, pItemRect->y0, pItemRect->x1, pItemRect->y1, 0, 0);
GUI_FillRoundedFrame(pValueRect->x0, pValueRect->y0, pParentRect->x1, pValueRect->y1, 0, 0);
// 畫外框
GUI_SetColor(GUI_GRAY_50);
GUI_DrawRect(pParentRect->x0, pItemRect->y0, pItemRect->x1, pItemRect->y1);
GUI_DrawRect(pValueRect->x0, pValueRect->y0, pParentRect->x1, pValueRect->y1);
}
/*********************************************************************
* *
* SEGGER Microcontroller GmbH *
* Solutions for real time microcontroller applications *
* *
**********************************************************************
* *
* C-file generated by: *
* *
* GUI_Builder for emWin version 6.10 *
* Compiled Dec 19 2019, 16:36:21 *
* (c) 2019 Segger Microcontroller GmbH *
* *
**********************************************************************
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
*/
// USER START (Optionally insert additional includes)
// USER END
#include "DIALOG.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
#define ID_WINDOW_0 (GUI_ID_USER + 0x02)
#define ID_HEADER_0 (GUI_ID_USER + 0x03)
#define ID_IMAGE_0 (GUI_ID_USER + 0x04)
#define ID_IMAGE_0_IMAGE_0 0x00
// USER START (Optionally insert additional defines)
// USER END
/*********************************************************************
*
* Static data
*
**********************************************************************
*/
/*********************************************************************
*
* _acImage_0, "E:\Keil_Project\Nuvoton\Arm9\N9H20\Docs\TmpPicture\green_LED_30x30.bmp", ID_IMAGE_0_IMAGE_0
*/
static const U8 _acImage_0[2814] = {
0x42, 0x4D, 0xFE, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFD, 0xFD, 0xEB, 0xEB, 0xEB,
0xBB, 0x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 0x19, 0x03, 0x58, 0x2D, 0x03, 0x6B, 0x33, 0x05, 0x73, 0x36, 0x08, 0x76, 0x38, 0x08,
0x79, 0x39, 0x08, 0x78, 0x3A, 0x06, 0x74, 0x37, 0x05, 0x6D, 0x32, 0x02, 0x64, 0x30, 0x01, 0x5D, 0x2D, 0x03, 0x4F, 0x2C, 0x00, 0x3B, 0x22, 0x00, 0x22, 0x16, 0x00, 0x05, 0x01, 0x36, 0x34, 0x35, 0x5D, 0x5C, 0x5B, 0x88, 0x89, 0x89, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFD, 0xFD, 0xFD, 0xAC, 0xAC, 0xAC, 0x7B, 0x79, 0x7A, 0x31, 0x38, 0x32, 0x00, 0x21, 0x09, 0x00, 0x5A, 0x2A, 0x03, 0x7C, 0x38, 0x06, 0x89, 0x3C, 0x0E, 0x94,
0x45, 0x12, 0x98, 0x48, 0x0D, 0x97, 0x48, 0x0B, 0x93, 0x42, 0x08, 0x90, 0x40, 0x08, 0x8C, 0x40, 0x06, 0x87, 0x3E, 0x07, 0x7F, 0x3B, 0x06, 0x79, 0x36, 0x01, 0x6E, 0x32, 0x00, 0x5F, 0x2D, 0x01, 0x52, 0x29, 0x00, 0x37, 0x21, 0x00, 0x0E, 0x06, 0x18, 0x18,
0x1A, 0x59, 0x5B, 0x5B, 0x90, 0x91, 0x91, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xCA, 0xCA, 0xCA, 0x82, 0x80, 0x81, 0x4D, 0x4C, 0x4C, 0x00, 0x27, 0x0C, 0x01, 0x61, 0x2E, 0x01, 0x86, 0x3B,
0x08, 0x9A, 0x43, 0x0E, 0xA1, 0x47, 0x04, 0x9C, 0x41, 0x00, 0x99, 0x3F, 0x00, 0x98, 0x3F, 0x00, 0x96, 0x40, 0x00, 0x94, 0x41, 0x00, 0x91, 0x3E, 0x00, 0x8F, 0x3B, 0x00, 0x8B, 0x3B, 0x00, 0x84, 0x38, 0x02, 0x7C, 0x35, 0x00, 0x73, 0x31, 0x01, 0x69, 0x2F,
0x00, 0x56, 0x2B, 0x00, 0x39, 0x20, 0x00, 0x12, 0x09, 0x2E, 0x2B, 0x2D, 0x59, 0x57, 0x58, 0xBB, 0xBA, 0xBB, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xF3, 0xF3, 0xF3, 0x7F, 0x7D, 0x80, 0x63, 0x5D, 0x61, 0x00, 0x2A, 0x0F, 0x00,
0x72, 0x2E, 0x01, 0x94, 0x3B, 0x05, 0xA8, 0x46, 0x03, 0xA6, 0x46, 0x00, 0xA2, 0x46, 0x00, 0xA4, 0x4A, 0x00, 0xA4, 0x4D, 0x00, 0xA3, 0x50, 0x00, 0xA1, 0x50, 0x00, 0x9F, 0x4D, 0x00, 0x9C, 0x4C, 0x00, 0x97, 0x49, 0x00, 0x95, 0x45, 0x00, 0x91, 0x41, 0x00,
0x8D, 0x3C, 0x00, 0x84, 0x37, 0x00, 0x7B, 0x34, 0x00, 0x71, 0x31, 0x00, 0x5C, 0x2B, 0x00, 0x45, 0x24, 0x00, 0x0F, 0x07, 0x42, 0x40, 0x3E, 0x59, 0x57, 0x58, 0xF1, 0xF2, 0xF2, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFE, 0xFE, 0xFE, 0xB3, 0xB2, 0xB3, 0x63, 0x62,
0x63, 0x1C, 0x31, 0x21, 0x00, 0x64, 0x23, 0x01, 0xA2, 0x3F, 0x02, 0xAD, 0x46, 0x00, 0xAA, 0x4A, 0x00, 0xAB, 0x50, 0x00, 0xAC, 0x55, 0x00, 0xAD, 0x59, 0x00, 0xAB, 0x5C, 0x00, 0xAC, 0x5D, 0x00, 0xAB, 0x5D, 0x00, 0xA8, 0x5A, 0x00, 0xA6, 0x59, 0x00, 0xA3,
0x54, 0x00, 0x9F, 0x52, 0x00, 0x9B, 0x4C, 0x00, 0x96, 0x49, 0x00, 0x93, 0x40, 0x00, 0x8D, 0x3D, 0x00, 0x82, 0x35, 0x00, 0x73, 0x31, 0x00, 0x64, 0x2E, 0x00, 0x3E, 0x21, 0x04, 0x12, 0x0C, 0x43, 0x44, 0x41, 0xA0, 0x9F, 0xA1, 0xFE, 0xFE, 0xFE, 0x00, 0x00,
0xF2, 0xF2, 0xF2, 0x85, 0x85, 0x86, 0x48, 0x4B, 0x49, 0x00, 0x3E, 0x15, 0x00, 0x94, 0x39, 0x00, 0xAE, 0x49, 0x00, 0xAD, 0x4D, 0x00, 0xAD, 0x55, 0x01, 0xB0, 0x5E, 0x01, 0xB3, 0x60, 0x00, 0xB2, 0x66, 0x01, 0xB5, 0x68, 0x00, 0xB3, 0x69, 0x00, 0xB1, 0x69,
0x00, 0xAF, 0x69, 0x00, 0xAC, 0x65, 0x00, 0xAB, 0x62, 0x00, 0xA6, 0x5C, 0x00, 0xA2, 0x57, 0x00, 0x9D, 0x51, 0x00, 0x98, 0x4A, 0x00, 0x95, 0x45, 0x00, 0x8E, 0x3C, 0x00, 0x7E, 0x33, 0x04, 0x76, 0x33, 0x09, 0x60, 0x34, 0x00, 0x26, 0x16, 0x27, 0x29, 0x28,
0x6D, 0x69, 0x69, 0xF1, 0xF1, 0xF1, 0x00, 0x00, 0xD1, 0xD1, 0xD1, 0x65, 0x60, 0x64, 0x21, 0x3A, 0x29, 0x00, 0x72, 0x29, 0x00, 0xAD, 0x46, 0x00, 0xB0, 0x50, 0x00, 0xB2, 0x59, 0x02, 0xB5, 0x62, 0x00, 0xBA, 0x6C, 0x00, 0xBA, 0x72, 0x00, 0xBD, 0x74, 0x00,
0xBF, 0x79, 0x02, 0xBF, 0x7B, 0x00, 0xBD, 0x7B, 0x00, 0xBB, 0x79, 0x00, 0xB8, 0x76, 0x00, 0xB3, 0x6F, 0x00, 0xAF, 0x6B, 0x00, 0xAD, 0x65, 0x00, 0xA7, 0x5C, 0x00, 0xA2, 0x56, 0x00, 0x9B, 0x4E, 0x00, 0x97, 0x44, 0x00, 0x8F, 0x3C, 0x01, 0x83, 0x35, 0x0C,
0x77, 0x3C, 0x09, 0x4D, 0x2C, 0x04, 0x1B, 0x10, 0x4D, 0x48, 0x4A, 0xC6, 0xC5, 0xC5, 0x00, 0x00, 0xAA, 0xAA, 0xA9, 0x56, 0x53, 0x55, 0x00, 0x46, 0x19, 0x00, 0x9A, 0x3B, 0x07, 0xB9, 0x56, 0x00, 0xB6, 0x5E, 0x00, 0xBB, 0x67, 0x02, 0xBE, 0x71, 0x03, 0xC2,
0x7B, 0x03, 0xC2, 0x84, 0x03, 0xC6, 0x86, 0x05, 0xC7, 0x8A, 0x03, 0xC7, 0x8C, 0x03, 0xC6, 0x8C, 0x00, 0xC4, 0x8A, 0x00, 0xC2, 0x85, 0x00, 0xBE, 0x7F, 0x00, 0xB9, 0x79, 0x00, 0xB5, 0x72, 0x00, 0xAF, 0x67, 0x00, 0xAA, 0x60, 0x00, 0xA5, 0x57, 0x00, 0x9E,
0x4E, 0x00, 0x97, 0x45, 0x00, 0x91, 0x3A, 0x09, 0x86, 0x3F, 0x0E, 0x6B, 0x39, 0x00, 0x29, 0x16, 0x36, 0x35, 0x33, 0x99, 0x99, 0x99, 0x00, 0x00, 0x8C, 0x8C, 0x8D, 0x50, 0x50, 0x50, 0x00, 0x59, 0x1C, 0x00, 0xA9, 0x4A, 0x1B, 0xC1, 0x6C, 0x01, 0xBB, 0x67,
0x03, 0xC2, 0x72, 0x06, 0xC4, 0x7E, 0x09, 0xC9, 0x88, 0x0A, 0xCA, 0x90, 0x08, 0xCC, 0x95, 0x09, 0xCD, 0x99, 0x05, 0xCF, 0x9A, 0x03, 0xCD, 0x9A, 0x04, 0xCD, 0x98, 0x03, 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 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF9, 0xFA, 0xF9, 0xEA, 0xE8, 0xE9, 0xD6, 0xD3, 0xD3, 0xB8, 0xB2, 0xB4, 0x85, 0x82, 0x89, 0x4E, 0x54, 0x59, 0x23, 0x38, 0x33, 0x19, 0x33, 0x2B, 0x17, 0x32, 0x28, 0x1D, 0x31, 0x28, 0x35, 0x3C, 0x33, 0x55, 0x52, 0x4C, 0x8D,
0x86, 0x84, 0xCB, 0xC9, 0xC0, 0xE7, 0xE7, 0xE2, 0xF9, 0xF8, 0xFA, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xFC, 0xFC, 0xEA, 0xEA, 0xEA, 0xCF, 0xCE, 0xCE, 0xB5, 0xB5, 0xB6, 0x95, 0x94, 0x94, 0x83, 0x82, 0x81, 0x82, 0x81, 0x7F, 0x91, 0x90,
0x8D, 0xAA, 0xAA, 0xA7, 0xC7, 0xC7, 0xC5, 0xE8, 0xE8, 0xE7, 0xFB, 0xFB, 0xFB, 0xFE, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00,
};
// USER START (Optionally insert additional static data)
// USER END
/*********************************************************************
*
* _aDialogCreate
*/
static const GUI_WIDGET_CREATE_INFO _aDialogCreate[] = {
{ WINDOW_CreateIndirect, "gWin", ID_WINDOW_0, 0, -1, 480, 272, 0, 0x0, 0 },
{ HEADER_CreateIndirect, "hStatus", ID_HEADER_0, 0, 0, 480, 30, 0, 0x0, 0 },
{ IMAGE_CreateIndirect, "Image", ID_IMAGE_0, 18, 50, 30, 30, 0, 0, 0 },
// USER START (Optionally insert additional widgets)
// USER END
};
/*********************************************************************
*
* Static code
*
**********************************************************************
*/
/*********************************************************************
*
* _GetImageById
*/
static const void * _GetImageById(U32 Id, U32 * pSize) {
switch (Id) {
case ID_IMAGE_0_IMAGE_0:
*pSize = sizeof(_acImage_0);
return (const void *)_acImage_0;
}
return NULL;
}
// USER START (Optionally insert additional static code)
// USER END
/*********************************************************************
*
* _cbDialog
*/
static void _cbDialog(WM_MESSAGE * pMsg) {
const void * pData;
WM_HWIN hItem;
U32 FileSize;
int NCode;
int Id;
// USER START (Optionally insert additional variables)
// USER END
switch (pMsg->MsgId) {
case WM_INIT_DIALOG:
//
// Initialization of 'gWin'
//
hItem = pMsg->hWin;
WINDOW_SetBkColor(hItem, GUI_MAKE_COLOR(0x00FF8080));
//
// Initialization of 'hStatus'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_HEADER_0);
HEADER_AddItem(hItem, 50, "Page1", 14);
//
// Initialization of 'Image'
//
hItem = WM_GetDialogItem(pMsg->hWin, ID_IMAGE_0);
pData = _GetImageById(ID_IMAGE_0_IMAGE_0, &FileSize);
IMAGE_SetBMP(hItem, pData, FileSize);
// 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_HEADER_0: // Notifications sent by 'hStatus'
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_MOVED_OUT:
// 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
*
**********************************************************************
*/
/*********************************************************************
*
* CreategWin
*/
WM_HWIN CreategWin(void);
WM_HWIN CreategWin(void) {
WM_HWIN hWin;
hWin = GUI_CreateDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
return hWin;
}
/*************************** End of file ****************************/
// USER START (Optionally insert additional public code)
void WindowTask(void) {
GUI_Init();
CreategWin();
while (1) {
GUI_ExecDialogBox(_aDialogCreate, GUI_COUNTOF(_aDialogCreate), _cbDialog, WM_HBKWIN, 0, 0);
GUI_Delay(1000);
}
}
// USER END
/*************************** End of file ****************************/
/*********************************************************************
* SEGGER Microcontroller GmbH & Co. KG *
* Solutions for real time microcontroller applications *
* www.segger.com *
**********************************************************************
* *
* C-file generated by *
* *
* Bitmap Converter (Nuvoton) for emWin V5.48d. *
* Compiled Sep 13 2018, 15:45:54 *
* *
* (c) 1998 - 2018 Segger Microcontroller GmbH *
* *
**********************************************************************
* *
* Source file: green_LED_30x30 *
* Dimensions: 30 * 30 *
* NumColors: 16bpp: 65536 *
* *
**********************************************************************
*/
#include <stdlib.h>
#include "GUI.h"
#ifndef GUI_CONST_STORAGE
#define GUI_CONST_STORAGE const
#endif
extern GUI_CONST_STORAGE GUI_BITMAP bmgreen_LED_30x30;
static GUI_CONST_STORAGE unsigned short _acgreen_LED_30x30[] = {
0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFDF, 0xE75C, 0xCE79, 0xB5B6, 0x94B2, 0x8410, 0x840F, 0x9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 0x2A4B, 0x0B6D, 0x4E36, 0x9F5B, 0x9F7C, 0x9F5C, 0x977C, 0x975C, 0x975B, 0x8F5A, 0x8F5A, 0x8759, 0x8738, 0x7F38, 0x7F17, 0x7F16, 0x8716, 0x5631, 0x0365, 0x09A2, 0xB573, 0xDEFA, 0xFFDF, 0xFFFF, 0xFFFF,
0xFFFF, 0xFFFF, 0xE73C, 0xDEDA, 0x52ED, 0x0B8D, 0x25B3, 0x9F5B, 0xA75C, 0x975D, 0x9F7D, 0x977D, 0x977C, 0x8F7C, 0x877B, 0x875A, 0x7F39, 0x7738, 0x7718, 0x7717, 0x7716, 0x76F5, 0x76F5, 0x2DAD, 0x0384, 0x2A05, 0xDE98, 0xE73C, 0xFFFF, 0xFFFF,
0xFFFF, 0xF7DE, 0xDEFC, 0x8C93, 0x0ACA, 0x1DD2, 0x6EF9, 0xE7DF, 0xBF9E, 0xA77D, 0xB79E, 0xAF9E, 0x979D, 0x8F9D, 0x7F7B, 0x7F7B, 0x775A, 0x6F58, 0x6F38, 0x6717, 0x66F6, 0x66F5, 0x6ED4, 0x5E92, 0x0D6A, 0x02C3, 0x6B6C, 0xE6FB, 0xF7BE, 0xFFFF,
0xFFFF, 0xE75D, 0xCEDC, 0x2B0D, 0x14EF, 0x4696, 0xC79D, 0xD7BE, 0xD7BE, 0xCFBE, 0xE7DF, 0xCFDE, 0xA79E, 0x879D, 0x7F9C, 0x6F9B, 0x6F7A, 0x6759, 0x5F38, 0x5F17, 0x5EF5, 0x56F4, 0x5EB3, 0x5EB3, 0x1DCC, 0x1509, 0x1266, 0xBE38, 0xF7BE, 0xFFFF,
0xF7BE, 0xDF1C, 0x8D36, 0x138B, 0x15D0, 0x873A, 0xC79D, 0xBF9E, 0xCFBE, 0xE7DF, 0xFFFF, 0xDFDF, 0xAFBE, 0x87BE, 0x77BC, 0x6F9C, 0x5F7B, 0x5F59, 0x5738, 0x4F17, 0x56F5, 0x4ED4, 0x4E93, 0x5692, 0x25ED, 0x1D8B, 0x13A8, 0x7492, 0xFFFF, 0xF7DF,
0xD6DB, 0x8C73, 0x2B0C, 0x0C8C, 0x3653, 0xA77B, 0xA77C, 0xA77D, 0xCFBE, 0xDFDF, 0xE7DF, 0xC7DE, 0x97DE, 0x77DE, 0x6FBD, 0x67BC, 0x579B, 0x4F79, 0x4F38, 0x4716, 0x46D5, 0x46B4, 0x4692, 0x4651, 0x1DCD, 0x25CC, 0x24CA, 0x234B, 0xB65B, 0xDF3C,
0xAD75, 0x52AB, 0x02C7, 0x0D4D, 0x2652, 0x5ED7, 0x8F3B, 0xAF9D, 0xB79E, 0xBFBE, 0xA7BE, 0x8FBE, 0x77DE, 0x67DE, 0x5FDD, 0x57BC, 0x4F7B, 0x4759, 0x3F18, 0x3EF6, 0x3EB4, 0x3693, 0x3672, 0x3630, 0x0DAC, 0x25CC, 0x252A, 0x1307, 0x3AAD, 0xADB7,
0x9492, 0x4A6A, 0x0347, 0x15AE, 0x4EB4, 0x1E74, 0x66F8, 0xA77C, 0x8F7C, 0x777D, 0x6F9D, 0x6F9D, 0x67BE, 0x5FDD, 0x4FDD, 0x47BC, 0x3F7A, 0x3F38, 0x3717, 0x36D5, 0x3693, 0x2E72, 0x2E51, 0x1DEE, 0x056A, 0x1D8B, 0x254B, 0x1367, 0x2166, 0x8C72,
0x7BEF, 0x3A28, 0x03C7, 0x25EE, 0x66D5, 0x4ED5, 0x2E95, 0x4F18, 0x4F1A, 0x4F3B, 0x577B, 0x579C, 0x4F9C, 0x47BC, 0x3F9B, 0x377A, 0x3759, 0x2F17, 0x26F6, 0x2694, 0x2672, 0x2651, 0x2610, 0x058C, 0x054A, 0x0D4A, 0x254A, 0x13C7, 0x1123, 0x6B6D,
0x738E, 0x3227, 0x0407, 0x25EE, 0x4693, 0x56D5, 0x3ED5, 0x16B5, 0x36F7, 0x3F19, 0x3F39, 0x3F5A, 0x375A, 0x375A, 0x2F39, 0x2F38, 0x26F7, 0x26D6, 0x1EB4, 0x1E73, 0x1E51, 0x1E10, 0x0DAD, 0x056B, 0x054A, 0x0D29, 0x1D0A, 0x1BA7, 0x1123, 0x5ACB,
0x738E, 0x3207, 0x0407, 0x25ED, 0x3E72, 0x3E93, 0x1652, 0x1693, 0x1ED5, 0x26F6, 0x2F18, 0x2F18, 0x2F18, 0x2718, 0x2717, 0x1EF7, 0x1ED6, 0x1E94, 0x1673, 0x1651, 0x0E10, 0x05CE, 0x058C, 0x054B, 0x0529, 0x0509, 0x1CC9, 0x1367, 0x1123, 0x5ACB,
0x7BCF, 0x4248, 0x0385, 0x15AB, 0x3650, 0x162F, 0x0E30, 0x1672, 0x1693, 0x1694, 0x16B5, 0x16D5, 0x1EB5, 0x16D6, 0x16B5, 0x16B4, 0x0E73, 0x0E52, 0x0E31, 0x05EF, 0x05AE, 0x058C, 0x054B, 0x050A, 0x04E9, 0x0CC8, 0x1C49, 0x0AE6, 0x1103, 0x6B2D,
0x8C71, 0x528A, 0x02C3, 0x0549, 0x1E0D, 0x05CD, 0x060E, 0x0E0F, 0x0E51, 0x0E52, 0x0E52, 0x0E73, 0x0E73, 0x0673, 0x0672, 0x0652, 0x0631, 0x05F0, 0x05CF, 0x05AE, 0x056D, 0x054C, 0x050A, 0x04E9, 0x04C8, 0x0C88, 0x13C8, 0x0224, 0x2124, 0x7BEF,
0xAD55, 0x52AA, 0x0223, 0x04C7, 0x0DCA, 0x05AB, 0x05CD, 0x05EE, 0x060F, 0x0610, 0x0630, 0x0E31, 0x0631, 0x0631, 0x0611, 0x0610, 0x05EF, 0x05CF, 0x05AE, 0x056D, 0x054C, 0x052B, 0x04E9, 0x04A8, 0x0487, 0x0C28, 0x1347, 0x0143, 0x39A6, 0x9CD3,
0xCE99, 0x630C, 0x21C5, 0x0385, 0x0569, 0x056A, 0x058B, 0x05AC, 0x05CD, 0x05CE, 0x05EE, 0x05EF, 0x05EF, 0x05EF, 0x05CF, 0x05AE, 0x058D, 0x056D, 0x056C, 0x052B, 0x050A, 0x04C9, 0x04A8, 0x0467, 0x0406, 0x0BA7, 0x0A65, 0x00E2, 0x4A49, 0xC638,
0xEF9D, 0x8430, 0x4A69, 0x01E3, 0x04A7, 0x0569, 0x0569, 0x056A, 0x056B, 0x058C, 0x058C, 0x05AD, 0x058D, 0x058D, 0x056D, 0x054C, 0x054C, 0x052B, 0x050B, 0x04EA, 0x04C9, 0x04A8, 0x0467, 0x03E6, 0x03A6, 0x0B06, 0x0123, 0x2945, 0x6B4D, 0xEF9D,
0xFFFF, 0xB596, 0x630C, 0x1984, 0x0324, 0x0508, 0x0569, 0x0549, 0x054A, 0x054A, 0x056B, 0x054B, 0x054B, 0x054B, 0x054B, 0x052B, 0x050A, 0x04EA, 0x04C9, 0x04A9, 0x0488, 0x0467, 0x0406, 0x0386, 0x0326, 0x01E4, 0x0081, 0x4228, 0x9CF4, 0xFFFF,
0xFFFF, 0xF79E, 0x7BF0, 0x62EC, 0x0142, 0x0386, 0x04A7, 0x0D49, 0x0529, 0x0509, 0x0529, 0x0529, 0x050A, 0x050A, 0x04E9, 0x04E9, 0x04A9, 0x04A8, 0x0488, 0x0467, 0x0427, 0x03C6, 0x0386, 0x02E5, 0x0224, 0x0081, 0x4208, 0x5AAB, 0xEF9D, 0xFFFF,
0xFFFF, 0xFFFF, 0xCE59, 0x8410, 0x4A69, 0x0141, 0x0306, 0x0427, 0x0CC8, 0x1509, 0x04E8, 0x04C8, 0x04C8, 0x04A8, 0x04A8, 0x0488, 0x0467, 0x0447, 0x0427, 0x03E6, 0x0386, 0x0346, 0x02A5, 0x01C4, 0x0081, 0x3165, 0x5AAB, 0xBDD7, 0xFFFF, 0xFFFF,
0xFFFF, 0xFFFF, 0xFFFF, 0xAD55, 0x7BCF, 0x31C6, 0x0101, 0x02C5, 0x03E7, 0x0C47, 0x14A8, 0x14C9, 0x14A9, 0x0C88, 0x0C88, 0x0C68, 0x0C28, 0x0BE7, 0x0BC7, 0x0366, 0x02E5, 0x0285, 0x01C4, 0x0061, 0x18C3, 0x5ACB, 0x9492, 0xFFF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8430, 0x94B2, 0xBDF7, 0xEF5D, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF
};
GUI_CONST_STORAGE GUI_BITMAP bmgreen_LED_30x30 = {
30, // xSize
30, // ySize
60, // BytesPerLine
16, // BitsPerPixel
(unsigned char *)_acgreen_LED_30x30, // Pointer to picture data
NULL, // Pointer to palette
GUI_DRAW_BMP565
};
/*************************** End of file ****************************/
#include "main.h"
#include "GUI.h"
#include "LCDconf.h"
#include "WM.h"
#include "N9H20TouchPanel.h"
#define mainTASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
#define VPOST_SHOW_IMAGE 0
#define mainNO_ERROR_FLASH_PERIOD ( ( TickType_t ) 3000 / portTICK_PERIOD_MS )
#define mainERROR_FLASH_PERIOD ( ( TickType_t ) 500 / portTICK_PERIOD_MS )
#define mainTASK_PRIORITY (tskIDLE_PRIORITY + 3)
#define guiTASK_PRIORITY (tskIDLE_PRIORITY + 3)
void vStartMainTasks( UBaseType_t uxPriority );
static portTASK_FUNCTION_PROTO( vMainTaskProducer, pvParameters );
#define mainNO_ERROR_FLASH_PERIOD ((TickType_t)3000 / portTICK_PERIOD_MS)
#define mainERROR_FLASH_PERIOD ((TickType_t)500 / portTICK_PERIOD_MS)
static void prvSetupHardware( void );
void vStartMainTasks(UBaseType_t uxPriority);
static portTASK_FUNCTION_PROTO(vMainTaskProducer, pvParameters);
static void prvSetupHardware(void);
#if (VPOST_SHOW_IMAGE == 1)
static void vVPostShowImg(UINT32 *pImgAddr);
#endif
#if (VPOST_SHOW_IMAGE == 1)
__align(32) UINT8 Vpost_Frame[] = {
#include "pic1_480x272_RGB565_u8.dat"
};
#endif
#if (VPOST_SHOW_IMAGE == 1)
__align(32) UINT8 Vpost_Frame2[] = {
#include "pic2_480x272_RGB565_u8.dat"
};
#endif
UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2] __attribute__((aligned(32)));
UINT8 *u8FrameBufPtr;
extern void vStartGUITasks(UBaseType_t uxPriority);
int main() {
prvSetupHardware();
vStartMainTasks(mainTASK_PRIORITY);
vStartGUITasks(guiTASK_PRIORITY);
vTaskStartScheduler();
for (;;){
for (;;) {
vTaskDelay(100);
}
}
/*-----------------------------------------------------------*/
static void prvSetupHardware( void ) {
/* Perform the hardware setup required. This is minimal as most of the
setup is managed by the settings in the project file. */
WB_UART_T uart;
// initial MMU but disable system cache feature
//sysEnableCache(CACHE_DISABLE);
// Cache on
sysEnableCache(CACHE_WRITE_BACK);
sysUartPort(WB_UART_1);
uart.uart_no = WB_UART_1;
uart.uiFreq = sysGetExternalClock() * 1000;
uart.uiBaudrate = 115200;
uart.uiDataBits = WB_DATA_BITS_8;
uart.uiStopBits = WB_STOP_BITS_1;
uart.uiParity = WB_PARITY_NONE;
uart.uiRxTriggerLevel = LEVEL_1_BYTE;
sysInitializeUART(&uart);
sysSetLocalInterrupt(ENABLE_IRQ);
static void prvSetupHardware(void) {
/* Perform the hardware setup required. This is minimal as most of the
setup is managed by the settings in the project file. */
WB_UART_T uart;
LCDFORMATEX lcdFormat;
// initial MMU but disable system cache feature
// sysEnableCache(CACHE_DISABLE);
// Cache on
//sysInvalidCache();
sysEnableCache(CACHE_WRITE_BACK);
//sysFlushCache(I_D_CACHE);
sysUartPort(WB_UART_1);
uart.uart_no = WB_UART_1;
uart.uiFreq = sysGetExternalClock() * 1000;
uart.uiBaudrate = 115200;
uart.uiDataBits = WB_DATA_BITS_8;
uart.uiStopBits = WB_STOP_BITS_1;
uart.uiParity = WB_PARITY_NONE;
uart.uiRxTriggerLevel = LEVEL_1_BYTE;
sysInitializeUART(&uart);
sysSetLocalInterrupt(ENABLE_IRQ);
lcdFormat.ucVASrcFormat = DRVVPOST_FRAME_RGB565;
vpostLCMInit(&lcdFormat, (UINT32*)u8FrameBuf);
u8FrameBufPtr = (UINT8*)((UINT32)u8FrameBuf | 0x80000000);
vpostEnaBacklight();
}
/*-----------------------------------------------------------*/
void vStartMainTasks( UBaseType_t uxPriority ) {
xTaskCreate( vMainTaskProducer, "Main Task", configMINIMAL_STACK_SIZE, NULL, uxPriority, NULL );
void vStartMainTasks(UBaseType_t uxPriority) {
xTaskCreate(vMainTaskProducer, "Main Task", configMINIMAL_STACK_SIZE, NULL,
uxPriority, NULL);
}
/*-----------------------------------------------------------*/
static portTASK_FUNCTION_PROTO( vMainTaskProducer, pvParameters ) {
LCDFORMATEX mainlcdInfo;
static portTASK_FUNCTION_PROTO(vMainTaskProducer, pvParameters) {
static uint16_t uRunCount = 0;
for (;;) {
sysprintf("TaskName=%s, runCount=%d\r\n", pcTaskGetTaskName( NULL ), uRunCount);
vTaskDelay(1000);
sysprintf("TaskName=%s, runCount=%d\r\n", pcTaskGetTaskName(NULL),
uRunCount);
#if (VPOST_SHOW_IMAGE == 1)
if (uRunCount % 2 == 0) {
vVPostShowImg((UINT32 *)Vpost_Frame);
}
#if 1
else {
vVPostShowImg((UINT32 *)Vpost_Frame2);
}
#endif
#endif
vTaskDelay(5000);
uRunCount++;
}
}
/*-----------------------------------------------------------*/
#if (VPOST_SHOW_IMAGE == 1)
static void vVPostShowImg(UINT32 *pImgAddr) {
mainlcdInfo.ucVASrcFormat = DRVVPOST_FRAME_RGB565;
mainlcdInfo.nScreenWidth = 480;
mainlcdInfo.nScreenHeight = 272;
vpostLCMInit(&mainlcdInfo, (UINT32 *)pImgAddr);
vpostEnaBacklight();
}
#endif
/*-----------------------------------------------------------*/
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -31,7 +31,7 @@ void _ttywrch(int ch)
#pragma import(__use_two_region_memory)
__value_in_regs struct R0_R3 {unsigned heap_base, stack_base, heap_limit, stack_limit;}
__user_initial_stackheap(unsigned int R0, unsigned int SP, unsigned int R2, unsigned int SL)
__user_initial_stackheap(unsigned int R0, unsigned int SP, unsigned int R2, unsigned int SL)
{
struct R0_R3 config;
......
......@@ -25,54 +25,54 @@ F_BIT EQU 0x40
;----------------------------
; System / User Stack Memory
;----------------------------
IF :DEF:N9H20K1
IF :DEF:N9H20K1
RAM_Limit EQU 0x200000 ; For unexpanded hardware board
ENDIF
ENDIF
IF :DEF:N9H20K3
IF :DEF:N9H20K3
RAM_Limit EQU 0x800000 ; For unexpanded hardware board
ENDIF
ENDIF
IF :DEF:N9H20K5
IF :DEF:N9H20K5
RAM_Limit EQU 0x2000000 ; For unexpanded hardware board
ENDIF
ENDIF
UND_Stack EQU RAM_Limit
Abort_Stack EQU RAM_Limit-256
IRQ_Stack EQU RAM_Limit-512 ; followed by IRQ stack
FIQ_Stack EQU RAM_Limit-768 ; followed by IRQ stack
SVC_Stack EQU RAM_Limit-1024 ; SVC stack at top of memory
USR_Stack EQU RAM_Limit
UND_Stack EQU RAM_Limit
Abort_Stack EQU RAM_Limit-256
IRQ_Stack EQU RAM_Limit-512 ; followed by IRQ stack
FIQ_Stack EQU RAM_Limit-768 ; followed by IRQ stack
SVC_Stack EQU RAM_Limit-1024 ; SVC stack at top of memory
USR_Stack EQU RAM_Limit
ENTRY
IMPORT vPortYieldProcessor
IMPORT vPreemptiveTick
EXPORT Reset_Go
ENTRY
IMPORT vPortYieldProcessor
IMPORT vPreemptiveTick
EXPORT Reset_Go
EXPORT Vector_Table
EXPORT Vector_Table
Vector_Table
B Reset_Go ; Modified to be relative jumb for external boot
LDR PC, Undefined_Addr
LDR PC, SWI_Addr
LDR PC, Prefetch_Addr
LDR PC, Abort_Addr
DCD 0x0
LDR PC, IRQ_Addr
LDR PC, FIQ_Addr
B Reset_Go ; Modified to be relative jumb for external boot
LDR PC, Undefined_Addr
LDR PC, SWI_Addr
LDR PC, Prefetch_Addr
LDR PC, Abort_Addr
DCD 0x0
LDR PC, IRQ_Addr
LDR PC, FIQ_Addr
Reset_Addr DCD Reset_Go
Undefined_Addr DCD Undefined_Handler
;SWI_Addr DCD SWI_Handler1
SWI_Addr DCD vPortYieldProcessor
Prefetch_Addr DCD Prefetch_Handler
Abort_Addr DCD Abort_Handler
DCD 0
;IRQ_Addr DCD IRQ_Handler
IRQ_Addr DCD vPreemptiveTick
FIQ_Addr DCD FIQ_Handler
Reset_Addr DCD Reset_Go
Undefined_Addr DCD Undefined_Handler
;SWI_Addr DCD SWI_Handler1
SWI_Addr DCD vPortYieldProcessor
Prefetch_Addr DCD Prefetch_Handler
Abort_Addr DCD Abort_Handler
DCD 0
;IRQ_Addr DCD IRQ_Handler
IRQ_Addr DCD vPreemptiveTick
FIQ_Addr DCD FIQ_Handler
; ************************
......@@ -83,18 +83,18 @@ FIQ_Addr DCD FIQ_Handler
; They are set up here for completeness.
Undefined_Handler
B Undefined_Handler
B Undefined_Handler
SWI_Handler1
mov r0, #0
movs pc, lr
mov r0, #0
movs pc, lr
Prefetch_Handler
B Prefetch_Handler
B Prefetch_Handler
Abort_Handler
B Abort_Handler
B Abort_Handler
IRQ_Handler
B IRQ_Handler
B IRQ_Handler
FIQ_Handler
B FIQ_Handler
B FIQ_Handler
Reset_Go
......@@ -103,38 +103,115 @@ Reset_Go
; Initial Stack Pointer register
;--------------------------------
;INIT_STACK
MSR CPSR_c, #UDF_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =UND_Stack
MSR CPSR_c, #UDF_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =UND_Stack
MSR CPSR_c, #ABT_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =Abort_Stack
MSR CPSR_c, #ABT_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =Abort_Stack
MSR CPSR_c, #IRQ_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =IRQ_Stack
MSR CPSR_c, #IRQ_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =IRQ_Stack
MSR CPSR_c, #FIQ_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =FIQ_Stack
MSR CPSR_c, #FIQ_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =FIQ_Stack
MSR CPSR_c, #SYS_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =USR_Stack
MSR CPSR_c, #SYS_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =USR_Stack
MSR CPSR_c, #SVC_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =SVC_Stack
MSR CPSR_c, #SVC_MODE :OR: I_BIT :OR: F_BIT
LDR SP, =SVC_Stack
;------------------------------------------------------
; Set the normal exception vector of CP15 control bit
;------------------------------------------------------
MRC p15, 0, r0 , c1, c0 ; r0 := cp15 register 1
BIC r0, r0, #0x2000 ; Clear bit13 in r1
MCR p15, 0, r0 , c1, c0 ; cp15 register 1 := r0
MRC p15, 0, r0 , c1, c0 ; r0 := cp15 register 1
BIC r0, r0, #0x2000 ; Clear bit13 in r1
MCR p15, 0, r0 , c1, c0 ; cp15 register 1 := r0
IF :DEF:SYS_INIT
;-----------------------------
; system initialization
;------------------------------
;LDR r0, =0xFFF00004
ldr r0, =0xFFF00004
ldr r1, =0x00000540
str r1, [r0]
ldr r0, =0xFFF0000C
ldr r1, =0x00004F47 ; 240MHz: 4F47, 192MHz: 3F47
str r1, [r0]
ldr r0, =0XFFF00010
ldr r1, =0x001FFFFF
str r1, [r0]
ldr r0, =0xFFF00014
ldr r1, =0x104514BB
str r1, [r0]
ldr r0, =0xFFF00020
ldr r1, =0x00000009
str r1, [r0]
ldr r0, =0xFFF00030
ldr r1, =0x00000000
str r1, [r0]
ldr r0, =0XFFF00034
ldr r1, =0x00000000
str r1, [r0]
ldr r0, =0xFFF00038
ldr r1, =0x000001AB
str r1, [r0]
ldr r0, =0xFFF0003C
ldr r1, =0x00000050 ;CPU:AHP:APB 1:2:4 0x50, CPU:AHB:APB 1:1:2 0x41
str r1, [r0]
ldr r0, =0xFFF00040
ldr r1, =0x60000000
str r1, [r0]
ldr r0, =0xFFF01000
ldr r1, =0x00154201
str r1, [r0]
ldr r0, =0xFFF01004
ldr r1, =0x4006FFF6
str r1, [r0]
ldr r0, =0xFFF01010
ldr r1, =0x000090CD ;16M: 90CC, 32M: 90CD
str r1, [r0]
ldr r0, =0xFFF01018
ldr r1, =0x0000015B
str r1, [r0]
ldr r0, =0xFFF01020
ldr r1, =0x80007FFD
str r1, [r0]
ldr r0, =0xFFF01028
ldr r1, =0x00000027
str r1, [r0]
ldr r0, =0xFFF0001C
ldr r1, =0x00000080
str r1, [r0]
ENDIF
IMPORT __main
IMPORT __main
;-----------------------------
; enter the C code
;-----------------------------
B __main
B __main
END
......
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2019 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V6.10 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2020-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : GUIConf.c
Purpose : Display controller initialization
---------------------------END-OF-HEADER------------------------------
*/
#include "GUI.h"
/*********************************************************************
*
* Defines
*
**********************************************************************
*/
//
// Define the available number of bytes available for the GUI
//
#define GUI_NUMBYTES 0x1000 //0x20000
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
/*********************************************************************
*
* 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);
//
// Set default font
//
GUI_SetDefaultFont(GUI_FONT_6X8);
}
/*************************** End of file ****************************/
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2019 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V6.10 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2020-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : GUIConf.h
Purpose : Configures emWins abilities, fonts etc.
----------------------------------------------------------------------
*/
#ifndef GUICONF_H
#define GUICONF_H
/*********************************************************************
*
* Multi layer/display support
*/
#define GUI_NUM_LAYERS 1 // Maximum number of available layers
/*********************************************************************
*
* Multi tasking support
*/
#define GUI_OS (0) // Compile with multitasking support
/*********************************************************************
*
* Configuration of touch support
*/
#define GUI_SUPPORT_TOUCH (1) // Support a touch screen (req. win-manager)
/*********************************************************************
*
* Default font
*/
#define GUI_DEFAULT_FONT &GUI_Font6x8
/*********************************************************************
*
* Configuration of available packages
*/
#define GUI_SUPPORT_MOUSE 1 // Mouse support
#define GUI_WINSUPPORT 1 // Use Window Manager
#define GUI_SUPPORT_MEMDEV 1 // Use Memory Devices
#define GUI_SUPPORT_DEVICES 1 // Enable use of device pointers
#endif // Avoid multiple inclusion
/*************************** End of file ****************************/
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2019 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V6.10 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2020-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : GUI_X.C
Purpose : Config / System dependent externals for GUI
---------------------------END-OF-HEADER------------------------------
*/
#include "GUI.h"
/*********************************************************************
*
* Global data
*/
volatile GUI_TIMER_TIME OS_TimeMS;
/*********************************************************************
*
* Timing:
* GUI_X_GetTime()
* GUI_X_Delay(int)
Some timing dependent routines require a GetTime
and delay function. Default time unit (tick), normally is
1 ms.
*/
GUI_TIMER_TIME GUI_X_GetTime(void) {
return OS_TimeMS;
}
void GUI_X_Delay(int ms) {
int tEnd = OS_TimeMS + ms;
while ((tEnd - OS_TimeMS) > 0);
}
/*********************************************************************
*
* GUI_X_Init()
*
* Note:
* GUI_X_Init() is called from GUI_Init is a possibility to init
* some hardware which needs to be up and running before the GUI.
* If not required, leave this routine blank.
*/
void GUI_X_Init(void) {}
/*********************************************************************
*
* GUI_X_ExecIdle
*
* Note:
* Called if WM is in idle state
*/
void GUI_X_ExecIdle(void) {}
/*********************************************************************
*
* Logging: OS dependent
Note:
Logging is used in higher debug levels only. The typical target
build does not use logging and does therefor not require any of
the logging routines below. For a release build without logging
the routines below may be eliminated to save some space.
(If the linker is not function aware and eliminates unreferenced
functions automatically)
*/
void GUI_X_Log (const char *s) { GUI_USE_PARA(s); }
void GUI_X_Warn (const char *s) { GUI_USE_PARA(s); }
void GUI_X_ErrorOut(const char *s) { GUI_USE_PARA(s); }
/*********************************************************************
*
* Multitasking:
*
* GUI_X_InitOS()
* GUI_X_GetTaskId()
* GUI_X_Lock()
* GUI_X_Unlock()
*
* Note:
* The following routines are required only if emWin is used in a
* true multi task environment, which means you have more than one
* thread using the emWin API.
* In this case the
* #define GUI_OS 1
* needs to be in GUIConf.h
*/
void GUI_X_InitOS(void) { }
void GUI_X_Unlock(void) { }
void GUI_X_Lock(void) { }
U32 GUI_X_GetTaskId(void) { return 1; }
/*********************************************************************
*
* Event driving (optional with multitasking)
*
* GUI_X_WaitEvent()
* GUI_X_WaitEventTimed()
* GUI_X_SignalEvent()
*/
void GUI_X_WaitEvent(void) { }
void GUI_X_SignalEvent(void) { }
void GUI_X_WaitEventTimed(int Period) { }
/*************************** End of file ****************************/
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2019 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V6.10 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2020-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : LCDConf.c
Purpose : Display controller configuration (single layer)
---------------------------END-OF-HEADER------------------------------
*/
#include "GUI.h"
#include "GUIDRV_Lin.h"
#include "LCDConf.h"
#include "N9H20.h"
#include "N9H20TouchPanel.h"
/*********************************************************************
*
* Layer configuration
*
**********************************************************************
*/
//
// Physical display size
//
//
// Color conversion
//
#define COLOR_CONVERSION GUICC_M565
//
// Display driver
//
//#define DISPLAY_DRIVER GUIDRV_FLEXCOLOR
#define DISPLAY_DRIVER GUIDRV_LIN_16
//
// Buffers / VScreens
//
#define NUM_BUFFERS 1 // Number of multiple buffers to be used
#define NUM_VSCREENS 1 // Number of virtual screens to be used
//
// Orientation
//
//#define DISPLAY_ORIENTATION (0)
//#define DISPLAY_ORIENTATION (GUI_MIRROR_X)
//#define DISPLAY_ORIENTATION (GUI_MIRROR_Y)
//#define DISPLAY_ORIENTATION (GUI_MIRROR_X | GUI_MIRROR_Y)
//#define DISPLAY_ORIENTATION (GUI_SWAP_XY)
//#define DISPLAY_ORIENTATION (GUI_MIRROR_X | GUI_SWAP_XY)
//#define DISPLAY_ORIENTATION (GUI_MIRROR_Y | GUI_SWAP_XY)
//#define DISPLAY_ORIENTATION (GUI_MIRROR_X | GUI_MIRROR_Y | GUI_SWAP_XY)
/*********************************************************************
*
* Configuration checking
*
**********************************************************************
*/
#ifndef VXSIZE_PHYS
#define VXSIZE_PHYS XSIZE_PHYS
#endif
#ifndef VYSIZE_PHYS
#define VYSIZE_PHYS YSIZE_PHYS
#endif
#ifndef XSIZE_PHYS
//#error Physical X size of display is not defined!
#endif
#ifndef YSIZE_PHYS
//#error Physical Y size of display is not defined!
#endif
#ifndef COLOR_CONVERSION
#error Color conversion not defined!
#endif
#ifndef DISPLAY_DRIVER
#error No display driver defined!
#endif
#ifndef DISPLAY_ORIENTATION
#define DISPLAY_ORIENTATION 0
#endif
// Touch panel
//#define GUI_TOUCH_AD_LEFT 72
//#define GUI_TOUCH_AD_TOP 926 //82
//#define GUI_TOUCH_AD_RIGHT 938
//#define GUI_TOUCH_AD_BOTTOM 82 //926
/*********************************************************************
*
* Public code
*
**********************************************************************
*/
extern UINT8 *u8FrameBufPtr;
extern int ts_phy2log(int *sumx, int *sumy);
void GUI_TOUCH_X_ActivateX(void)
{
}
void GUI_TOUCH_X_ActivateY(void)
{
}
int GUI_TOUCH_X_MeasureX(void)
{
int sumx;
int sumy;
if (Read_TouchPanel(&sumx, &sumy))
{
sysprintf("X = %d\n", sumx);
ts_phy2log(&sumx, &sumy);
return sumx;
}
return -1;
}
int GUI_TOUCH_X_MeasureY(void)
{
int sumx;
int sumy;
if ( Read_TouchPanel(&sumx, &sumy) )
{
sysprintf("Y = %d\n", sumy);
ts_phy2log(&sumx, &sumy);
return sumy;
}
return -1;
}
/*********************************************************************
*
* LCD_X_Config
*
* Purpose:
* Called during the initialization process in order to set up the
* display driver configuration.
*
*/
void LCD_X_Config(void)
{
// LCD calibration
#if (NUM_BUFFERS > 1)
GUI_MULTIBUF_Config(NUM_BUFFERS);
#endif
//
// Set display driver and color conversion for 1st layer
//
GUI_DEVICE_CreateAndLink(DISPLAY_DRIVER, COLOR_CONVERSION, 0, 0);
if (LCD_GetSwapXY())
{
LCD_SetSizeEx (0, YSIZE_PHYS, XSIZE_PHYS);
LCD_SetVSizeEx(0, YSIZE_PHYS * NUM_VSCREENS, XSIZE_PHYS);
}
else
{
LCD_SetSizeEx (0, XSIZE_PHYS, YSIZE_PHYS);
LCD_SetVSizeEx(0, XSIZE_PHYS, YSIZE_PHYS * NUM_VSCREENS);
}
LCD_SetVRAMAddrEx(0, (void *)u8FrameBufPtr);
//
// Set user palette data (only required if no fixed palette is used)
//
#if defined(PALETTE)
LCD_SetLUTEx(0, PALETTE);
#endif
// LCD calibration
//
// Calibrate touch screen
//
GUI_TOUCH_Calibrate(GUI_COORD_X, 0, XSIZE_PHYS, 0, XSIZE_PHYS);
GUI_TOUCH_Calibrate(GUI_COORD_Y, 0, YSIZE_PHYS, 0, YSIZE_PHYS);
}
/*********************************************************************
*
* LCD_X_DisplayDriver
*
* Purpose:
* This function is called by the display driver for several purposes.
* To support the according task the routine needs to be adapted to
* the display controller. Please note that the commands marked with
* 'optional' are not cogently required and should only be adapted if
* the display controller supports these features.
*
* Parameter:
* LayerIndex - Index of layer to be configured
* Cmd - Please refer to the details in the switch statement below
* pData - Pointer to a LCD_X_DATA structure
*/
int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * pData)
{
int r;
switch (Cmd)
{
//
// Required
//
case LCD_X_INITCONTROLLER:
{
//
// Called during the initialization process in order to set up the
// display controller and put it into operation. If the display
// controller is not initialized by any external routine this needs
// to be adapted by the customer...
//
// LCD_ON();
return 0;
}
case LCD_X_SETVRAMADDR:
{
//
// Required for setting the address of the video RAM for drivers
// with memory mapped video RAM which is passed in the 'pVRAM' element of p
//
LCD_X_SETVRAMADDR_INFO * p;
p = (LCD_X_SETVRAMADDR_INFO *)pData;
pData=(void*)u8FrameBufPtr;
GUI_USE_PARA(p);
//...
return 0;
}
case LCD_X_SETORG:
{
//
// Required for setting the display origin which is passed in the 'xPos' and 'yPos' element of p
//
LCD_X_SETORG_INFO * p;
p = (LCD_X_SETORG_INFO *)pData;
pData=(void*)u8FrameBufPtr;
GUI_USE_PARA(p);
//...
return 0;
}
case LCD_X_SHOWBUFFER:
{
//
// Required if multiple buffers are used. The 'Index' element of p contains the buffer index.
//
LCD_X_SHOWBUFFER_INFO * p;
p = (LCD_X_SHOWBUFFER_INFO *)pData;
GUI_USE_PARA(p);
//...
return 0;
}
case LCD_X_SETLUTENTRY:
{
//
// Required for setting a lookup table entry which is passed in the 'Pos' and 'Color' element of p
//
LCD_X_SETLUTENTRY_INFO * p;
p = (LCD_X_SETLUTENTRY_INFO *)pData;
GUI_USE_PARA(p);
//...
return 0;
}
case LCD_X_ON:
{
//
// Required if the display controller should support switching on and off
//
return 0;
}
case LCD_X_OFF:
{
//
// Required if the display controller should support switching on and off
//
// ...
return 0;
}
default:
r = -1;
}
return r;
}
/*************************** End of file ****************************/
/*********************************************************************
* SEGGER Software GmbH *
* Solutions for real time microcontroller applications *
**********************************************************************
* *
* (c) 1996 - 2019 SEGGER Microcontroller GmbH *
* *
* Internet: www.segger.com Support: support@segger.com *
* *
**********************************************************************
** emWin V6.10 - Graphical user interface for embedded applications **
All Intellectual Property rights in the Software belongs to SEGGER.
emWin is protected by international copyright laws. Knowledge of the
source code may not be used to write a similar product. This file may
only be used in accordance with the following terms:
The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan
for the purposes of creating libraries for its
Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation
under the terms and conditions of an End User
License Agreement supplied with the libraries.
Full source code is available at: www.segger.com
We appreciate your understanding and fairness.
----------------------------------------------------------------------
Licensing information
Licensor: SEGGER Software GmbH
Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan
Licensed SEGGER software: emWin
License number: GUI-00735
License model: emWin License Agreement, signed February 27, 2018
Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation
----------------------------------------------------------------------
Support and Update Agreement (SUA)
SUA period: 2018-03-26 - 2020-03-27
Contact to extend SUA: sales@segger.com
----------------------------------------------------------------------
File : LCDConf.h
Purpose : Display driver configuration file
----------------------------------------------------------------------
*/
#ifndef LCDCONF_H
#define LCDCONF_H
#endif /* LCDCONF_H */
/*************************** End of file ****************************/
/**************************************************************************//**
* @file N9H20TouchPanel.c
* @brief N9H20 series emWin touch flow
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
*****************************************************************************/
#include "GUI.h"
#include "N9H20.h"
#include "N9H20TouchPanel.h"
INT32 g_u16X, g_u16Y;
volatile BOOL g_bXY;
extern int ts_phy2log(int *sumx, int *sumy);
int Init_TouchPanel(void)
{
adc_init();
adc_open(ADC_TS_4WIRE, XSIZE_PHYS, YSIZE_PHYS); //320x240
return 1;
}
int Read_TouchPanel(int *x, int *y)
{
//return 0 fai;ure, 1 success.
unsigned short adc_x, adc_y;
if ( adc_read(ADC_NONBLOCK, (unsigned short *)&adc_x, (unsigned short *)&adc_y) == 1)
{
*x = adc_x;
*y = adc_y;
g_bXY = TRUE;
return 1;
}
g_bXY = FALSE;
return 0;
}
int Uninit_TouchPanel(void)
{
adc_close();
return 1;
}
int Check_TouchPanel(void)
{
if ( (inp32(REG_ADC_TSC) & ADC_UD) == ADC_UD)
return 1; //Pen down;
else
return 0; //Pen up;
}
void TouchTask(void)
{
static U16 xOld;
static U16 yOld;
static U8 PressedOld = 0;
int x, y, xDiff, yDiff;
BOOL Pressed;
Read_TouchPanel(&g_u16X, &g_u16Y);
Pressed = g_bXY;// TBD: Insert function which returns:
// 1, if the touch screen is pressed
// 0, if the touch screen is released
//
// Touch screen is pressed
//
if (Pressed)
{
x = g_u16X;// TBD: Insert function which reads current x value
y = g_u16Y;// TBD: Insert function which reads current y value
ts_phy2log(&x, &y);
//
// The touch has already been pressed
//
if (PressedOld == 1)
{
//
// Calculate difference between new and old position
//
xDiff = (x > xOld) ? (x - xOld) : (xOld - x);
yDiff = (y > yOld) ? (y - yOld) : (yOld - y);
//
// Store state if new position differs significantly from old position
//
if (xDiff + yDiff > 2)
{
xOld = x;
yOld = y;
GUI_TOUCH_StoreState(x, y);
/*
sysprintf("X=%d, Y=%d\n", x,y);
State.x = x;
State.y = y;
State.Layer = 0;
State.Pressed = 1;
GUI_PID_StoreState(&State);
*/
}
}
//
// The touch was previously released
// Store state regardless position
//
else
{
if ((x != 0) && (y != 0))
{
// if ( g_u32Release > 1200 )
// return;
xOld = x;
yOld = y;
PressedOld = 1;
GUI_TOUCH_StoreState(x, y);
/*
sysprintf("X=%d, Y=%d\n", x,y);
State.x = x;
State.y = y;
State.Layer = 0;
State.Pressed = 1;
GUI_PID_StoreState(&State);
*/
}
}
}
else
{
if (PressedOld == 1)
{
PressedOld = 0;
GUI_TOUCH_StoreState(-1, -1);
/*
sysprintf("X=-1, Y=-1\n");
State.x = 0;
State.y = 0;
State.Layer = 0;
State.Pressed = 0;
GUI_PID_StoreState(&State);
*/
}
}
//
// Make sure
//
}
/**************************************************************************//**
* @file N9H20TouchPanel.h
* @brief N9H20 series emWin touch header file
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
*****************************************************************************/
#ifndef __N9H20TOUCHPANEL_H__
#define __N9H20TOUCHPANEL_H__
/*********************************************************************
Constraints on LCD panel N9H20_VPOST_FW050TFT_800x480.lib:
1. Resolution is 800x480. (N9H20K1 has no such target because of the DRAM size limitation)
2. VPOST OSD function must disable. (VPOST H/W limitation)
3. PLL clock is 192 MHz, the pixel clock is 192/6 = 32 MHz.
4. 32,000,000/1056/525 = 57.7 FPS (frame per second)
5. If the bus bandwidth condition is too busy it may causes blinking result.
*/
#ifdef __800x480__
#define XSIZE_PHYS 800
#define YSIZE_PHYS 480
#else
#ifdef __480x272__
#define XSIZE_PHYS 480
#define YSIZE_PHYS 272
#else
#define XSIZE_PHYS 320
#define YSIZE_PHYS 240
#endif
#endif
#define LCD_XSIZE XSIZE_PHYS
#define LCD_YSIZE YSIZE_PHYS
int Init_TouchPanel(void);
int Read_TouchPanel(int *x, int *y);
int Uninit_TouchPanel(void);
int Check_TouchPanel(void);
int Wait_PressDown(void);
#endif
/*
* fbutils.c
*
* Utility routines for framebuffer interaction
*
* Copyright 2002 Russell King and Doug Lowder
*
* This file is placed under the GPL. Please see the
* file COPYING for details.
*
*/
/*
2020/06/22, add the APIs function sort_by_x(), sort_by_y(), and getxy()
from the file testutils.c.
add the APIs function perform_calibration() and get_sample()
from the file ts_calibrate.c.
*/
#include "stdlib.h"
#include "fbutils.h"
#include "GUI.h"
int ts_Read_TouchPanel(int *x, int *y);
void put_cross(int x, int y)
{
GUI_DrawLine(x - 10, y, x - 2, y);
GUI_DrawLine(x + 2, y, x + 10, y);
GUI_DrawLine(x, y - 10, x, y - 2);
GUI_DrawLine(x, y + 2, x, y + 10);
GUI_DrawLine(x - 6, y - 9, x - 9, y - 9);
GUI_DrawLine(x - 9, y - 8, x - 9, y - 6);
GUI_DrawLine(x - 9, y + 6, x - 9, y + 9);
GUI_DrawLine(x - 8, y + 9, x - 6, y + 9);
GUI_DrawLine(x + 6, y + 9, x + 9, y + 9);
GUI_DrawLine(x + 9, y + 8, x + 9, y + 6);
GUI_DrawLine(x + 9, y - 6, x + 9, y - 9);
GUI_DrawLine(x + 8, y - 9, x + 6, y - 9);
}
int perform_calibration(calibration *cal)
{
int j;
float n, x, y, x2, y2, xy, z, zx, zy;
float det, a, b, c, e, f, i;
float scaling = 65536.0;
// Get sums for matrix
n = x = y = x2 = y2 = xy = 0;
for(j=0; j<5; j++)
{
n += 1.0;
x += (float)cal->x[j];
y += (float)cal->y[j];
x2 += (float)(cal->x[j]*cal->x[j]);
y2 += (float)(cal->y[j]*cal->y[j]);
xy += (float)(cal->x[j]*cal->y[j]);
}
// Get determinant of matrix -- check if determinant is too small
det = n*(x2*y2 - xy*xy) + x*(xy*y - x*y2) + y*(x*xy - y*x2);
if(det < 0.1 && det > -0.1)
{
// sysprintf("ts_calibrate: determinant is too small -- %f\n",det);
return 0;
}
// Get elements of inverse matrix
a = (x2*y2 - xy*xy)/det;
b = (xy*y - x*y2)/det;
c = (x*xy - y*x2)/det;
e = (n*y2 - y*y)/det;
f = (x*y - n*xy)/det;
i = (n*x2 - x*x)/det;
// Get sums for x calibration
z = zx = zy = 0;
for(j=0; j<5; j++)
{
z += (float)cal->xfb[j];
zx += (float)(cal->xfb[j]*cal->x[j]);
zy += (float)(cal->xfb[j]*cal->y[j]);
}
// Now multiply out to get the calibration for framebuffer x coord
cal->a[0] = (int)((a*z + b*zx + c*zy)*(scaling));
cal->a[1] = (int)((b*z + e*zx + f*zy)*(scaling));
cal->a[2] = (int)((c*z + f*zx + i*zy)*(scaling));
#if 0 //close
sysprintf("%f %f %f\n",(a*z + b*zx + c*zy),
(b*z + e*zx + f*zy),
(c*z + f*zx + i*zy));
#endif
// Get sums for y calibration
z = zx = zy = 0;
for(j=0; j<5; j++)
{
z += (float)cal->yfb[j];
zx += (float)(cal->yfb[j]*cal->x[j]);
zy += (float)(cal->yfb[j]*cal->y[j]);
}
// Now multiply out to get the calibration for framebuffer y coord
cal->a[3] = (int)((a*z + b*zx + c*zy)*(scaling));
cal->a[4] = (int)((b*z + e*zx + f*zy)*(scaling));
cal->a[5] = (int)((c*z + f*zx + i*zy)*(scaling));
#if 0 // closed
sysprintf("%f %f %f\n",(a*z + b*zx + c*zy),
(b*z + e*zx + f*zy),
(c*z + f*zx + i*zy));
#endif
// If we got here, we're OK, so assign scaling to a[6] and return
cal->a[6] = (int)scaling;
return 1;
}
int sort_by_x(const void* a, const void *b)
{
return (((struct ts_sample *)a)->x - ((struct ts_sample *)b)->x);
}
int sort_by_y(const void* a, const void *b)
{
return (((struct ts_sample *)a)->y - ((struct ts_sample *)b)->y);
}
void getxy(int *x, int *y)
{
#define MAX_SAMPLES 128
struct ts_sample samp[MAX_SAMPLES];
int index, middle;
int sumx, sumy;
// sysprintf("getxy\n");
again:
do
{
if ( ts_Read_TouchPanel(&sumx, &sumy) > 0 )
{
if ( (sumx < 0) || ( sumy < 0 ) )
continue;
break;
}
}
while (1);
/* Now collect up to MAX_SAMPLES touches into the samp array. */
index = 0;
do
{
if (index < MAX_SAMPLES-1)
index++;
if ( ts_Read_TouchPanel(&sumx, &sumy) > 0)
{
samp[index].x = sumx;
samp[index].y = sumy;
samp[index].pressure = 1000;
}
else
{
samp[index].x = samp[index-1].x;
samp[index].y = samp[index-1].y;
samp[index].pressure = 0;
}
// sysprintf("%d %d %d\n", samp[index].x, samp[index].y , samp[index].pressure);
}
while (samp[index].pressure > 0);
// sysprintf("Took %d samples...\n",index);
/*
* At this point, we have samples in indices zero to (index-1)
* which means that we have (index) number of samples. We want
* to calculate the median of the samples so that wild outliers
* don't skew the result. First off, let's assume that arrays
* are one-based instead of zero-based. If this were the case
* and index was odd, we would need sample number ((index+1)/2)
* of a sorted array; if index was even, we would need the
* average of sample number (index/2) and sample number
* ((index/2)+1). To turn this into something useful for the
* real world, we just need to subtract one off of the sample
* numbers. So for when index is odd, we need sample number
* (((index+1)/2)-1). Due to integer division truncation, we
* can simplify this to just (index/2). When index is even, we
* need the average of sample number ((index/2)-1) and sample
* number (index/2). Calculate (index/2) now and we'll handle
* the even odd stuff after we sort.
*/
middle = index/2;
if (x)
{
qsort(samp, index, sizeof(struct ts_sample), sort_by_x);
if (index & 1)
*x = samp[middle].x;
else
*x = (samp[middle-1].x + samp[middle].x) / 2;
}
if (y)
{
qsort(samp, index, sizeof(struct ts_sample), sort_by_y);
if (index & 1)
*y = samp[middle].y;
else
*y = (samp[middle-1].y + samp[middle].y) / 2;
}
if ( (index <= 3) || ( *x < 0) || ( *y < 0 ) )
goto again;
}
void get_sample(calibration *cal,int index, int x, int y, char *name)
{
static int last_x = -1, last_y;
if (last_x != -1)
{
#define NR_STEPS 10
int dx = ((x - last_x) << 16) / NR_STEPS;
int dy = ((y - last_y) << 16) / NR_STEPS;
int i;
last_x <<= 16;
last_y <<= 16;
for (i = 0; i < NR_STEPS; i++)
{
put_cross (last_x >> 16, last_y >> 16);
//usleep (1000);
// GUI_Delay(1);
put_cross (last_x >> 16, last_y >> 16);
last_x += dx;
last_y += dy;
}
}
put_cross(x, y);
getxy (&cal->x [index], &cal->y [index]);
put_cross(x, y);
last_x = cal->xfb [index] = x;
last_y = cal->yfb [index] = y;
// sysprintf("%s : X = %4d Y = %4d\n", name, cal->x [index], cal->y [index]);
}
/*
* fbutils.h
*
* Headers for utility routines for framebuffer interaction
*
* Copyright 2002 Russell King and Doug Lowder
*
* This file is placed under the GPL. Please see the
* file COPYING for details.
*
*/
#ifndef _FBUTILS_H
#define _FBUTILS_H
struct ts_sample
{
int x;
int y;
unsigned int pressure;
};
typedef struct
{
int x[5], xfb[5];
int y[5], yfb[5];
int a[7];
} calibration;
void put_cross(int x, int y);
int perform_calibration(calibration *cal);
void get_sample (calibration *cal,int index, int x, int y, char *name);
#endif /* _FBUTILS_H */
/*
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the GPL. Please see the file
* COPYING for more details.
*
* $Id: testutils.c,v 1.2 2004/10/19 22:01:27 dlowder Exp $
*
* Waits for the screen to be touched, averages x and y sample
* coordinates until the end of contact
*/
/*
2020/06/22, move the APIs function sort_by_x(), sort_by_y(), and getxy()
into the file fbutils.c.
GUI APIs are changed into emWin GUI APIs.
*/
#include <stdio.h>
#include <stdlib.h>
#include "N9H20.h"
#include "fbutils.h"
#include "GUI.h"
#include "N9H20TouchPanel.h"
extern int ts_phy2log(int *sumx, int *sumy);
extern unsigned int xres, yres;
static int palette [] =
{
/*0x000000, 0xffe080, 0xffffff, 0xe0c0a0, 0x304050, 0x80b8c0*/
GUI_MAKE_COLOR(0x000000), GUI_MAKE_COLOR(0x80e0ff), GUI_MAKE_COLOR(0xffffff), GUI_MAKE_COLOR(0xa0c0e0), GUI_MAKE_COLOR(0x504030), GUI_MAKE_COLOR(0xc0b880),
GUI_MAKE_COLOR(0x7F1F00), GUI_MAKE_COLOR(0x20201F), GUI_MAKE_COLOR(0x5F3F1F), GUI_MAKE_COLOR(0xAFBFCF), GUI_MAKE_COLOR(0xF080D0), GUI_MAKE_COLOR(0x3F477F),
GUI_MAKE_COLOR(0x207820)
};
#define NR_COLORS (sizeof (palette) / sizeof (palette [0]))
#define NR_BUTTONS 3
struct ts_button
{
int x, y, w, h;
char *text;
int flags;
#define BUTTON_ACTIVE 0x00000001
};
static struct ts_button buttons [NR_BUTTONS];
/* [inactive] border fill text [active] border fill text */
static int button_palette [6] =
{
1, 4, 2,
1, 5, 0
};
void button_draw (struct ts_button *button)
{
int s = (button->flags & BUTTON_ACTIVE) ? 3 : 0;
GUI_SetColor(palette[button_palette [s]]);
GUI_DrawRect(button->x, button->y, button->x + button->w, button->y + button->h);
GUI_SetColor(palette[button_palette [s+1]]);
GUI_FillRect(button->x + 1, button->y + 1, button->x + button->w - 2, button->y + button->h - 2 );
GUI_SetColor(palette[button_palette [s + 2]]);
GUI_DispStringHCenterAt(button->text, button->x + button->w / 2, button->y + button->h / 2);
}
int button_handle (struct ts_button *button, int x, int y, unsigned int p)
{
int inside = (x >= button->x) && (y >= button->y) &&
(x < button->x + button->w) &&
(y < button->y + button->h);
if (p > 0)
{
if (inside)
{
if (!(button->flags & BUTTON_ACTIVE))
{
button->flags |= BUTTON_ACTIVE;
button_draw (button);
}
}
else if (button->flags & BUTTON_ACTIVE)
{
button->flags &= ~BUTTON_ACTIVE;
button_draw (button);
}
}
else if (button->flags & BUTTON_ACTIVE)
{
button->flags &= ~BUTTON_ACTIVE;
button_draw (button);
return 1;
}
return 0;
}
static void refresh_screen(void)
{
int i;
//fillrect (0, 0, xres - 1, yres - 1, 0);
GUI_Clear();
// put_string_center (xres/2, yres/4, "Touchscreen test program", 1);
// put_string_center (xres/2, yres/4+20,"Touch screen to move crosshair", 2);
GUI_SetColor(palette[1]);
GUI_DispStringHCenterAt("Touchscreen test program", xres / 2, yres / 4);
GUI_SetColor(palette[2]);
GUI_DispStringHCenterAt("Touch screen to move crosshair", xres / 2, yres / 4 + 20);
for (i = 0; i < NR_BUTTONS; i++)
button_draw (&buttons [i]);
}
int ts_test(int xsize, int ysize)
{
int sumx, sumy;
int x, y;
unsigned int i;
unsigned int mode = 0;
int quit_pressed = 0;
GUI_DRAWMODE defmode;
xres = xsize;
yres = ysize;
x = xres/2;
y = yres/2;
// for (i = 0; i < NR_COLORS; i++)
// setcolor (i, palette [i]);
/* Initialize buttons */
//memset (&buttons, 0, sizeof (buttons));
buttons [0].w = buttons [1].w = buttons [2].w = xres / 4;
buttons [0].h = buttons [1].h = buttons [2].h = 20;
buttons [0].x = 0;
buttons [1].x = (3 * xres) / 8;
buttons [2].x = (3 * xres) / 4 - 1;
buttons [0].y = buttons [1].y = buttons [2].y = 10;
buttons [0].text = "Drag";
buttons [1].text = "Draw";
buttons [2].text = "Quit";
refresh_screen ();
while (1)
{
struct ts_sample samp;
/* Show the cross */
if ((mode & 15) != 1)
{
defmode = GUI_GetDrawMode();
GUI_SetDrawMode(GUI_DRAWMODE_XOR);
put_cross(x, y); // 2 | XORMODE);
GUI_SetDrawMode(defmode);
}
if ( Read_TouchPanel(&sumx, &sumy) > 0)
{
ts_phy2log(&sumx, &sumy);
samp.x = sumx;
samp.y = sumy;
samp.pressure = 1000;
}
else
{
samp.x = x;
samp.y = y;
samp.pressure = 0;
}
GUI_Delay(10);
/* Hide it */
if ((mode & 15) != 1)
{
defmode = GUI_GetDrawMode();
GUI_SetDrawMode(GUI_DRAWMODE_XOR);
put_cross(x, y); // 2 | XORMODE);
GUI_SetDrawMode(defmode);
}
for (i = 0; i < NR_BUTTONS; i++)
if (button_handle(&buttons [i], samp.x, samp.y, samp.pressure))
switch (i)
{
case 0:
mode = 0;
refresh_screen ();
break;
case 1:
mode = 1;
refresh_screen ();
break;
case 2:
quit_pressed = 1;
}
if (samp.pressure > 0)
{
if (mode == 0x80000001)
{
GUI_DrawLine(x, y, samp.x, samp.y); //, 2);
}
//pixel(x, y, 2);
x = samp.x;
y = samp.y;
mode |= 0x80000000;
}
else
mode &= ~0x80000000;
if (quit_pressed)
break;
}
//fillrect(0, 0, xres - 1, yres - 1, 0);
GUI_Clear();
return 0;
}
#ifndef _TESTUTILS_H
#define _TESTUTILS_H
/*
* tslib/tests/testutils.h
*
* Copyright (C) 2004 Michael Opdenacker <michaelo@handhelds.org>
*
* This file is placed under the LGPL.
*
* $Id: testutils.h
*
* Misc utils for ts test programs
*/
void getxy(int *x, int *y);
#endif /* _TESTUTILS_H */
/*
* tslib/tests/ts_calibrate.c
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the GPL. Please see the file
* COPYING for more details.
*
* $Id: ts_calibrate.c,v 1.8 2004/10/19 22:01:27 dlowder Exp $
*
* Basic test program for touchscreen library.
*/
/*
2020/06/22 move the APIs function perform_calibration() and get_sample()
into the file fbutils.c
add the function ts_Read_TouchPanel()
*/
#include "N9H20.h"
#include "fbutils.h"
#include "LCDConf.h"
#include "GUI.h"
#include "N9H20TouchPanel.h"
int ts_writefile(int hFile);
int ts_readfile(int hFile);
int ts_calibrate(int xsize, int ysize);
int ts_phy2log(int *sumx, int *sumy);
int ts_Read_TouchPanel(int *x, int *y);
calibration cal, final_cal;
unsigned int xres, yres;
int ts_Read_TouchPanel(int *x, int *y)
{
return(Read_TouchPanel(x, y));
}
int ts_calibrate(int xsize, int ysize)
{
int i;
GUI_DRAWMODE defmode;
xres = xsize;
yres = ysize;
GUI_SetColor(0xffffe080);
GUI_DispStringHCenterAt("TSLIB calibration utility", xres / 2, yres / 4);
GUI_SetColor(0xffffffff);
GUI_DispStringHCenterAt("Touch crosshair to calibrate", xres / 2, yres / 4 + 20);
sysprintf("xres = %d, yres = %d\n", xres, yres);
defmode = GUI_GetDrawMode();
GUI_SetDrawMode(GUI_DRAWMODE_XOR);
// Read a touchscreen event to clear the buffer
//getxy(ts, 0, 0);
get_sample (&cal, 0, 50, 50, "Top left");
GUI_X_Delay(300);
get_sample (&cal, 1, xres - 50, 50, "Top right");
GUI_X_Delay(300);
get_sample (&cal, 2, xres - 50, yres - 50, "Bot right");
GUI_X_Delay(300);
get_sample (&cal, 3, 50, yres - 50, "Bot left");
GUI_X_Delay(300);
get_sample (&cal, 4, xres / 2, yres / 2, "Center");
GUI_X_Delay(300);
GUI_SetDrawMode(defmode);
if (perform_calibration (&cal))
{
sysprintf ("Calibration constants: ");
for (i = 0; i < 7; i++) sysprintf("%d ", cal.a [i]);
sysprintf("\n");
}
else
{
sysprintf("Calibration failed.\n");
i = -1;
}
final_cal.a[0] = cal.a[1];
final_cal.a[1] = cal.a[2];
final_cal.a[2] = cal.a[0];
final_cal.a[3] = cal.a[4];
final_cal.a[4] = cal.a[5];
final_cal.a[5] = cal.a[3];
final_cal.a[6] = cal.a[6];
return i;
}
int ts_phy2log(int *sumx, int *sumy)
{
int xtemp,ytemp;
xtemp = *sumx;
ytemp = *sumy;
*sumx = ( final_cal.a[2] +
final_cal.a[0]*xtemp +
final_cal.a[1]*ytemp ) / final_cal.a[6];
*sumy = ( final_cal.a[5] +
final_cal.a[3]*xtemp +
final_cal.a[4]*ytemp ) / final_cal.a[6];
//sysprintf("After X=%d, Y=%d\n",*sumx, *sumy);
return 1;
}
int ts_writefile(int hFile)
{
int wbytes, nStatus;
if (fsFileSeek(hFile, 0, SEEK_SET) < 0)
{
sysprintf("CANNOT seek the calibration into file\n");
return -1;
}
nStatus = fsWriteFile(hFile, (UINT8 *)&final_cal.a[0], 28, &wbytes);
if (nStatus < 0)
{
sysprintf("CANNOT write the calibration into file, %d\n", wbytes);
return -1;
}
return 0;
}
int ts_readfile(int hFile)
{
int wbytes, nStatus;
if (fsFileSeek(hFile, 0, SEEK_SET) < 0)
{
sysprintf("CANNOT seek the calibration into file\n");
return -1;
}
nStatus = fsReadFile(hFile, (UINT8 *)&final_cal.a[0], 28, &wbytes);
if (nStatus < 0)
{
sysprintf("CANNOT read the calibration into file, %d\n", wbytes);
return -1;
}
return 0;
}
#ifndef _TSLIB_H_
#define _TSLIB_H_
/*
* tslib/src/tslib.h
*
* Copyright (C) 2001 Russell King.
*
* This file is placed under the LGPL.
*
* $Id: tslib.h,v 1.4 2005/02/26 01:47:23 kergoth Exp $
*
* Touch screen library interface definitions.
*/
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#include <stdarg.h>
//#include <sys/time.h>
#ifdef WIN32
#define TSIMPORT __declspec(dllimport)
#define TSEXPORT __declspec(dllexport)
#define TSLOCAL
#else
#define TSIMPORT
#ifdef GCC_HASCLASSVISIBILITY
#define TSEXPORT __attribute__ ((visibility("default")))
#define TSLOCAL __attribute__ ((visibility("hidden")))
#else
#define TSEXPORT
#define TSLOCAL
#endif
#endif
#ifdef TSLIB_INTERNAL
#define TSAPI TSEXPORT
#else
#define TSAPI TSIMPORT
#endif // TSLIB_INTERNAL
struct tsdev;
struct ts_sample
{
int x;
int y;
unsigned int pressure;
// struct timeval tv;
};
/*
* Close the touchscreen device, free all resources.
*/
TSAPI int ts_close(struct tsdev *);
/*
* Configure the touchscreen device.
*/
TSAPI int ts_config(struct tsdev *);
/*
* Change this hook to point to your custom error handling function.
*/
extern TSAPI int (*ts_error_fn)(const char *fmt, va_list ap);
/*
* Returns the file descriptor in use for the touchscreen device.
*/
TSAPI int ts_fd(struct tsdev *);
/*
* Load a filter/scaling module
*/
TSAPI int ts_load_module(struct tsdev *, const char *mod, const char *params);
/*
* Open the touchscreen device.
*/
TSAPI struct tsdev *ts_open(const char *dev_name, int nonblock);
/*
* Return a scaled touchscreen sample.
*/
TSAPI int ts_read(struct tsdev *, struct ts_sample *, int);
/*
* Returns a raw, unscaled sample from the touchscreen.
*/
TSAPI int ts_read_raw(struct tsdev *, struct ts_sample *, int);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _TSLIB_H_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment