Commit c4b7c77e authored by sam's avatar sam

test font

parent e27507d1
{
"recommendations": [
"mjohns.clang-format"
]
}
\ No newline at end of file
{
"workbench.editor.autoLockGroups": {
"imagePreview.previewEditor": true
},
"clang-format.language.cpp.enable": false,
"clang-format.language.csharp.enable": false,
"clang-format.language.cuda.enable": false,
"clang-format.language.glsl.enable": false,
"clang-format.language.hlsl.enable": false,
"clang-format.language.java.enable": false,
"clang-format.language.javascript.enable": false,
"clang-format.language.objective-c.enable": false,
"clang-format.language.objective-cpp.enable": false,
"clang-format.language.proto.enable": false,
"clang-format.language.typescript.enable": false,
"clang-format.language.apex.enable": false,
"editor.tabSize": 3,
"C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 3, IncludeBlocks: Merge, IndentGotoLabels: true, KeepEmptyLinesAtTheStartOfBlocks: true}",
"C_Cpp.clang_format_style": "{ BasedOnStyle: Google, IndentWidth: 3, IncludeBlocks: Merge, IndentGotoLabels: true, KeepEmptyLinesAtTheStartOfBlocks: true}",
"html.format.preserveNewLines": false,
"editor.formatOnSave": true
}
\ No newline at end of file
<?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_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\FreeRTOS\Sample_BLT+RTOS\KEIL\BLTDemo.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\FreeRTOS\Sample_RTOS\KEIL\RTOSDemo.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\emWin\GUIDemo\KEIL\GUIDemo.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\emWin\SimpleDemo\KEIL\SimpleDemo.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\JPEG\KEIL\JPEG.uvproj</PathAndName>
<NodeIsActive>1</NodeIsActive>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\Driver\Source\SYS\KEIL\SYSLib.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\BLT\KEIL\BLT.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\EDMA\KEIL\EDMA.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\NVTFAT\KEIL\N9H20K5_NVTFAT.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\PWM\KEIL\PWM.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\RTC\KEIL\RTC.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\VPOST\KEIL\VPOST_N9H20_FW043TFT_480x272.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\Driver\Source\VPOST\KEIL\FW043TFT_480X272\FW043TFT_480x272.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\SampleCode\FreeRTOS\Sample_NVTFAT\KEIL\NVTFAT_FreeRTOS.uvproj</PathAndName>
</project>
<project>
<PathAndName>.\N9H20_HMI_NonOS_BSP_V1.04.000t\BSP\Driver\Source\JPEG\KEIL\JPEGLib.uvproj</PathAndName>
</project>
</ProjectWorkspace>
......@@ -10,6 +10,7 @@
<TargetName>DebugRel_KPI_2X3</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>5060528::V5.06 update 5 (build 528)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
......
......@@ -16,7 +16,7 @@ static unsigned char _int;
static unsigned char _opened = 0;
int key_map[KEY_COUNT] = {
KEY_UP, KEY_LEFT, KEY_ESC, KEY_DOWN, KEY_RIGHT, KEY_ENTER
KEwsY_UP, KEY_LEFT, KEY_ESC, KEY_DOWN, KEY_RIGHT, KEY_ENTER
};
static unsigned int readkey(void)
......
......@@ -211,7 +211,7 @@
<Group>
<GroupName>FreeRTOS</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
......@@ -511,6 +511,18 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\User\Src\GUI_Font24.c</PathWithFileName>
<FilenameWithoutPath>GUI_Font24.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
......@@ -521,7 +533,7 @@
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>26</FileNumber>
<FileNumber>27</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -533,7 +545,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>27</FileNumber>
<FileNumber>28</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -545,7 +557,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>28</FileNumber>
<FileNumber>29</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -557,7 +569,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>29</FileNumber>
<FileNumber>30</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -569,7 +581,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>30</FileNumber>
<FileNumber>31</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -581,7 +593,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>31</FileNumber>
<FileNumber>32</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -593,7 +605,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>32</FileNumber>
<FileNumber>33</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -605,7 +617,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>33</FileNumber>
<FileNumber>34</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -617,7 +629,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>34</FileNumber>
<FileNumber>35</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -629,7 +641,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>35</FileNumber>
<FileNumber>36</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -641,7 +653,7 @@
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>36</FileNumber>
<FileNumber>37</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -651,17 +663,29 @@
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>38</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Library\IPLib\N9H20_KPI_2x3.lib</PathWithFileName>
<FilenameWithoutPath>N9H20_KPI_2x3.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>inc</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>37</FileNumber>
<FileNumber>39</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -673,7 +697,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>38</FileNumber>
<FileNumber>40</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -685,7 +709,7 @@
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>39</FileNumber>
<FileNumber>41</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -699,13 +723,13 @@
<Group>
<GroupName>emWinConifg</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>40</FileNumber>
<FileNumber>42</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -717,7 +741,7 @@
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>41</FileNumber>
<FileNumber>43</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -729,7 +753,7 @@
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>42</FileNumber>
<FileNumber>44</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -741,7 +765,7 @@
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>43</FileNumber>
<FileNumber>45</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -755,13 +779,13 @@
<Group>
<GroupName>tslib</GroupName>
<tvExp>0</tvExp>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>44</FileNumber>
<FileNumber>46</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -773,7 +797,7 @@
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>45</FileNumber>
<FileNumber>47</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -785,7 +809,7 @@
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>46</FileNumber>
<FileNumber>48</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......@@ -797,7 +821,7 @@
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>47</FileNumber>
<FileNumber>49</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
......
......@@ -653,6 +653,61 @@
<FileName>AppleLiGothicFont24.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\AppleLiGothicFont24.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_Font24.c</FileName>
<FileType>1</FileType>
<FilePath>.\User\Src\GUI_Font24.c</FilePath>
</File>
</Files>
</Group>
......@@ -733,6 +788,11 @@
<FileType>4</FileType>
<FilePath>..\..\Library\NVTFATLib\N9H20_NVTFAT_FreeRTOS.lib</FilePath>
</File>
<File>
<FileName>N9H20_KPI_2x3.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\Library\IPLib\N9H20_KPI_2x3.lib</FilePath>
</File>
</Files>
</Group>
<Group>
......
......@@ -36,6 +36,9 @@ UINT8 u8FrameBuf[XSIZE_PHYS*YSIZE_PHYS*2] __attribute__((aligned(32)));
UINT8 *u8FrameBufPtr;
SemaphoreHandle_t xSemButton;
int key, key_pressed, key_click;
extern void vStartGUITasks(UBaseType_t uxPriority);
int main() {
......@@ -82,6 +85,13 @@ static void prvSetupHardware(void) {
vpostLCMInit(&lcdFormat, (UINT32*)u8FrameBuf);
u8FrameBufPtr = (UINT8*)((UINT32)u8FrameBuf | 0x80000000);
vpostEnaBacklight();
xSemButton = xSemaphoreCreateBinary();
kpi_init();
kpi_open(3); // use nIRQ0 as external interrupt source
key = 0;
key_pressed = 0;
key_click = 0;
}
/*-----------------------------------------------------------*/
......@@ -94,9 +104,51 @@ LCDFORMATEX mainlcdInfo;
static portTASK_FUNCTION_PROTO(vMainTaskProducer, pvParameters) {
static uint16_t uRunCount = 0;
for (;;) {
key = kpi_read(KPI_NONBLOCK);
//檢查 KEY_UP 是否 click
if ((key_pressed & KEY_UP) != 0) {
if ((key & KEY_UP) == 0) {
key_click |= KEY_UP;
}
}
//檢查 KEY_DOWN 是否 click
if ((key_pressed & KEY_DOWN) != 0) {
if ((key & KEY_DOWN) == 0) {
key_click |= KEY_DOWN;
}
}
//檢查 KEY_LEFT 是否 click
if ((key_pressed & KEY_LEFT) != 0) {
if ((key & KEY_LEFT) == 0) {
key_click |= KEY_LEFT;
}
}
//檢查 KEY_RIGHT 是否 click
if ((key_pressed & KEY_RIGHT) != 0) {
if ((key & KEY_RIGHT) == 0) {
key_click |= KEY_RIGHT;
}
}
//檢查 KEY_ENTER 是否 click
if ((key_pressed & KEY_ENTER) != 0) {
if ((key & KEY_ENTER) == 0) {
key_click |= KEY_ENTER;
}
}
//檢查 KEY_ESC 是否 click
if ((key_pressed & KEY_ESC) != 0) {
if ((key & KEY_ESC) == 0) {
key_click |= KEY_ESC;
}
}
key_pressed = key;
//sysprintf("key is %d\n", key);
#if 0
sysprintf("TaskName=%s, runCount=%d\r\n", pcTaskGetTaskName(NULL),
uRunCount);
#endif
#if (VPOST_SHOW_IMAGE == 1)
if (uRunCount % 2 == 0) {
......@@ -108,7 +160,7 @@ static portTASK_FUNCTION_PROTO(vMainTaskProducer, pvParameters) {
}
#endif
#endif
vTaskDelay(5000);
vTaskDelay(20);
uRunCount++;
}
}
......
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