서해원

Add src/

Showing 77 changed files with 27499 additions and 0 deletions
/src/Numaker-PFM-M2351/PulseMonitoring/Secure/Objects
/src/Numaker-PFM-M2351/PulseMonitoring/Secure/Listings
/src/Numaker-PFM-M2351/PulseMonitoring/NonSecure/Objects
/src/Numaker-PFM-M2351/PulseMonitoring/NonSecure/Listings
# ARM-TrustZone-based-Pulse-Monitoring
2021-1 Capston Project
# Instruction
## src/Numaker-PFM-M2351
+ Need a Keil uVision5
+ Place a `src/Numaker-PFM-M2351` directory in a `M2351Series_BSP_CMSIS_V3.00.004` directory so that you can use the library.
## src/Server
+ Need a docker engine
+ In src/Server/
+ docker build
```
docker build -t server
```
+ docker run
```
docker run --name=server -it -p80:80 -p443:443 -p2351:2351 server
```
# Contact
+ `shw2662@khu.ac.kr`
......
<?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>
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>NonSecure</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Listings\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>6</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>7</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>NULink\Nu_Link.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(6010=-1,-1,-1,-1,0)(6018=-1,-1,-1,-1,0)(6019=-1,-1,-1,-1,0)(6008=-1,-1,-1,-1,0)(6009=-1,-1,-1,-1,0)(6014=-1,-1,-1,-1,0)(6015=-1,-1,-1,-1,0)(6003=-1,-1,-1,-1,0)(6000=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>Nu_Link</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2V8M</Key>
<Name>UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1200 -FN1 -FF0M2351_AP_512 -FS00 -FL080000 -FP0($$Device:M2351KIAAE$Flash\M2351_AP_512.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
<WinNumber>1</WinNumber>
<ItemText>get</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>strPulse</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>pulse</ItemText>
</Ww>
<Ww>
<count>3</count>
<WinNumber>1</WinNumber>
<ItemText>lengthChar</ItemText>
</Ww>
<Ww>
<count>4</count>
<WinNumber>1</WinNumber>
<ItemText>command</ItemText>
</Ww>
<Ww>
<count>5</count>
<WinNumber>1</WinNumber>
<ItemText>netData</ItemText>
</Ww>
<Ww>
<count>6</count>
<WinNumber>1</WinNumber>
<ItemText>lengthStr</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>netData</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
</TargetOption>
</Target>
<Group>
<GroupName>CMSIS</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\Device\Nuvoton\M2351\Source\system_M2351.c</PathWithFileName>
<FilenameWithoutPath>system_M2351.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\Device\Nuvoton\M2351\Source\ARM\startup_M2351.s</PathWithFileName>
<FilenameWithoutPath>startup_M2351.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Library</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\gpio.c</PathWithFileName>
<FilenameWithoutPath>gpio.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\retarget.c</PathWithFileName>
<FilenameWithoutPath>retarget.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Include</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327_Fonts\fonts.h</PathWithFileName>
<FilenameWithoutPath>fonts.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327\DEV_Config.h</PathWithFileName>
<FilenameWithoutPath>DEV_Config.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327\OLED_Driver.h</PathWithFileName>
<FilenameWithoutPath>OLED_Driver.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327\OLED_GUI.h</PathWithFileName>
<FilenameWithoutPath>OLED_GUI.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\WiFi\wifi.h</PathWithFileName>
<FilenameWithoutPath>wifi.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>3</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\Secure\lib\nsclib.o</PathWithFileName>
<FilenameWithoutPath>nsclib.o</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\cssd_lib.h</PathWithFileName>
<FilenameWithoutPath>cssd_lib.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\Device\Nuvoton\M2351\Include\NuMicro.h</PathWithFileName>
<FilenameWithoutPath>NuMicro.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>SSD1327</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327\DEV_Config.c</PathWithFileName>
<FilenameWithoutPath>DEV_Config.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>14</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327\OLED_Driver.c</PathWithFileName>
<FilenameWithoutPath>OLED_Driver.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327\OLED_GUI.c</PathWithFileName>
<FilenameWithoutPath>OLED_GUI.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>SSD1327_Fonts</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327_Fonts\font8.c</PathWithFileName>
<FilenameWithoutPath>font8.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327_Fonts\font12.c</PathWithFileName>
<FilenameWithoutPath>font12.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327_Fonts\font16.c</PathWithFileName>
<FilenameWithoutPath>font16.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327_Fonts\font20.c</PathWithFileName>
<FilenameWithoutPath>font20.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\SSD1327_Fonts\font24.c</PathWithFileName>
<FilenameWithoutPath>font24.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>WiFi</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\WiFi\wifi.c</PathWithFileName>
<FilenameWithoutPath>wifi.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>User</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main_ns.c</PathWithFileName>
<FilenameWithoutPath>main_ns.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::PSA</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
<SchemaVersion>2.1</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Targets>
<Target>
<TargetName>NonSecure</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6150000::V6.15::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>M2351KIAAE</Device>
<Vendor>Nuvoton</Vendor>
<PackID>Nuvoton.NuMicro_DFP.1.3.10</PackID>
<PackURL>http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack</PackURL>
<Cpu>IRAM(0x20000000,0x8000) IRAM2(0x30008000,0x10000) IROM(0x00000000,0x40000) IROM2(0x10040000,0x40000) CPUTYPE("Cortex-M23") TZ CLOCK(12000000) ESEL ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1200 -FN1 -FF0M2351_AP_512 -FS00 -FL080000 -FP0($$Device:M2351KIAAE$Flash\M2351_AP_512.FLM))</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:M2351KIAAE$Device\M2351\Include\M2351.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>$$Device:M2351KIAAE$SVD\Nuvoton\M2351_v1.svd</SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
<LibPath></LibPath>
<RegisterFilePath></RegisterFilePath>
<DBRegisterFilePath></DBRegisterFilePath>
<TargetStatus>
<Error>0</Error>
<ExitCodeStop>0</ExitCodeStop>
<ButtonStop>0</ButtonStop>
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Objects\</OutputDirectory>
<OutputName>NonSecure</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>1</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Listings\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X>
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>0</AlwaysBuild>
<GenerateAssemblyFile>0</GenerateAssemblyFile>
<AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName></SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDll></SimDlgDll>
<SimDlgDllArguments></SimDlgDllArguments>
<TargetDllName>SARMV8M.DLL</TargetDllName>
<TargetDllArguments> -MPU</TargetDllArguments>
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM23</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
<HexSelection>1</HexSelection>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
</DebugOption>
<Utilities>
<Flash1>
<UseTargetDll>1</UseTargetDll>
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<DriverSelection>4102</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2V8M.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp>User</pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<FcArmLst>0</FcArmLst>
</Utilities>
<TargetArmAds>
<ArmAdsMisc>
<GenerateListings>0</GenerateListings>
<asHll>1</asHll>
<asAsm>1</asAsm>
<asMacX>1</asMacX>
<asSyms>1</asSyms>
<asFals>1</asFals>
<asDbgD>1</asDbgD>
<asForm>1</asForm>
<ldLst>0</ldLst>
<ldmm>1</ldmm>
<ldXref>1</ldXref>
<BigEnd>0</BigEnd>
<AdsALst>1</AdsALst>
<AdsACrf>1</AdsACrf>
<AdsANop>0</AdsANop>
<AdsANot>0</AdsANot>
<AdsLLst>1</AdsLLst>
<AdsLmap>1</AdsLmap>
<AdsLcgr>1</AdsLcgr>
<AdsLsym>1</AdsLsym>
<AdsLszi>1</AdsLszi>
<AdsLtoi>1</AdsLtoi>
<AdsLsun>1</AdsLsun>
<AdsLven>1</AdsLven>
<AdsLsxf>1</AdsLsxf>
<RvctClst>1</RvctClst>
<GenPPlst>0</GenPPlst>
<AdsCpuType>"Cortex-M23"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>0</mOS>
<uocRom>0</uocRom>
<uocRam>0</uocRam>
<hadIROM>1</hadIROM>
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>1</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<EndSel>1</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>3</RoSelD>
<RwSelD>4</RwSelD>
<CodeSel>0</CodeSel>
<OptFeed>0</OptFeed>
<NoZi1>0</NoZi1>
<NoZi2>0</NoZi2>
<NoZi3>0</NoZi3>
<NoZi4>0</NoZi4>
<NoZi5>0</NoZi5>
<Ro1Chk>0</Ro1Chk>
<Ro2Chk>0</Ro2Chk>
<Ro3Chk>0</Ro3Chk>
<Ir1Chk>1</Ir1Chk>
<Ir2Chk>0</Ir2Chk>
<Ra1Chk>0</Ra1Chk>
<Ra2Chk>0</Ra2Chk>
<Ra3Chk>0</Ra3Chk>
<Im1Chk>1</Im1Chk>
<Im2Chk>0</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm1>
<Ocm2>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm2>
<Ocm3>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm3>
<Ocm4>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm4>
<Ocm5>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm5>
<Ocm6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm6>
<IRAM>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x8000</Size>
</IRAM>
<IROM>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x40000</Size>
</IROM>
<XRAM>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRAM>
<OCR_RVCT1>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT1>
<OCR_RVCT2>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT2>
<OCR_RVCT3>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT3>
<OCR_RVCT4>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x10040000</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT5>
<OCR_RVCT6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT6>
<OCR_RVCT7>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT7>
<OCR_RVCT8>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT8>
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x8000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x30008000</StartAddress>
<Size>0x10000</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>0</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>0</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<uGnu>0</uGnu>
<useXO>0</useXO>
<v6Lang>5</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>0</vShortEn>
<vShortWch>0</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define>DEBUG_PORT=UART0_NS</Define>
<Undefine></Undefine>
<IncludePath>..\..\..\Library\CMSIS\Include;..\..\..\Library\Device\Nuvoton\M2351\Include;..\..\..\Library\StdDriver\inc;..\NonSecure;.\SSD1327;.\SSD1327_Fonts;.\WiFi</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>1</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>1</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<ClangAsOpt>1</ClangAsOpt>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>.\Objects\NonSecure.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>CMSIS</GroupName>
<Files>
<File>
<FileName>system_M2351.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\Device\Nuvoton\M2351\Source\system_M2351.c</FilePath>
</File>
<File>
<FileName>startup_M2351.s</FileName>
<FileType>2</FileType>
<FilePath>..\..\..\Library\Device\Nuvoton\M2351\Source\ARM\startup_M2351.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Library</GroupName>
<Files>
<File>
<FileName>gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\gpio.c</FilePath>
</File>
<File>
<FileName>retarget.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\retarget.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Include</GroupName>
<Files>
<File>
<FileName>fonts.h</FileName>
<FileType>5</FileType>
<FilePath>.\SSD1327_Fonts\fonts.h</FilePath>
</File>
<File>
<FileName>DEV_Config.h</FileName>
<FileType>5</FileType>
<FilePath>.\SSD1327\DEV_Config.h</FilePath>
</File>
<File>
<FileName>OLED_Driver.h</FileName>
<FileType>5</FileType>
<FilePath>.\SSD1327\OLED_Driver.h</FilePath>
</File>
<File>
<FileName>OLED_GUI.h</FileName>
<FileType>5</FileType>
<FilePath>.\SSD1327\OLED_GUI.h</FilePath>
</File>
<File>
<FileName>wifi.h</FileName>
<FileType>5</FileType>
<FilePath>.\WiFi\wifi.h</FilePath>
</File>
<File>
<FileName>nsclib.o</FileName>
<FileType>3</FileType>
<FilePath>..\Secure\lib\nsclib.o</FilePath>
</File>
<File>
<FileName>cssd_lib.h</FileName>
<FileType>5</FileType>
<FilePath>.\cssd_lib.h</FilePath>
</File>
<File>
<FileName>NuMicro.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\Library\Device\Nuvoton\M2351\Include\NuMicro.h</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>SSD1327</GroupName>
<Files>
<File>
<FileName>DEV_Config.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327\DEV_Config.c</FilePath>
</File>
<File>
<FileName>OLED_Driver.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327\OLED_Driver.c</FilePath>
</File>
<File>
<FileName>OLED_GUI.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327\OLED_GUI.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>SSD1327_Fonts</GroupName>
<Files>
<File>
<FileName>font8.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327_Fonts\font8.c</FilePath>
</File>
<File>
<FileName>font12.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327_Fonts\font12.c</FilePath>
</File>
<File>
<FileName>font16.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327_Fonts\font16.c</FilePath>
</File>
<File>
<FileName>font20.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327_Fonts\font20.c</FilePath>
</File>
<File>
<FileName>font24.c</FileName>
<FileType>1</FileType>
<FilePath>.\SSD1327_Fonts\font24.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>WiFi</GroupName>
<Files>
<File>
<FileName>wifi.c</FileName>
<FileType>1</FileType>
<FilePath>.\WiFi\wifi.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>User</GroupName>
<Files>
<File>
<FileName>main_ns.c</FileName>
<FileType>1</FileType>
<FilePath>.\main_ns.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::PSA</GroupName>
</Group>
</Groups>
</Target>
</Targets>
<RTE>
<apis>
<api Capiversion="1.0.0" Cclass="PSA" Cgroup="Crypto" exclusive="1">
<package name="PSA" schemaVersion="1.6.3" url="http://www.keil.com/pack/" vendor="ARM" version="1.0.0"/>
<targetInfos>
<targetInfo name="NonSecure"/>
</targetInfos>
</api>
</apis>
<components>
<component Capiversion="1.0.0" Cclass="PSA" Cgroup="Crypto" Csub="mbed TLS" Cvendor="ARM" Cversion="2.24.0" condition="mbed TLS">
<package name="mbedTLS" schemaVersion="1.6.3" url="http://www.keil.com/pack/" vendor="ARM" version="1.7.0"/>
<targetInfos>
<targetInfo name="NonSecure"/>
</targetInfos>
</component>
</components>
<files/>
</RTE>
<LayerInfo>
<Layers>
<Layer>
<LayName>NonSecure</LayName>
<LayPrjMark>1</LayPrjMark>
</Layer>
</Layers>
</LayerInfo>
</Project>
[Version]
Nu_LinkVersion=V5.15
[Process]
ProcessID=0x000079c8
ProcessCreationTime_L=0xab44af4b
ProcessCreationTime_H=0x01d75ed7
NuLinkID=0x180016bb
NuLinkIDs_Count=0x00000001
NuLinkID0=0x180016bb
[ChipSelect]
;ChipName=<NUC1xx|NUC2xx|M05x|N571|N572|Nano100|N512|Mini51|NUC505|General>
ChipName=M2351
[NUC505]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=NUC505_SPIFLASH.FLM
[NUC4xx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=NUC400_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x014fb180
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[NUC2xx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC200_AP_128.FLM
[NUC1311]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC1311_AP_64.FLM
[NUC126]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=NUC126_AP_256.FLM
[NUC121]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC121_AP_32.FLM
[NUC1xx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC100_AP_128.FLM
[NUC029]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NUC029_AP_16.FLM
[NM1820]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1820_AP_17_5.FLM
[NM1810]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1810_AP_29_5.FLM
[NM1500]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1500_AP_128.FLM
[NM1330]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1330_AP_64.FLM
[NM1320]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1320_AP_32.FLM
[NM1240]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1240_AP_64.FLM
[NM1230]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1230_AP_64.FLM
[NM1200]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1200_AP_8.FLM
[NM1120]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1120_AP_29_5.FLM
[TF5100]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=TF5100_AP_64.FLM
[NDA102]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NDA102_AP_29_5.FLM
[Nano103]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=Nano103_AP_64.FLM
[Nano100]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=Nano100_AP_64.FLM
[N576]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N576_AP_145.FLM
[N575]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N575_AP_145.FLM
[N572]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=N572Fxxx.FLM
[N571]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=N571E000.FLM
[N570]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N570_AP_64.FLM
[N569]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N569_AP_64.FLM
[N512]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N512_AP_64.FLM
[Mini57]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=Mini57_AP_29_5.FLM
[Mini51]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=Mini51_AP_16.FLM
[M481]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M481_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M480LD]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M480LD_AP_256.FLM
[M479]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M479_AP_256.FLM
[M451]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M451_AP_256.FLM
[M471]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Bank=0
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M471_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M251]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=M251_AP_192.FLM
[M2351]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M2351_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
CheckDPM=0
DisableTimeoutDetect=0
[M261]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M261_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[MR63]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=MR63_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M2354]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Bank=0
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
CheckDPM=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M2354_AP_1M.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M071]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=M071_AP_128.FLM
[M0564]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=M0564_AP_256.FLM
[M0519]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=M0519_AP_128.FLM
[M0518]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=M0518_AP_64.FLM
[M05x]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M0516_AP_64.FLM
[M0A21]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M0A21_AP_32.FLM
[M030G]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
DisableTimeoutDetect=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M030G_AP_64.FLM
[M031]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Bank=0
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M031_AP_128.FLM
[NPCX]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=NPCX_AP_512.FLM
[I96000]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=2
Program=0
Verify=0
ResetAndRun=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x8000
ProgramAlgorithm=
[I94000]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=I94000_AP_512.FLM
[ISD9300]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=ISD9300_AP_145.FLM
[I9200]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=I9200_AP_128.FLM
[ISD9xxx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=ISD9100_AP_145.FLM
[ISD9000]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=ISD9000_AP_64.FLM
[AU9xxx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=AU9100_AP_145.FLM
[Autodetect]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=
[General]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=
/*
* Copyright (c) 2013-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Revision: V5.1.0
*
* Project: CMSIS-RTOS RTX
* Title: RTX Configuration
*
* -----------------------------------------------------------------------------
*/
#include "cmsis_compiler.h"
#include "rtx_os.h"
// OS Idle Thread
__WEAK __NO_RETURN void osRtxIdleThread (void *argument) {
(void)argument;
for (;;) {}
}
// OS Error Callback function
__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
(void)object_id;
switch (code) {
case osRtxErrorStackUnderflow:
// Stack overflow detected for thread (thread_id=object_id)
break;
case osRtxErrorISRQueueOverflow:
// ISR Queue overflow detected when inserting object (object_id)
break;
case osRtxErrorTimerQueueOverflow:
// User Timer Callback Queue overflow detected for timer (timer_id=object_id)
break;
case osRtxErrorClibSpace:
// Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM
break;
case osRtxErrorClibMutex:
// Standard C/C++ library mutex initialization failed
break;
default:
// Reserved
break;
}
for (;;) {}
//return 0U;
}
/*
* Copyright (c) 2013-2020 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Revision: V5.5.1
*
* Project: CMSIS-RTOS RTX
* Title: RTX Configuration definitions
*
* -----------------------------------------------------------------------------
*/
#ifndef RTX_CONFIG_H_
#define RTX_CONFIG_H_
#ifdef _RTE_
#include "RTE_Components.h"
#ifdef RTE_RTX_CONFIG_H
#include RTE_RTX_CONFIG_H
#endif
#endif
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>System Configuration
// =======================
// <o>Global Dynamic Memory size [bytes] <0-1073741824:8>
// <i> Defines the combined global dynamic memory size.
// <i> Default: 32768
#ifndef OS_DYNAMIC_MEM_SIZE
#define OS_DYNAMIC_MEM_SIZE 32768
#endif
// <o>Kernel Tick Frequency [Hz] <1-1000000>
// <i> Defines base time unit for delays and timeouts.
// <i> Default: 1000 (1ms tick)
#ifndef OS_TICK_FREQ
#define OS_TICK_FREQ 1000
#endif
// <e>Round-Robin Thread switching
// <i> Enables Round-Robin Thread switching.
#ifndef OS_ROBIN_ENABLE
#define OS_ROBIN_ENABLE 1
#endif
// <o>Round-Robin Timeout <1-1000>
// <i> Defines how many ticks a thread will execute before a thread switch.
// <i> Default: 5
#ifndef OS_ROBIN_TIMEOUT
#define OS_ROBIN_TIMEOUT 5
#endif
// </e>
// <o>ISR FIFO Queue
// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries
// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries
// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries
// <i> RTOS Functions called from ISR store requests to this buffer.
// <i> Default: 16 entries
#ifndef OS_ISR_FIFO_QUEUE
#define OS_ISR_FIFO_QUEUE 16
#endif
// <q>Object Memory usage counters
// <i> Enables object memory usage counters (requires RTX source variant).
#ifndef OS_OBJ_MEM_USAGE
#define OS_OBJ_MEM_USAGE 0
#endif
// </h>
// <h>Thread Configuration
// =======================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_THREAD_OBJ_MEM
#define OS_THREAD_OBJ_MEM 0
#endif
// <o>Number of user Threads <1-1000>
// <i> Defines maximum number of user threads that can be active at the same time.
// <i> Applies to user threads with system provided memory for control blocks.
#ifndef OS_THREAD_NUM
#define OS_THREAD_NUM 1
#endif
// <o>Number of user Threads with default Stack size <0-1000>
// <i> Defines maximum number of user threads with default stack size.
// <i> Applies to user threads with zero stack size specified.
#ifndef OS_THREAD_DEF_STACK_NUM
#define OS_THREAD_DEF_STACK_NUM 0
#endif
// <o>Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8>
// <i> Defines the combined stack size for user threads with user-provided stack size.
// <i> Applies to user threads with user-provided stack size and system provided memory for stack.
// <i> Default: 0
#ifndef OS_THREAD_USER_STACK_SIZE
#define OS_THREAD_USER_STACK_SIZE 0
#endif
// </e>
// <o>Default Thread Stack size [bytes] <96-1073741824:8>
// <i> Defines stack size for threads with zero stack size specified.
// <i> Default: 3072
#ifndef OS_STACK_SIZE
#define OS_STACK_SIZE 3072
#endif
// <o>Idle Thread Stack size [bytes] <72-1073741824:8>
// <i> Defines stack size for Idle thread.
// <i> Default: 512
#ifndef OS_IDLE_THREAD_STACK_SIZE
#define OS_IDLE_THREAD_STACK_SIZE 512
#endif
// <o>Idle Thread TrustZone Module Identifier
// <i> Defines TrustZone Thread Context Management Identifier.
// <i> Applies only to cores with TrustZone technology.
// <i> Default: 0 (not used)
#ifndef OS_IDLE_THREAD_TZ_MOD_ID
#define OS_IDLE_THREAD_TZ_MOD_ID 0
#endif
// <q>Stack overrun checking
// <i> Enables stack overrun check at thread switch.
// <i> Enabling this option increases slightly the execution time of a thread switch.
#ifndef OS_STACK_CHECK
#define OS_STACK_CHECK 1
#endif
// <q>Stack usage watermark
// <i> Initializes thread stack with watermark pattern for analyzing stack usage.
// <i> Enabling this option increases significantly the execution time of thread creation.
#ifndef OS_STACK_WATERMARK
#define OS_STACK_WATERMARK 0
#endif
// <o>Processor mode for Thread execution
// <0=> Unprivileged mode
// <1=> Privileged mode
// <i> Default: Privileged mode
#ifndef OS_PRIVILEGE_MODE
#define OS_PRIVILEGE_MODE 1
#endif
// </h>
// <h>Timer Configuration
// ======================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_TIMER_OBJ_MEM
#define OS_TIMER_OBJ_MEM 0
#endif
// <o>Number of Timer objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_TIMER_NUM
#define OS_TIMER_NUM 1
#endif
// </e>
// <o>Timer Thread Priority
// <8=> Low
// <16=> Below Normal <24=> Normal <32=> Above Normal
// <40=> High
// <48=> Realtime
// <i> Defines priority for timer thread
// <i> Default: High
#ifndef OS_TIMER_THREAD_PRIO
#define OS_TIMER_THREAD_PRIO 40
#endif
// <o>Timer Thread Stack size [bytes] <0-1073741824:8>
// <i> Defines stack size for Timer thread.
// <i> May be set to 0 when timers are not used.
// <i> Default: 512
#ifndef OS_TIMER_THREAD_STACK_SIZE
#define OS_TIMER_THREAD_STACK_SIZE 512
#endif
// <o>Timer Thread TrustZone Module Identifier
// <i> Defines TrustZone Thread Context Management Identifier.
// <i> Applies only to cores with TrustZone technology.
// <i> Default: 0 (not used)
#ifndef OS_TIMER_THREAD_TZ_MOD_ID
#define OS_TIMER_THREAD_TZ_MOD_ID 0
#endif
// <o>Timer Callback Queue entries <0-256>
// <i> Number of concurrent active timer callback functions.
// <i> May be set to 0 when timers are not used.
// <i> Default: 4
#ifndef OS_TIMER_CB_QUEUE
#define OS_TIMER_CB_QUEUE 4
#endif
// </h>
// <h>Event Flags Configuration
// ============================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_EVFLAGS_OBJ_MEM
#define OS_EVFLAGS_OBJ_MEM 0
#endif
// <o>Number of Event Flags objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_EVFLAGS_NUM
#define OS_EVFLAGS_NUM 1
#endif
// </e>
// </h>
// <h>Mutex Configuration
// ======================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_MUTEX_OBJ_MEM
#define OS_MUTEX_OBJ_MEM 0
#endif
// <o>Number of Mutex objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_MUTEX_NUM
#define OS_MUTEX_NUM 1
#endif
// </e>
// </h>
// <h>Semaphore Configuration
// ==========================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_SEMAPHORE_OBJ_MEM
#define OS_SEMAPHORE_OBJ_MEM 0
#endif
// <o>Number of Semaphore objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_SEMAPHORE_NUM
#define OS_SEMAPHORE_NUM 1
#endif
// </e>
// </h>
// <h>Memory Pool Configuration
// ============================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_MEMPOOL_OBJ_MEM
#define OS_MEMPOOL_OBJ_MEM 0
#endif
// <o>Number of Memory Pool objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_MEMPOOL_NUM
#define OS_MEMPOOL_NUM 1
#endif
// <o>Data Storage Memory size [bytes] <0-1073741824:8>
// <i> Defines the combined data storage memory size.
// <i> Applies to objects with system provided memory for data storage.
// <i> Default: 0
#ifndef OS_MEMPOOL_DATA_SIZE
#define OS_MEMPOOL_DATA_SIZE 0
#endif
// </e>
// </h>
// <h>Message Queue Configuration
// ==============================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_MSGQUEUE_OBJ_MEM
#define OS_MSGQUEUE_OBJ_MEM 0
#endif
// <o>Number of Message Queue objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_MSGQUEUE_NUM
#define OS_MSGQUEUE_NUM 1
#endif
// <o>Data Storage Memory size [bytes] <0-1073741824:8>
// <i> Defines the combined data storage memory size.
// <i> Applies to objects with system provided memory for data storage.
// <i> Default: 0
#ifndef OS_MSGQUEUE_DATA_SIZE
#define OS_MSGQUEUE_DATA_SIZE 0
#endif
// </e>
// </h>
// <h>Event Recorder Configuration
// ===============================
// <e>Global Initialization
// <i> Initialize Event Recorder during 'osKernelInitialize'.
#ifndef OS_EVR_INIT
#define OS_EVR_INIT 0
#endif
// <q>Start recording
// <i> Start event recording after initialization.
#ifndef OS_EVR_START
#define OS_EVR_START 1
#endif
// <h>Global Event Filter Setup
// <i> Initial recording level applied to all components.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_LEVEL
#define OS_EVR_LEVEL 0x00U
#endif
// <h>RTOS Event Filter Setup
// <i> Recording levels for RTX components.
// <i> Only applicable if events for the respective component are generated.
// <h>Memory Management
// <i> Recording level for Memory Management events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MEMORY_LEVEL
#define OS_EVR_MEMORY_LEVEL 0x01U
#endif
// <h>Kernel
// <i> Recording level for Kernel events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_KERNEL_LEVEL
#define OS_EVR_KERNEL_LEVEL 0x01U
#endif
// <h>Thread
// <i> Recording level for Thread events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_THREAD_LEVEL
#define OS_EVR_THREAD_LEVEL 0x05U
#endif
// <h>Generic Wait
// <i> Recording level for Generic Wait events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_WAIT_LEVEL
#define OS_EVR_WAIT_LEVEL 0x01U
#endif
// <h>Thread Flags
// <i> Recording level for Thread Flags events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_THFLAGS_LEVEL
#define OS_EVR_THFLAGS_LEVEL 0x01U
#endif
// <h>Event Flags
// <i> Recording level for Event Flags events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_EVFLAGS_LEVEL
#define OS_EVR_EVFLAGS_LEVEL 0x01U
#endif
// <h>Timer
// <i> Recording level for Timer events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_TIMER_LEVEL
#define OS_EVR_TIMER_LEVEL 0x01U
#endif
// <h>Mutex
// <i> Recording level for Mutex events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MUTEX_LEVEL
#define OS_EVR_MUTEX_LEVEL 0x01U
#endif
// <h>Semaphore
// <i> Recording level for Semaphore events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_SEMAPHORE_LEVEL
#define OS_EVR_SEMAPHORE_LEVEL 0x01U
#endif
// <h>Memory Pool
// <i> Recording level for Memory Pool events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MEMPOOL_LEVEL
#define OS_EVR_MEMPOOL_LEVEL 0x01U
#endif
// <h>Message Queue
// <i> Recording level for Message Queue events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MSGQUEUE_LEVEL
#define OS_EVR_MSGQUEUE_LEVEL 0x01U
#endif
// </h>
// </e>
// <h>RTOS Event Generation
// <i> Enables event generation for RTX components (requires RTX source variant).
// <q>Memory Management
// <i> Enables Memory Management event generation.
#ifndef OS_EVR_MEMORY
#define OS_EVR_MEMORY 1
#endif
// <q>Kernel
// <i> Enables Kernel event generation.
#ifndef OS_EVR_KERNEL
#define OS_EVR_KERNEL 1
#endif
// <q>Thread
// <i> Enables Thread event generation.
#ifndef OS_EVR_THREAD
#define OS_EVR_THREAD 1
#endif
// <q>Generic Wait
// <i> Enables Generic Wait event generation.
#ifndef OS_EVR_WAIT
#define OS_EVR_WAIT 1
#endif
// <q>Thread Flags
// <i> Enables Thread Flags event generation.
#ifndef OS_EVR_THFLAGS
#define OS_EVR_THFLAGS 1
#endif
// <q>Event Flags
// <i> Enables Event Flags event generation.
#ifndef OS_EVR_EVFLAGS
#define OS_EVR_EVFLAGS 1
#endif
// <q>Timer
// <i> Enables Timer event generation.
#ifndef OS_EVR_TIMER
#define OS_EVR_TIMER 1
#endif
// <q>Mutex
// <i> Enables Mutex event generation.
#ifndef OS_EVR_MUTEX
#define OS_EVR_MUTEX 1
#endif
// <q>Semaphore
// <i> Enables Semaphore event generation.
#ifndef OS_EVR_SEMAPHORE
#define OS_EVR_SEMAPHORE 1
#endif
// <q>Memory Pool
// <i> Enables Memory Pool event generation.
#ifndef OS_EVR_MEMPOOL
#define OS_EVR_MEMPOOL 1
#endif
// <q>Message Queue
// <i> Enables Message Queue event generation.
#ifndef OS_EVR_MSGQUEUE
#define OS_EVR_MSGQUEUE 1
#endif
// </h>
// </h>
// Number of Threads which use standard C/C++ library libspace
// (when thread specific memory allocation is not used).
#if (OS_THREAD_OBJ_MEM == 0)
#ifndef OS_THREAD_LIBSPACE_NUM
#define OS_THREAD_LIBSPACE_NUM 4
#endif
#else
#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM
#endif
//------------- <<< end of configuration section >>> ---------------------------
#endif // RTX_CONFIG_H_
/**************************************************************************//**
* @file retarget.c
* @version V3.00
* @brief Debug Port and Semihost Setting Source File
*
* @note
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/
#include <stdio.h>
#include "NuMicro.h"
#if defined (__ICCARM__)
# pragma diag_suppress=Pm150
#endif
#if defined ( __CC_ARM )
#if (__ARMCC_VERSION < 400000)
#else
/* Insist on keeping widthprec, to avoid X propagation by benign code in C-lib */
#pragma import _printf_widthprec
#endif
#endif
/*---------------------------------------------------------------------------------------------------------*/
/* Global variables */
/*---------------------------------------------------------------------------------------------------------*/
#if !(defined(__ICCARM__) && (__VER__ >= 6010000))
# if (__ARMCC_VERSION < 6040000)
struct __FILE
{
int handle; /* Add whatever you need here */
};
# endif
#elif(__VER__ >= 8000000)
struct __FILE
{
int handle; /* Add whatever you need here */
};
#endif
FILE __stdout;
FILE __stdin;
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION > 6040000)
# if !defined(__MICROLIB)
__asm(".global __ARM_use_no_argv\n\t" "__ARM_use_no_argv:\n\t");
# endif
#endif
#if (defined(__ARMCC_VERSION) || defined(__ICCARM__))
extern int32_t SH_DoCommand(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0);
#if defined( __ICCARM__ )
__WEAK
#else
__attribute__((weak))
#endif
uint32_t ProcessHardFault(uint32_t lr, uint32_t msp, uint32_t psp);
#endif
#pragma pack(push)
#pragma pack(1)
typedef struct {
char *name;
uint32_t u32Addr;
uint8_t u8NSIdx;
} IP_T;
#pragma pack(pop)
#ifndef DEBUG_ENABLE_SEMIHOST
static IP_T s_IpTbl[] = {
{"SYS",SYS_BASE,0},
{"CLK",CLK_BASE,0},
{"INT",INT_BASE,0},
{"GPIOA",GPIOA_BASE,224+0},
{"GPIOB",GPIOB_BASE,224+1},
{"GPIOC",GPIOC_BASE,224+2},
{"GPIOD",GPIOD_BASE,224+3},
{"GPIOE",GPIOE_BASE,224+4},
{"GPIOF",GPIOF_BASE,224+5},
{"GPIOG",GPIOG_BASE,224+6},
{"GPIOH",GPIOH_BASE,224+7},
{"GPIO_DBCTL",GPIO_DBCTL_BASE,0},
{"PA",GPIO_PIN_DATA_BASE ,224+0},
{"PB",GPIO_PIN_DATA_BASE+16*4 ,224+0},
{"PC",GPIO_PIN_DATA_BASE+2*16*4,224+0},
{"PD",GPIO_PIN_DATA_BASE+3*16*4,224+0},
{"PE",GPIO_PIN_DATA_BASE+4*16*4,224+0},
{"PF",GPIO_PIN_DATA_BASE+5*16*4,224+0},
{"PG",GPIO_PIN_DATA_BASE+6*16*4,224+0},
{"PH",GPIO_PIN_DATA_BASE+7*16*4,224+0},
{"PDMA0",PDMA0_BASE,0},
{"PDMA1",PDMA1_BASE,PDMA1_Attr},
{"USBH",USBH_BASE,USBH_Attr},
{"FMC",FMC_BASE,0},
{"SDH0",SDH0_BASE,SDH0_Attr},
{"EBI",EBI_BASE,EBI_Attr},
{"SCU",SCU_BASE,0},
{"CRC",CRC_BASE,CRC_Attr},
{"CRPT",CRPT_BASE,CRPT_Attr},
{"WDT",WDT_BASE,0},
{"WWDT",WWDT_BASE,0},
{"RTC",RTC_BASE,RTC_Attr},
{"EADC",EADC_BASE,EADC_Attr},
{"ACMP01",ACMP01_BASE,ACMP01_Attr},
{"DAC0",DAC0_BASE,DAC_Attr},
{"DAC1",DAC1_BASE,DAC_Attr},
{"I2S0",I2S0_BASE,I2S0_Attr},
{"OTG",OTG_BASE,OTG_Attr},
{"TMR01",TMR01_BASE,0},
{"TMR23",TMR23_BASE,TMR23_Attr},
{"EPWM0",EPWM0_BASE,EPWM0_Attr},
{"EPWM1",EPWM1_BASE,EPWM1_Attr},
{"BPWM0",BPWM0_BASE,BPWM0_Attr},
{"BPWM1",BPWM1_BASE,BPWM1_Attr},
{"QSPI0",QSPI0_BASE,QSPI0_Attr},
{"SPI0",SPI0_BASE,SPI0_Attr},
{"SPI1",SPI1_BASE,SPI1_Attr},
{"SPI2",SPI2_BASE,SPI2_Attr},
{"SPI3",SPI3_BASE,SPI3_Attr},
{"UART0",UART0_BASE,UART0_Attr},
{"UART1",UART1_BASE,UART1_Attr},
{"UART2",UART2_BASE,UART2_Attr},
{"UART3",UART3_BASE,UART3_Attr},
{"UART4",UART4_BASE,UART4_Attr},
{"UART5",UART5_BASE,UART5_Attr},
{"I2C0",I2C0_BASE,I2C0_Attr},
{"I2C1",I2C1_BASE,I2C1_Attr},
{"I2C2",I2C2_BASE,I2C2_Attr},
{"SC0",SC0_BASE,SC0_Attr},
{"SC1",SC1_BASE,SC1_Attr},
{"SC2",SC2_BASE,SC2_Attr},
{"CAN0",CAN0_BASE,CAN0_Attr},
{"QEI0",QEI0_BASE,QEI0_Attr},
{"QEI1",QEI1_BASE,QEI1_Attr},
{"ECAP0",ECAP0_BASE,ECAP0_Attr},
{"ECAP1",ECAP1_BASE,ECAP1_Attr},
{"TRNG",TRNG_BASE,TRNG_Attr},
{"USBD",USBD_BASE,USBD_Attr},
{"USCI0",USCI0_BASE, USCI0_Attr},
{"USCI1",USCI1_BASE, USCI1_Attr},
{0,USCI1_BASE+4096, 0},
};
#endif
int kbhit(void);
int IsDebugFifoEmpty(void);
void _ttywrch(int ch);
int fputc(int ch, FILE *stream);
#if (defined(__ARMCC_VERSION) || defined(__ICCARM__))
int fgetc(FILE *stream);
int ferror(FILE *stream);
#endif
char GetChar(void);
void SendChar_ToUART(int ch);
void SendChar(int ch);
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0);
void _sys_exit(int return_code)__attribute__((noreturn));
#if (defined(DEBUG_ENABLE_SEMIHOST) || defined(OS_USE_SEMIHOSTING))
#if (defined(__ARMCC_VERSION) || defined(__ICCARM__) || defined(__GNUC__))
/* The static buffer is used to speed up the semihost */
static char g_buf[16];
static char g_buf_len = 0;
static volatile int32_t g_ICE_Conneced = 1;
/**
* @brief This function is called by Hardfault handler.
* @param None
* @returns None
* @details This function is called by Hardfault handler and check if it is caused by __BKPT or not.
*
*/
uint32_t ProcessHardFault(uint32_t lr, uint32_t msp, uint32_t psp)
{
uint32_t *sp = 0;
uint32_t inst;
/* Check the used stack */
if(lr & 0x40)
{
/* Secure stack used */
if(lr & 4)
sp = (uint32_t *)psp;
else
sp = (uint32_t *)msp;
}
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
else
{
/* Non-secure stack used */
if(lr & 4)
sp = (uint32_t *)__TZ_get_PSP_NS();
else
sp = (uint32_t *)__TZ_get_MSP_NS();
}
#endif
if (sp != 0)
{
/* Get the instruction caused the hardfault */
inst = M16(sp[6]);
if(inst == 0xBEAB)
{
/*
If the instruction is 0xBEAB, it means it is caused by BKPT without ICE connected.
We still return for output/input message to UART.
*/
g_ICE_Conneced = 0; // Set a flag for ICE offline
sp[6] += 2; // return to next instruction
return lr; // Keep lr in R0
}
}
/* It is casued by hardfault (Not semihost). Just process the hard fault here. */
/* TODO: Implement your hardfault handle code here */
/*
printf(" HardFault!\n\n");
printf("r0 = 0x%x\n", sp[0]);
printf("r1 = 0x%x\n", sp[1]);
printf("r2 = 0x%x\n", sp[2]);
printf("r3 = 0x%x\n", sp[3]);
printf("r12 = 0x%x\n", sp[4]);
printf("lr = 0x%x\n", sp[5]);
printf("pc = 0x%x\n", sp[6]);
printf("psr = 0x%x\n", sp[7]);
*/
while(1){}
}
/**
*
* @brief The function to process semihosted command
* @param[in] n32In_R0 : semihost register 0
* @param[in] n32In_R1 : semihost register 1
* @param[out] pn32Out_R0: semihost register 0
* @retval 0: No ICE debug
* @retval 1: ICE debug
*
*/
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0)
{
(void)n32In_R1;
if(g_ICE_Conneced)
{
if(pn32Out_R0)
*pn32Out_R0 = n32In_R0;
return 1;
}
return 0;
}
#endif
#else // defined(DEBUG_ENABLE_SEMIHOST)
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0);
#if defined( __ICCARM__ )
__WEAK
#else
__attribute__((weak))
#endif
uint32_t ProcessHardFault(uint32_t lr, uint32_t msp, uint32_t psp)
{
extern void SCU_IRQHandler(void);
uint32_t *sp = 0ul;
uint32_t i;
uint32_t inst, addr,taddr = 0ul,tdata;
int32_t secure;
uint32_t rm,rn,rt, imm5, imm8;
int32_t eFlag;
uint8_t idx, bit;
int32_t s;
/* Check the used stack */
secure = (lr & 0x40ul)?1ul:0ul;
if(secure)
{
/* Secure stack used */
if(lr & 4UL)
{
sp = (uint32_t *)psp;
}
else
{
sp = (uint32_t *)msp;
}
}
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)
else
{
/* Non-secure stack used */
if(lr & 4)
sp = (uint32_t *)(uint32_t)__TZ_get_PSP_NS();
else
sp = (uint32_t *)(uint32_t)__TZ_get_MSP_NS();
}
#endif
/*
r0 = sp[0]
r1 = sp[1]
r2 = sp[2]
r3 = sp[3]
r12 = sp[4]
lr = sp[5]
pc = sp[6]
psr = sp[7]
*/
printf("!!---------------------------------------------------------------!!\n");
printf(" <<< HardFault >>>\n");
/* Get the instruction caused the hardfault */
addr = sp[6];
inst = M16(addr);
eFlag = 0;
if((!secure) && ((addr & NS_OFFSET) == 0) )
{
printf(" Non-secure CPU try to fetch secure code in 0x%x\n", addr);
printf(" Try to check NSC region or SAU settings.\n");
eFlag = 1;
}else if(inst == 0xBEAB)
{
printf(" Execute BKPT without ICE connected\n");
eFlag = 2;
}
else if((inst >> 12) == 5)
{
eFlag = 3;
/* 0101xx Load/store (register offset) on page C2-327 of armv8m ref */
rm = (inst >> 6) & 0x7;
rn = (inst >> 3) & 0x7;
rt = inst & 0x7;
taddr = sp[rn] + sp[rm];
tdata = sp[rt];
if(rn == rt)
{
printf(" [0x%08x] 0x%04x %s R%d [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",rt, taddr);
}
else
{
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
}
else if((inst >> 13) == 3)
{
eFlag = 3;
/* 011xxx Load/store word/byte (immediate offset) on page C2-327 of armv8m ref */
imm5 = (inst >> 6) & 0x1f;
rn = (inst >> 3) & 0x7;
rt = inst & 0x7;
taddr = sp[rn] + imm5;
tdata = sp[rt];
if(rt == rn)
{
printf(" [0x%08x] 0x%04x %s R%d [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",rt, taddr);
}
else
{
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
}
else if((inst >> 12) == 8)
{
eFlag = 3;
/* 1000xx Load/store halfword (immediate offset) on page C2-328 */
imm5 = (inst >> 6) & 0x1f;
rn = (inst >> 3) & 0x7;
rt = inst & 0x7;
taddr = sp[rn] + imm5;
tdata = sp[rt];
if(rt == rn)
{
printf(" [0x%08x] 0x%04x %s R%d [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",rt, taddr);
}
else
{
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
}
else if((inst >> 12) == 9)
{
eFlag = 3;
/* 1001xx Load/store (SP-relative) on page C2-328 */
imm8 = inst & 0xff;
rt = (inst >> 8) & 0x7;
taddr = sp[6] + imm8;
tdata = sp[rt];
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
else
{
eFlag = 4;
printf(" Unexpected instruction: 0x%04x \n", inst);
}
if(eFlag == 3)
{
/* It is LDR/STR hardfault */
if(!secure)
{
/* It is happened in Nonsecure code */
for(i=0;i< (uint32_t)(sizeof(s_IpTbl)/sizeof(IP_T)-1);i++)
{
/* Case 1: Nonsecure code try to access secure IP. It also causes SCU violation */
if((taddr >= s_IpTbl[i].u32Addr) && (taddr < (s_IpTbl[i+1].u32Addr)))
{
idx = s_IpTbl[i].u8NSIdx;
bit = idx & 0x1f;
idx = idx >> 5;
s = (SCU->PNSSET[idx] >> bit) & 1ul;
printf(" Illegal access to %s %s in Nonsecure code.\n",(s)?"Nonsecure":"Secure", s_IpTbl[i].name);
break;
}
/* Case 2: Nonsecure code try to access Nonsecure IP but the IP is secure IP */
if((taddr >= (s_IpTbl[i].u32Addr+NS_OFFSET)) && (taddr < (s_IpTbl[i+1].u32Addr+NS_OFFSET)))
{
idx = s_IpTbl[i].u8NSIdx;
bit = idx & 0x1f;
idx = idx >> 5;
s = (SCU->PNSSET[idx] >> bit) & 1ul;
printf(" Illegal access to %s %s in Nonsecure code.\nIt may be set as secure IP here.\n",(s)?"Nonsecure":"Secure", s_IpTbl[i].name);
break;
}
}
}
else
{
/* It is happened in secure code */
if(taddr > NS_OFFSET)
{
/* Case 3: Secure try to access secure IP through Nonsecure address. It also causes SCU violation */
for(i=0;i< (uint32_t)(sizeof(s_IpTbl)/sizeof(IP_T)-1);i++)
{
if((taddr >= (s_IpTbl[i].u32Addr+NS_OFFSET)) && (taddr < (s_IpTbl[i+1].u32Addr+NS_OFFSET)))
{
idx = s_IpTbl[i].u8NSIdx;
bit = idx & 0x1f;
idx = idx >> 5;
s = (SCU->PNSSET[idx] >> bit) & 1ul;
printf(" Illegal to use Nonsecure address to access %s %s in Secure code\n",(s)?"Nonsecure":"Secure", s_IpTbl[i].name);
break;
}
}
}
}
}
SCU_IRQHandler();
printf("!!---------------------------------------------------------------!!\n");
/* Or *sp to remove compiler warning */
while(1U|*sp){}
return lr;
}
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0)
{
(void)n32In_R0;
(void)n32In_R1;
(void)pn32Out_R0;
return 0;
}
#endif /* defined(DEBUG_ENABLE_SEMIHOST) */
/**
* @brief Routine to send a char
*
* @param[in] ch A character data writes to debug port
*
* @returns Send value from UART debug port
*
* @details Send a target char to UART debug port .
*/
#ifndef NONBLOCK_PRINTF
void SendChar_ToUART(int ch)
{
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk){}
if((char)ch == '\n')
{
DEBUG_PORT->DAT = '\r';
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk){}
}
DEBUG_PORT->DAT = (uint32_t)ch;
}
#else
/* Non-block implement of send char */
# define BUF_SIZE 512
void SendChar_ToUART(int ch)
{
static uint8_t u8Buf[BUF_SIZE] = {0};
static int32_t i32Head = 0;
static int32_t i32Tail = 0;
int32_t i32Tmp;
/* Only flush the data in buffer to UART when ch == 0 */
if(ch)
{
// Push char
if(ch == '\n')
{
i32Tmp = i32Head+1;
if(i32Tmp > BUF_SIZE) i32Tmp = 0;
if(i32Tmp != i32Tail)
{
u8Buf[i32Head] = '\r';
i32Head = i32Tmp;
}
}
i32Tmp = i32Head+1;
if(i32Tmp > BUF_SIZE) i32Tmp = 0;
if(i32Tmp != i32Tail)
{
u8Buf[i32Head] = ch;
i32Head = i32Tmp;
}
}
else
{
if(i32Tail == i32Head)
return;
}
// pop char
do
{
i32Tmp = i32Tail + 1;
if(i32Tmp > BUF_SIZE) i32Tmp = 0;
if((DEBUG_PORT->FSR & UART_FSR_TX_FULL_Msk) == 0)
{
DEBUG_PORT->DATA = u8Buf[i32Tail];
i32Tail = i32Tmp;
}
else
break; // FIFO full
}while(i32Tail != i32Head);
}
#endif
/**
* @brief Routine to send a char
*
* @param[in] ch A character data writes to debug port
*
* @returns Send value from UART debug port or semihost
*
* @details Send a target char to UART debug port or semihost.
*/
void SendChar(int ch)
{
#if defined(DEBUG_ENABLE_SEMIHOST)
g_buf[(uint8_t)g_buf_len++] = (char)ch;
g_buf[(uint8_t)g_buf_len] = '\0';
if(g_buf_len + 1 >= sizeof(g_buf) || ch == '\n' || ch == '\0')
{
/* Send the char */
if(g_ICE_Conneced)
{
if(SH_DoCommand(0x04, (int)g_buf, NULL) != 0)
{
g_buf_len = 0;
return;
}
}
else
{
# if (DEBUG_ENABLE_SEMIHOST == 2) // Re-direct to UART Debug Port only when DEBUG_ENABLE_SEMIHOST=2
int i;
for(i = 0; i < g_buf_len; i++)
SendChar_ToUART(g_buf[i]);
g_buf_len = 0;
# endif
}
}
#else
SendChar_ToUART(ch);
#endif
}
/**
* @brief Routine to get a char
*
* @param None
*
* @returns Get value from UART debug port or semihost
*
* @details Wait UART debug port or semihost to input a char.
*/
char GetChar(void)
{
#ifdef DEBUG_ENABLE_SEMIHOST
# if defined (__ICCARM__)
int nRet;
while(SH_DoCommand(0x7, 0, &nRet) != 0)
{
if(nRet != 0)
return (char)nRet;
}
# else
int nRet;
while(SH_DoCommand(0x101, 0, &nRet) != 0)
{
if(nRet != 0)
{
SH_DoCommand(0x07, 0, &nRet);
return (char)nRet;
}
}
# if (DEBUG_ENABLE_SEMIHOST == 2) // Re-direct to UART Debug Port only when DEBUG_ENABLE_SEMIHOST=2
/* Use debug port when ICE is not connected at semihost mode */
while(!g_ICE_Conneced)
{
if((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0)
{
return (DEBUG_PORT->DAT);
}
}
# endif
# endif
return (0);
#else
while(1)
{
if((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0U)
{
return ((char)DEBUG_PORT->DAT);
}
}
#endif
}
/**
* @brief Check any char input from UART
*
* @param None
*
* @retval 1: No any char input
* @retval 0: Have some char input
*
* @details Check UART RSR RX EMPTY or not to determine if any char input from UART
*/
int kbhit(void)
{
return !((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0U);
}
/**
* @brief Check if debug message finished
*
* @param None
*
* @retval 1: Message is finished
* @retval 0: Message is transmitting.
*
* @details Check if message finished (FIFO empty of debug port)
*/
int IsDebugFifoEmpty(void)
{
return ((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXEMPTYF_Msk) != 0U);
}
/**
* @brief C library retargetting
*
* @param[in] ch Write a character data
*
* @returns None
*
* @details Check if message finished (FIFO empty of debug port)
*/
void _ttywrch(int ch)
{
SendChar(ch);
return;
}
/**
* @brief Write character to stream
*
* @param[in] ch Character to be written. The character is passed as its int promotion.
* @param[in] stream Pointer to a FILE object that identifies the stream where the character is to be written.
*
* @returns If there are no errors, the same character that has been written is returned.
* If an error occurs, EOF is returned and the error indicator is set (see ferror).
*
* @details Writes a character to the stream and advances the position indicator.\n
* The character is written at the current position of the stream as indicated \n
* by the internal position indicator, which is then advanced one character.
*
* @note The above descriptions are copied from http://www.cplusplus.com/reference/clibrary/cstdio/fputc/.
*
*
*/
int fputc(int ch, FILE *stream)
{
(void)stream;
SendChar(ch);
return ch;
}
#if (defined(__GNUC__) && !defined(__ARMCC_VERSION))
#if !defined(OS_USE_SEMIHOSTING)
int _write (int fd, char *ptr, int len)
{
int i = len;
while(i--) {
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk);
if(*ptr == '\n') {
DEBUG_PORT->DAT = '\r';
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk);
}
DEBUG_PORT->DAT = *ptr++;
}
return len;
}
int _read (int fd, char *ptr, int len)
{
while((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) != 0);
*ptr = DEBUG_PORT->DAT;
return 1;
}
#endif
#else
/**
* @brief Get character from UART debug port or semihosting input
*
* @param[in] stream Pointer to a FILE object that identifies the stream on which the operation is to be performed.
*
* @returns The character read from UART debug port or semihosting
*
* @details For get message from debug port or semihosting.
*
*/
int fgetc(FILE *stream)
{
(void)stream;
return ((int)GetChar());
}
/**
* @brief Check error indicator
*
* @param[in] stream Pointer to a FILE object that identifies the stream.
*
* @returns If the error indicator associated with the stream was set, the function returns a nonzero value.
* Otherwise, it returns a zero value.
*
* @details Checks if the error indicator associated with stream is set, returning a value different
* from zero if it is. This indicator is generally set by a previous operation on the stream that failed.
*
* @note The above descriptions are copied from http://www.cplusplus.com/reference/clibrary/cstdio/ferror/.
*
*/
int ferror(FILE *stream)
{
(void)stream;
return EOF;
}
#endif
#ifdef DEBUG_ENABLE_SEMIHOST
# ifdef __ICCARM__
void __exit(int return_code)
{
/* Check if link with ICE */
if(SH_DoCommand(0x18, 0x20026, NULL) == 0)
{
/* Make sure all message is print out */
while(IsDebugFifoEmpty() == 0);
}
label:
goto label; /* endless loop */
}
# else
void _sys_exit(int return_code)
{
(void)return_code;
/* Check if link with ICE */
if(SH_DoCommand(0x18, 0x20026, NULL) == 0)
{
/* Make sure all message is print out */
while(IsDebugFifoEmpty() == 0);
}
label:
goto label; /* endless loop */
}
# endif
#endif
/*** (C) COPYRIGHT 2016-2020 Nuvoton Technology Corp. ***/
;/**************************************************************************//**
; * @file startup_M2351.s
; * @version V2.00
; * $Revision: 9 $
; * $Date: 16/08/27 12:33p $
; * @brief Startup Source File
; *
; * @note
; * SPDX-License-Identifier: Apache-2.0
; * Copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
; *
; ******************************************************************************/
;/*
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
;*/
; <h> Stack Configuration
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
IF :LNOT: :DEF: Stack_Size
Stack_Size EQU 0x00001000
ENDIF
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
IF :LNOT: :DEF: Heap_Size
Heap_Size EQU 0x00002800
ENDIF
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
IMPORT SCU_IRQHandler
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; SVCall Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD PendSV_Handler ; PendSV Handler
DCD SysTick_Handler ; SysTick Handler
; External Interrupts
; maximum of 32 External Interrupts are possible
DCD BOD_IRQHandler ; 0
DCD IRC_IRQHandler ; 1
DCD PWRWU_IRQHandler ; 2
DCD SRAM_IRQHandler ; 3
DCD CLKFAIL_IRQHandler ; 4
DCD DEFAULT_IRQHandler ; 5
DCD RTC_IRQHandler ; 6
DCD TAMPER_IRQHandler ; 7
DCD WDT_IRQHandler ; 8
DCD WWDT_IRQHandler ; 9
DCD EINT0_IRQHandler ; 10
DCD EINT1_IRQHandler ; 11
DCD EINT2_IRQHandler ; 12
DCD EINT3_IRQHandler ; 13
DCD EINT4_IRQHandler ; 14
DCD EINT5_IRQHandler ; 15
DCD GPA_IRQHandler ; 16
DCD GPB_IRQHandler ; 17
DCD GPC_IRQHandler ; 18
DCD GPD_IRQHandler ; 19
DCD GPE_IRQHandler ; 20
DCD GPF_IRQHandler ; 21
DCD QSPI0_IRQHandler ; 22
DCD SPI0_IRQHandler ; 23
DCD BRAKE0_IRQHandler ; 24
DCD EPWM0_P0_IRQHandler ; 25
DCD EPWM0_P1_IRQHandler ; 26
DCD EPWM0_P2_IRQHandler ; 27
DCD BRAKE1_IRQHandler ; 28
DCD EPWM1_P0_IRQHandler ; 29
DCD EPWM1_P1_IRQHandler ; 30
DCD EPWM1_P2_IRQHandler ; 31
DCD TMR0_IRQHandler ; 32
DCD TMR1_IRQHandler ; 33
DCD TMR2_IRQHandler ; 34
DCD TMR3_IRQHandler ; 35
DCD UART0_IRQHandler ; 36
DCD UART1_IRQHandler ; 37
DCD I2C0_IRQHandler ; 38
DCD I2C1_IRQHandler ; 39
DCD PDMA0_IRQHandler ; 40
DCD DAC_IRQHandler ; 41
DCD EADC0_IRQHandler ; 42
DCD EADC1_IRQHandler ; 43
DCD ACMP01_IRQHandler ; 44
DCD DEFAULT_IRQHandler ; 45
DCD EADC2_IRQHandler ; 46
DCD EADC3_IRQHandler ; 47
DCD UART2_IRQHandler ; 48
DCD UART3_IRQHandler ; 49
DCD DEFAULT_IRQHandler ; 50
DCD SPI1_IRQHandler ; 51
DCD SPI2_IRQHandler ; 52
DCD USBD_IRQHandler ; 53
DCD USBH_IRQHandler ; 54
DCD USBOTG_IRQHandler ; 55
DCD CAN0_IRQHandler ; 56
DCD DEFAULT_IRQHandler ; 57
DCD SC0_IRQHandler ; 58
DCD SC1_IRQHandler ; 59
DCD SC2_IRQHandler ; 60
DCD DEFAULT_IRQHandler ; 61
DCD SPI3_IRQHandler ; 62
DCD DEFAULT_IRQHandler ; 63
DCD SDH0_IRQHandler ; 64
DCD DEFAULT_IRQHandler ; 65
DCD DEFAULT_IRQHandler ; 66
DCD DEFAULT_IRQHandler ; 67
DCD I2S0_IRQHandler ; 68
DCD DEFAULT_IRQHandler ; 69
DCD OPA0_IRQHandler ; 70
DCD CRPT_IRQHandler ; 71
DCD GPG_IRQHandler ; 72
DCD EINT6_IRQHandler ; 73
DCD UART4_IRQHandler ; 74
DCD UART5_IRQHandler ; 75
DCD USCI0_IRQHandler ; 76
DCD USCI1_IRQHandler ; 77
DCD BPWM0_IRQHandler ; 78
DCD BPWM1_IRQHandler ; 79
DCD DEFAULT_IRQHandler ; 80
DCD DEFAULT_IRQHandler ; 81
DCD I2C2_IRQHandler ; 82
DCD DEFAULT_IRQHandler ; 83
DCD QEI0_IRQHandler ; 84
DCD QEI1_IRQHandler ; 85
DCD ECAP0_IRQHandler ; 86
DCD ECAP1_IRQHandler ; 87
DCD GPH_IRQHandler ; 88
DCD EINT7_IRQHandler ; 89
DCD DEFAULT_IRQHandler ; 90
DCD DEFAULT_IRQHandler ; 91
DCD DEFAULT_IRQHandler ; 92
DCD DEFAULT_IRQHandler ; 93
DCD DEFAULT_IRQHandler ; 94
DCD DEFAULT_IRQHandler ; 95
DCD DEFAULT_IRQHandler ; 96
DCD DEFAULT_IRQHandler ; 97
DCD PDMA1_IRQHandler ; 98
DCD SCU_IRQHandler ; 99
DCD DEFAULT_IRQHandler ; 100
DCD TRNG_IRQHandler ; 101
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
IMPORT ProcessHardFault
EXPORT HardFault_Handler [WEAK]
MOV R0, LR
MRS R1, MSP
MRS R2, PSP
LDR R3, =ProcessHardFault
BLX R3
BX R0
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT BOD_IRQHandler [WEAK] ; 0
EXPORT IRC_IRQHandler [WEAK] ; 1
EXPORT PWRWU_IRQHandler [WEAK] ; 2
EXPORT SRAM_IRQHandler [WEAK] ; 3
EXPORT CLKFAIL_IRQHandler [WEAK] ; 4
;EXPORT 0 [WEAK] ; 5
EXPORT RTC_IRQHandler [WEAK] ; 6
EXPORT TAMPER_IRQHandler [WEAK] ; 7
EXPORT WDT_IRQHandler [WEAK] ; 8
EXPORT WWDT_IRQHandler [WEAK] ; 9
EXPORT EINT0_IRQHandler [WEAK] ; 10
EXPORT EINT1_IRQHandler [WEAK] ; 11
EXPORT EINT2_IRQHandler [WEAK] ; 12
EXPORT EINT3_IRQHandler [WEAK] ; 13
EXPORT EINT4_IRQHandler [WEAK] ; 14
EXPORT EINT5_IRQHandler [WEAK] ; 15
EXPORT GPA_IRQHandler [WEAK] ; 16
EXPORT GPB_IRQHandler [WEAK] ; 17
EXPORT GPC_IRQHandler [WEAK] ; 18
EXPORT GPD_IRQHandler [WEAK] ; 19
EXPORT GPE_IRQHandler [WEAK] ; 20
EXPORT GPF_IRQHandler [WEAK] ; 21
EXPORT QSPI0_IRQHandler [WEAK] ; 22
EXPORT SPI0_IRQHandler [WEAK] ; 23
EXPORT BRAKE0_IRQHandler [WEAK] ; 24
EXPORT EPWM0_P0_IRQHandler [WEAK] ; 25
EXPORT EPWM0_P1_IRQHandler [WEAK] ; 26
EXPORT EPWM0_P2_IRQHandler [WEAK] ; 27
EXPORT BRAKE1_IRQHandler [WEAK] ; 28
EXPORT EPWM1_P0_IRQHandler [WEAK] ; 29
EXPORT EPWM1_P1_IRQHandler [WEAK] ; 30
EXPORT EPWM1_P2_IRQHandler [WEAK] ; 31
EXPORT TMR0_IRQHandler [WEAK] ; 32
EXPORT TMR1_IRQHandler [WEAK] ; 33
EXPORT TMR2_IRQHandler [WEAK] ; 34
EXPORT TMR3_IRQHandler [WEAK] ; 35
EXPORT UART0_IRQHandler [WEAK] ; 36
EXPORT UART1_IRQHandler [WEAK] ; 37
EXPORT I2C0_IRQHandler [WEAK] ; 38
EXPORT I2C1_IRQHandler [WEAK] ; 39
EXPORT PDMA0_IRQHandler [WEAK] ; 40
EXPORT DAC_IRQHandler [WEAK] ; 41
EXPORT EADC0_IRQHandler [WEAK] ; 42
EXPORT EADC1_IRQHandler [WEAK] ; 43
EXPORT ACMP01_IRQHandler [WEAK] ; 44
;EXPORT 0 [WEAK] ; 45
EXPORT EADC2_IRQHandler [WEAK] ; 46
EXPORT EADC3_IRQHandler [WEAK] ; 47
EXPORT UART2_IRQHandler [WEAK] ; 48
EXPORT UART3_IRQHandler [WEAK] ; 49
;EXPORT 0 [WEAK] ; 50
EXPORT SPI1_IRQHandler [WEAK] ; 51
EXPORT SPI2_IRQHandler [WEAK] ; 52
EXPORT USBD_IRQHandler [WEAK] ; 53
EXPORT USBH_IRQHandler [WEAK] ; 54
EXPORT USBOTG_IRQHandler [WEAK] ; 55
EXPORT CAN0_IRQHandler [WEAK] ; 56
EXPORT CAN1_IRQHandler [WEAK] ; 57
EXPORT SC0_IRQHandler [WEAK] ; 58
EXPORT SC1_IRQHandler [WEAK] ; 59
EXPORT SC2_IRQHandler [WEAK] ; 60
EXPORT SC3_IRQHandler [WEAK] ; 61
EXPORT SPI3_IRQHandler [WEAK] ; 62
;EXPORT 0 [WEAK] ; 63
EXPORT SDH0_IRQHandler [WEAK] ; 64
;EXPORT 0 [WEAK] ; 65
;EXPORT 0 [WEAK] ; 66
;EXPORT 0 [WEAK] ; 67
EXPORT I2S0_IRQHandler [WEAK] ; 68
;EXPORT 0 [WEAK] ; 69
EXPORT OPA0_IRQHandler [WEAK] ; 70
EXPORT CRPT_IRQHandler [WEAK] ; 71
EXPORT GPG_IRQHandler [WEAK] ; 72
EXPORT EINT6_IRQHandler [WEAK] ; 73
EXPORT UART4_IRQHandler [WEAK] ; 74
EXPORT UART5_IRQHandler [WEAK] ; 75
EXPORT USCI0_IRQHandler [WEAK] ; 76
EXPORT USCI1_IRQHandler [WEAK] ; 77
EXPORT BPWM0_IRQHandler [WEAK] ; 78
EXPORT BPWM1_IRQHandler [WEAK] ; 79
;EXPORT 0 [WEAK] ; 80
;EXPORT 0 [WEAK] ; 81
EXPORT I2C2_IRQHandler [WEAK] ; 82
;EXPORT 0 [WEAK] ; 83
EXPORT QEI0_IRQHandler [WEAK] ; 84
EXPORT QEI1_IRQHandler [WEAK] ; 85
EXPORT ECAP0_IRQHandler [WEAK] ; 86
EXPORT ECAP1_IRQHandler [WEAK] ; 87
EXPORT GPH_IRQHandler [WEAK] ; 88
EXPORT EINT7_IRQHandler [WEAK] ; 89
EXPORT SDH1_IRQHandler [WEAK] ; 90
;EXPORT 0 [WEAK] ; 91
;EXPORT USBH_IRQHandler [WEAK] ; 92
;EXPORT 0 [WEAK] ; 93
;EXPORT 0 [WEAK] ; 94
;EXPORT 0 [WEAK] ; 95
;EXPORT 0 [WEAK] ; 96
;EXPORT 0 [WEAK] ; 97
EXPORT PDMA1_IRQHandler [WEAK] ; 98
;EXPORT SCU_IRQHandler [WEAK] ; 99
;EXPORT 0 [WEAK] ; 100
EXPORT TRNG_IRQHandler [WEAK] ; 101
EXPORT DEFAULT_IRQHandler [WEAK]
BOD_IRQHandler ; 0
IRC_IRQHandler ; 1
PWRWU_IRQHandler ; 2
SRAM_IRQHandler ; 3
CLKFAIL_IRQHandler ; 4
;0 ; 5
RTC_IRQHandler ; 6
TAMPER_IRQHandler ; 7
WDT_IRQHandler ; 8
WWDT_IRQHandler ; 9
EINT0_IRQHandler ; 10
EINT1_IRQHandler ; 11
EINT2_IRQHandler ; 12
EINT3_IRQHandler ; 13
EINT4_IRQHandler ; 14
EINT5_IRQHandler ; 15
GPA_IRQHandler ; 16
GPB_IRQHandler ; 17
GPC_IRQHandler ; 18
GPD_IRQHandler ; 19
GPE_IRQHandler ; 20
GPF_IRQHandler ; 21
QSPI0_IRQHandler ; 22
SPI0_IRQHandler ; 23
BRAKE0_IRQHandler ; 24
EPWM0_P0_IRQHandler ; 25
EPWM0_P1_IRQHandler ; 26
EPWM0_P2_IRQHandler ; 27
BRAKE1_IRQHandler ; 28
EPWM1_P0_IRQHandler ; 29
EPWM1_P1_IRQHandler ; 30
EPWM1_P2_IRQHandler ; 31
TMR0_IRQHandler ; 32
TMR1_IRQHandler ; 33
TMR2_IRQHandler ; 34
TMR3_IRQHandler ; 35
UART0_IRQHandler ; 36
UART1_IRQHandler ; 37
I2C0_IRQHandler ; 38
I2C1_IRQHandler ; 39
PDMA0_IRQHandler ; 40
DAC_IRQHandler ; 41
EADC0_IRQHandler ; 42
EADC1_IRQHandler ; 43
ACMP01_IRQHandler ; 44
;0 ; 45
EADC2_IRQHandler ; 46
EADC3_IRQHandler ; 47
UART2_IRQHandler ; 48
UART3_IRQHandler ; 49
;0 ; 50
SPI1_IRQHandler ; 51
SPI2_IRQHandler ; 52
USBD_IRQHandler ; 53
USBH_IRQHandler ; 54
USBOTG_IRQHandler ; 55
CAN0_IRQHandler ; 56
CAN1_IRQHandler ; 57
SC0_IRQHandler ; 58
SC1_IRQHandler ; 59
SC2_IRQHandler ; 60
SC3_IRQHandler ; 61
SPI3_IRQHandler ; 62
;0 ; 63
SDH0_IRQHandler ; 64
;0 ; 65
;0 ; 66
;0 ; 67
I2S0_IRQHandler ; 68
;0 ; 69
OPA0_IRQHandler ; 70
CRPT_IRQHandler ; 71
GPG_IRQHandler ; 72
EINT6_IRQHandler ; 73
UART4_IRQHandler ; 74
UART5_IRQHandler ; 75
USCI0_IRQHandler ; 76
USCI1_IRQHandler ; 77
BPWM0_IRQHandler ; 78
BPWM1_IRQHandler ; 79
;0 ; 80
;0 ; 81
I2C2_IRQHandler ; 82
;0 ; 83
QEI0_IRQHandler ; 84
QEI1_IRQHandler ; 85
ECAP0_IRQHandler ; 86
ECAP1_IRQHandler ; 87
GPH_IRQHandler ; 88
EINT7_IRQHandler ; 89
SDH1_IRQHandler ; 90
;0 ; 91
;USBH_IRQHandler ; 92
;0 ; 93
;0 ; 94
;0 ; 95
;0 ; 96
;0 ; 97
PDMA1_IRQHandler ; 98
;SCU_IRQHandler ; 99
;0 ; 100
TRNG_IRQHandler ; 101
DEFAULT_IRQHandler
B .
ENDP
ALIGN
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap PROC
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDP
ALIGN
ENDIF
;int32_t SH_DoCommand(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0)
SH_DoCommand PROC
EXPORT SH_DoCommand
IMPORT SH_Return
BKPT 0xAB ; Wait ICE or HardFault
LDR R3, =SH_Return
MOV R4, lr
BLX R3 ; Call SH_Return. The return value is in R0
BX R4 ; Return value = R0
ENDP
__PC PROC
EXPORT __PC
MOV r0, lr
BLX lr
ALIGN
ENDP
END
/**************************************************************************//**
* @file system_M2351.c
* @version V2.00
* @brief System Setting Source File
*
* @note
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler 6 */
#include <arm_cmse.h>
#endif
#include <stdio.h>
#include <stdint.h>
#include "NuMicro.h"
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
#include "partition_M2351.h"
extern void SCU_IRQHandler(void);
void TZ_SAU_Setup(void);
#else
extern void SCU_IRQHandler(void)__attribute__((noreturn));
#endif
extern void *__Vectors; /* see startup file */
/*----------------------------------------------------------------------------
Clock Variable definitions
*----------------------------------------------------------------------------*/
uint32_t SystemCoreClock = __HSI; /*!< System Clock Frequency (Core Clock) */
uint32_t CyclesPerUs = (__HSI / 1000000UL);/*!< Cycles per micro second */
uint32_t PllClock = __HSI; /*!< PLL Output Clock Frequency */
//const uint32_t gau32ClkSrcTbl[] = {__HXT, __LXT, 0UL, __LIRC, 0UL, __HIRC48, 0UL, __HIRC};
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
void FMC_NSBA_Setup(void);
void SCU_Setup(void);
void NSC_Init(void);
/**
* @brief Setup Non-secure boundary
*
* @param None
*
* @return None
*
* @details This function is used to set Non-secure boundary according to
* the configuration of partition header file
*/
void FMC_NSBA_Setup(void)
{
/* Skip NSBA Setupt according config */
if(FMC_INIT_NSBA == 0)
return;
/* Check if NSBA value with current active NSBA */
if(SCU->FNSADDR != FMC_SECURE_ROM_SIZE)
{
/* Unlock Protected Register */
SYS_UnlockReg();
/* Enable ISP and config update */
FMC->ISPCTL = FMC_ISPCTL_ISPEN_Msk | FMC_ISPCTL_CFGUEN_Msk;
/* Config Base of NSBA */
FMC->ISPADDR = FMC_NSCBA_BASE ;
/* Read Non-secure base address config */
FMC->ISPCMD = FMC_ISPCMD_READ;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while(FMC->ISPTRG);
/* Setting NSBA when it is empty */
if(FMC->ISPDAT == 0xfffffffful)
{
/* Set new base */
FMC->ISPDAT = FMC_SECURE_ROM_SIZE;
FMC->ISPCMD = FMC_ISPCMD_PROGRAM;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while(FMC->ISPTRG);
/* Verify new base */
FMC->ISPDAT = 0;
FMC->ISPCMD = FMC_ISPCMD_READ;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while(FMC->ISPTRG);
if(FMC->ISPDAT == FMC_SECURE_ROM_SIZE)
{
/* Force Chip Reset to valid new setting */
SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;
}
}
}
}
/**
\brief Setup SCU Configuration Unit
\details
*/
void SCU_Setup(void)
{
int32_t i;
SCU->PNSSET[0] = SCU_INIT_PNSSET0_VAL;
SCU->PNSSET[1] = SCU_INIT_PNSSET1_VAL;
SCU->PNSSET[2] = SCU_INIT_PNSSET2_VAL;
SCU->PNSSET[3] = SCU_INIT_PNSSET3_VAL;
SCU->PNSSET[4] = SCU_INIT_PNSSET4_VAL;
SCU->PNSSET[5] = SCU_INIT_PNSSET5_VAL;
SCU->PNSSET[6] = SCU_INIT_PNSSET6_VAL;
SCU->IONSSET = SCU_INIT_IONSSET_VAL;
/* Set Non-secure SRAM */
for(i = 11; i >= SCU_SECURE_SRAM_SIZE / 8192; i--)
{
SCU->SRAMNSSET |= (1U << i);
}
/* Set interrupt to non-secure according to PNNSET settings */
if(SCU_INIT_PNSSET0_VAL & BIT9 ) NVIC->ITNS[1] |= BIT22; /* Int of USBH_INT */
if(SCU_INIT_PNSSET0_VAL & BIT13) NVIC->ITNS[2] |= BIT0 ; /* Int of SDHOST0_INT */
if(SCU_INIT_PNSSET0_VAL & BIT24) NVIC->ITNS[3] |= BIT2 ; /* Int of PDMA1_INT */
if(SCU_INIT_PNSSET1_VAL & BIT18) NVIC->ITNS[2] |= BIT7 ; /* Int of CRYPTO */
if(SCU_INIT_PNSSET2_VAL & BIT2 ) NVIC->ITNS[3] |= BIT15; /* Int of EWDT_INT */
if(SCU_INIT_PNSSET2_VAL & BIT2 ) NVIC->ITNS[3] |= BIT16; /* Int of EWWDT_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT10; /* Int of EADC0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT11; /* Int of EADC1_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT14; /* Int of EADC2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT15; /* Int of EADC3_INT */
if(SCU_INIT_PNSSET2_VAL & BIT5 ) NVIC->ITNS[1] |= BIT12; /* Int of ACMP01_INT */
if(SCU_INIT_PNSSET2_VAL & BIT7 ) NVIC->ITNS[1] |= BIT9 ; /* Int of DAC_INT */
if(SCU_INIT_PNSSET2_VAL & BIT8 ) NVIC->ITNS[2] |= BIT4 ; /* Int of I2S0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT13) NVIC->ITNS[1] |= BIT23; /* Int of USBOTG_INT */
if(SCU_INIT_PNSSET2_VAL & BIT17) NVIC->ITNS[1] |= BIT2 ; /* Int of TMR2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT17) NVIC->ITNS[1] |= BIT3 ; /* Int of TMR3_INT */
if(SCU_INIT_PNSSET2_VAL & BIT24) NVIC->ITNS[0] |= BIT25; /* Int of EPWM0_P0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT24) NVIC->ITNS[0] |= BIT26; /* Int of EPWM0_P1_INT */
if(SCU_INIT_PNSSET2_VAL & BIT24) NVIC->ITNS[0] |= BIT27; /* Int of EPWM0_P2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT25) NVIC->ITNS[0] |= BIT29; /* Int of EPWM1_P0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT25) NVIC->ITNS[0] |= BIT30; /* Int of EPWM1_P1_INT */
if(SCU_INIT_PNSSET2_VAL & BIT25) NVIC->ITNS[0] |= BIT31; /* Int of EPWM1_P2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT26) NVIC->ITNS[2] |= BIT14; /* Int of BPWM0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT27) NVIC->ITNS[2] |= BIT15; /* Int of BPWM1_INT */
if(SCU_INIT_PNSSET3_VAL & BIT0 ) NVIC->ITNS[0] |= BIT22; /* Int of QSPI0_INT */
if(SCU_INIT_PNSSET3_VAL & BIT1 ) NVIC->ITNS[0] |= BIT23; /* Int of SPI0_INT */
if(SCU_INIT_PNSSET3_VAL & BIT2 ) NVIC->ITNS[1] |= BIT19; /* Int of SPI1_INT */
if(SCU_INIT_PNSSET3_VAL & BIT3 ) NVIC->ITNS[1] |= BIT20; /* Int of SPI2_INT */
if(SCU_INIT_PNSSET3_VAL & BIT4 ) NVIC->ITNS[1] |= BIT30; /* Int of SPI3_INT */
if(SCU_INIT_PNSSET3_VAL & BIT16) NVIC->ITNS[1] |= BIT4 ; /* Int of UART0_INT */
if(SCU_INIT_PNSSET3_VAL & BIT17) NVIC->ITNS[1] |= BIT5 ; /* Int of UART1_INT */
if(SCU_INIT_PNSSET3_VAL & BIT18) NVIC->ITNS[1] |= BIT16; /* Int of UART2_INT */
if(SCU_INIT_PNSSET3_VAL & BIT19) NVIC->ITNS[1] |= BIT17; /* Int of UART3_INT */
if(SCU_INIT_PNSSET3_VAL & BIT20) NVIC->ITNS[2] |= BIT10; /* Int of UART4_INT */
if(SCU_INIT_PNSSET3_VAL & BIT21) NVIC->ITNS[2] |= BIT11; /* Int of UART5_INT */
if(SCU_INIT_PNSSET4_VAL & BIT0 ) NVIC->ITNS[1] |= BIT6 ; /* Int of I2C0_INT */
if(SCU_INIT_PNSSET4_VAL & BIT1 ) NVIC->ITNS[1] |= BIT7 ; /* Int of I2C1_INT */
if(SCU_INIT_PNSSET4_VAL & BIT2 ) NVIC->ITNS[2] |= BIT18; /* Int of I2C2_INT */
if(SCU_INIT_PNSSET4_VAL & BIT16) NVIC->ITNS[1] |= BIT26; /* Int of SC0_INT */
if(SCU_INIT_PNSSET4_VAL & BIT17) NVIC->ITNS[1] |= BIT27; /* Int of SC1_INT */
if(SCU_INIT_PNSSET4_VAL & BIT18) NVIC->ITNS[1] |= BIT28; /* Int of SC2_INT */
if(SCU_INIT_PNSSET5_VAL & BIT0 ) NVIC->ITNS[1] |= BIT24; /* Int of CAN0_INT */
if(SCU_INIT_PNSSET5_VAL & BIT16) NVIC->ITNS[2] |= BIT20; /* Int of QEI0_INT */
if(SCU_INIT_PNSSET5_VAL & BIT17) NVIC->ITNS[2] |= BIT21; /* Int of QEI1_INT */
if(SCU_INIT_PNSSET5_VAL & BIT20) NVIC->ITNS[2] |= BIT22; /* Int of ECAP0_INT */
if(SCU_INIT_PNSSET5_VAL & BIT21) NVIC->ITNS[2] |= BIT23; /* Int of ECAP1_INT */
if(SCU_INIT_PNSSET5_VAL & BIT25) NVIC->ITNS[3] |= BIT5 ; /* Int of TRNG_INT */
if(SCU_INIT_PNSSET5_VAL & BIT27) NVIC->ITNS[3] |= BIT4 ; /* Int of LCD_INT */
if(SCU_INIT_PNSSET5_VAL & BIT29) NVIC->ITNS[3] |= BIT14; /* Int of TAMPER_INT */
if(SCU_INIT_PNSSET6_VAL & BIT0 ) NVIC->ITNS[1] |= BIT21; /* Int of USBD_INT */
if(SCU_INIT_PNSSET6_VAL & BIT16) NVIC->ITNS[2] |= BIT12; /* Int of USCI0_INT */
if(SCU_INIT_PNSSET6_VAL & BIT17) NVIC->ITNS[2] |= BIT13; /* Int of USCI1_INT */
if(SCU_INIT_IONSSET_VAL & BIT0 ) NVIC->ITNS[0] |= BIT16; /* Int of PA */
if(SCU_INIT_IONSSET_VAL & BIT1 ) NVIC->ITNS[0] |= BIT17; /* Int of PB */
if(SCU_INIT_IONSSET_VAL & BIT2 ) NVIC->ITNS[0] |= BIT18; /* Int of PC */
if(SCU_INIT_IONSSET_VAL & BIT3 ) NVIC->ITNS[0] |= BIT19; /* Int of PD */
if(SCU_INIT_IONSSET_VAL & BIT4 ) NVIC->ITNS[0] |= BIT20; /* Int of PE */
if(SCU_INIT_IONSSET_VAL & BIT5 ) NVIC->ITNS[0] |= BIT21; /* Int of PF */
if(SCU_INIT_IONSSET_VAL & BIT6 ) NVIC->ITNS[2] |= BIT8 ; /* Int of PG */
if(SCU_INIT_IONSSET_VAL & BIT7 ) NVIC->ITNS[2] |= BIT24; /* Int of PH */
/* Enable SCU Int status */
SCU->SVIOIEN = (uint32_t)-1;
NVIC_EnableIRQ(SCU_IRQn);
}
#if defined( __ICCARM__ )
__WEAK
#else
__attribute__((weak))
#endif
void SCU_IRQHandler(void)
{
char const *master[] = {"CPU", 0, 0, "PDMA0", "SDH0", "CRPT", "USBH", 0,0,0,0,"PDMA1"};
char const *ipname[] = {"APB0","APB1",0,0,"GPIO","EBI","USBH","CRC","SDH0",0,"PDMA0","PDMA1"
,"SRAM0","SRAM1","FMC","FLASH","SCU","SYS","CRPT"};
const uint8_t info[] = {0x34,0x3C,0,0, 0x44,0x4C,0x54,0x5C,0x64,0,0x74,0x7C,0x84,0x8C,0x94,0x9C,0xA4,0xAC,0xB4};
uint32_t u32Reg, u32Addr;
uint32_t i;
/* TrustZone access policy */
u32Reg = SCU->SVINTSTS;
if(u32Reg)
{
/* Get violation address and source */
for(i=0;i< sizeof(ipname);i++)
{
if(u32Reg & (1 << i))
{
u32Addr = M32(SCU_BASE+info[i]+4);
printf(" %s(0x%08x) Alarm! illegal access by %s\n",ipname[i], u32Addr,master[M32(SCU_BASE+info[i])]);
SCU->SVINTSTS = (1 << i);
break;
}
}
}
}
/**
\brief Setup a Nonsecure callable Region
\details The base and limit of Nonsecure callable region is dependent on the
application code size.
*/
void NSC_Init(void)
{
uint32_t u32Region;
uint32_t u32Base, u32Limit;
#if defined (__ICCARM__)
# pragma section = "NSC"
u32Base = (uint32_t)__section_begin("NSC");
u32Limit = (uint32_t)__section_end("NSC");
#elif defined(__ARMCC_VERSION)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
extern uint32_t Image$$NSC_ROM$$XO$$Base[];
extern uint32_t Image$$NSC_ROM$$XO$$Limit[];
u32Base = (uint32_t)Image$$NSC_ROM$$XO$$Base;
u32Limit = (uint32_t)Image$$NSC_ROM$$XO$$Limit;
#pragma clang diagnostic pop
#else
extern uint32_t __start_NSC[];
extern uint32_t __end_NSC[];
u32Base = (uint32_t)__start_NSC;
u32Limit = (uint32_t)__end_NSC;
#endif
/* SAU region 3 is dedicated for NSC */
u32Region = 3;
SAU->RNR = (u32Region & SAU_RNR_REGION_Msk);
SAU->RBAR = (u32Base & SAU_RBAR_BADDR_Msk);
SAU->RLAR = ((u32Limit-1) & SAU_RLAR_LADDR_Msk) |
((1ul << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1ul;
}
/**
\brief Setup a SAU Region
\details Writes the region information contained in SAU_Region to the
registers SAU_RNR, SAU_RBAR, and SAU_RLAR
*/
void TZ_SAU_Setup(void)
{
#if defined (__SAU_PRESENT) && (__SAU_PRESENT == 1U)
#if defined (SAU_INIT_REGION0) && (SAU_INIT_REGION0 == 1U)
SAU_INIT_REGION(0);
#endif
#if defined (SAU_INIT_REGION1) && (SAU_INIT_REGION1 == 1U)
SAU_INIT_REGION(1);
#endif
#if defined (SAU_INIT_REGION2) && (SAU_INIT_REGION2 == 1U)
SAU_INIT_REGION(2);
#endif
#if defined (SAU_INIT_REGION3) && (SAU_INIT_REGION3 == 1U)
SAU_INIT_REGION(3);
#endif
#if defined (SAU_INIT_REGION4) && (SAU_INIT_REGION4 == 1U)
SAU_INIT_REGION(4);
#endif
#if defined (SAU_INIT_REGION5) && (SAU_INIT_REGION5 == 1U)
SAU_INIT_REGION(5);
#endif
#if defined (SAU_INIT_REGION6) && (SAU_INIT_REGION6 == 1U)
SAU_INIT_REGION(6);
#endif
#if defined (SAU_INIT_REGION7) && (SAU_INIT_REGION7 == 1U)
SAU_INIT_REGION(7);
#endif
/* repeat this for all possible SAU regions */
#if defined (SAU_INIT_CTRL) && (SAU_INIT_CTRL == 1U)
SAU->CTRL = ((SAU_INIT_CTRL_ENABLE << SAU_CTRL_ENABLE_Pos) & SAU_CTRL_ENABLE_Msk) |
((SAU_INIT_CTRL_ALLNS << SAU_CTRL_ALLNS_Pos) & SAU_CTRL_ALLNS_Msk) ;
#endif
#endif /* defined (__SAU_PRESENT) && (__SAU_PRESENT == 1U) */
#if defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U)
SCB->SCR = (SCB->SCR & ~(SCB_SCR_SLEEPDEEPS_Msk)) |
((SCB_CSR_DEEPSLEEPS_VAL << SCB_SCR_SLEEPDEEPS_Pos) & SCB_SCR_SLEEPDEEPS_Msk);
SCB->AIRCR = (0x05FA << 16) |
((SCB_AIRCR_SYSRESETREQS_VAL << SCB_AIRCR_SYSRESETREQS_Pos) & SCB_AIRCR_SYSRESETREQS_Msk) |
((SCB_AIRCR_BFHFNMINS_VAL << SCB_AIRCR_BFHFNMINS_Pos) & SCB_AIRCR_BFHFNMINS_Msk) |
((SCB_AIRCR_PRIS_VAL << SCB_AIRCR_PRIS_Pos) & SCB_AIRCR_PRIS_Msk);
#endif /* defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U) */
#if defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U)
SCB->ICSR = (SCB->ICSR & ~(SCB_ICSR_STTNS_Msk)) |
((SCB_ICSR_STTNS_VAL << SCB_ICSR_STTNS_Pos) & SCB_ICSR_STTNS_Msk);
#endif /* defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U) */
/* repeat this for all possible ITNS elements */
/* Initial Nonsecure callable region */
NSC_Init();
}
#else
void SCU_IRQHandler(void)
{
while(1);
}
#endif
/**
* @brief Update the Variable SystemCoreClock
*
* @param None
*
* @return None
*
* @details This function is used to update the variable SystemCoreClock
* and must be called whenever the core clock is changed.
*/
void SystemCoreClockUpdate(void)
{
/* Update PLL Clock */
PllClock = CLK_GetPLLClockFreq();
/* Update System Core Clock */
SystemCoreClock = CLK_GetCPUFreq();
/* Update Cycles per micro second */
CyclesPerUs = (SystemCoreClock + 500000UL) / 1000000UL;
}
/**
* @brief System Initialization
*
* @param None
*
* @return None
*
* @details The necessary initialization of system. Global variables are forbidden here.
*/
void SystemInit(void)
{
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
SCB->VTOR = (uint32_t) &__Vectors;
#endif
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)
TZ_SAU_Setup();
SCU_Setup();
FMC_NSBA_Setup();
#endif
#ifdef INIT_SYSCLK_AT_BOOTING
#endif
}
#if USE_ASSERT
/**
* @brief Assert Error Message
*
* @param[in] file the source file name
* @param[in] line line number
*
* @return None
*
* @details The function prints the source file name and line number where
* the ASSERT_PARAM() error occurs, and then stops in an infinite loop.
*/
void AssertError(uint8_t * file, uint32_t line)
{
printf("[%s] line %d : wrong parameters.\r\n", file, line);
/* Infinite loop */
while(1) ;
}
#endif
#if (defined(__ICCARM__) && (__VER__ >= 7080000) && (__VER__ < 8020000))
#if (__ARM_FEATURE_CMSE == 3U)
/**
\brief Get Process Stack Pointer (non-secure)
\details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state.
\return PSP Register value
*/
uint32_t __TZ_get_PSP_NS(void)
{
register uint32_t result;
__ASM volatile("MRS %0, psp_ns" : "=r"(result));
return(result);
}
/**
\brief Set Process Stack Pointer (non-secure)
\details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state.
\param [in] topOfProcStack Process Stack Pointer value to set
*/
void __TZ_set_PSP_NS(uint32_t topOfProcStack)
{
__ASM volatile("MSR psp_ns, %0" : : "r"(topOfProcStack));
}
/**
\brief Get Main Stack Pointer (non-secure)
\details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state.
\return MSP Register value
*/
int32_t __TZ_get_MSP_NS(void)
{
register uint32_t result;
__ASM volatile("MRS %0, msp_ns" : "=r"(result));
return(result);
}
/**
\brief Set Main Stack Pointer (non-secure)
\details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state.
\param [in] topOfMainStack Main Stack Pointer value to set
*/
void __TZ_set_MSP_NS(uint32_t topOfMainStack)
{
__ASM volatile("MSR msp_ns, %0" : : "r"(topOfMainStack));
}
/**
\brief Get Priority Mask (non-secure)
\details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state.
\return Priority Mask value
*/
uint32_t __TZ_get_PRIMASK_NS(void)
{
uint32_t result;
__ASM volatile("MRS %0, primask_ns" : "=r"(result));
return(result);
}
/**
\brief Set Priority Mask (non-secure)
\details Assigns the given value to the non-secure Priority Mask Register when in secure state.
\param [in] priMask Priority Mask
*/
void __TZ_set_PRIMASK_NS(uint32_t priMask)
{
__ASM volatile("MSR primask_ns, %0" : : "r"(priMask) : "memory");
}
#endif
#endif
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::Network
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: Net_Config.c
* Purpose: Network Configuration
* Rev.: V7.1.0
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>Network System Settings
// <i>Global Network System definitions
// <s.15>Local Host Name
// <i>This is the name under which embedded host can be
// <i>accessed on a local area network.
// <i>Default: "my_host"
#define NET_HOST_NAME "my_host"
// <o>Memory Pool Size <1536-262144:4>
// <i>This is the size of a memory pool in bytes. Buffers for
// <i>network packets are allocated from this memory pool.
// <i>Default: 12000 bytes
#define NET_MEM_POOL_SIZE 12000
// <q>Start System Services
// <i>If enabled, the system will automatically start server services
// <i>(HTTP, FTP, TFTP server, ...) when initializing the network system.
// <i>Default: Enabled
#define NET_START_SERVICE 1
// <h>OS Resource Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <512-65535:4>
// <i>Default: 1024 bytes
#define NET_THREAD_STACK_SIZE 1024
// Core Thread Priority
#define NET_THREAD_PRIORITY osPriorityNormal
// </h>
// </h>
//------------- <<< end of configuration section >>> ---------------------------
#include "RTE_Components.h"
#ifdef RTE_Network_Interface_ETH_0
#include "Net_Config_ETH_0.h"
#endif
#ifdef RTE_Network_Interface_ETH_1
#include "Net_Config_ETH_1.h"
#endif
#ifdef RTE_Network_Interface_WiFi_0
#include "Net_Config_WiFi_0.h"
#endif
#ifdef RTE_Network_Interface_WiFi_1
#include "Net_Config_WiFi_1.h"
#endif
#ifdef RTE_Network_Interface_PPP
#include "Net_Config_PPP.h"
#endif
#ifdef RTE_Network_Interface_SLIP
#include "Net_Config_SLIP.h"
#endif
#ifdef RTE_Network_Socket_UDP
#include "Net_Config_UDP.h"
#endif
#ifdef RTE_Network_Socket_TCP
#include "Net_Config_TCP.h"
#endif
#ifdef RTE_Network_Socket_BSD
#include "Net_Config_BSD.h"
#endif
#ifdef RTE_Network_Web_Server_RO
#include "Net_Config_HTTP_Server.h"
#endif
#ifdef RTE_Network_Web_Server_FS
#include "Net_Config_HTTP_Server.h"
#endif
#ifdef RTE_Network_Telnet_Server
#include "Net_Config_Telnet_Server.h"
#endif
#ifdef RTE_Network_TFTP_Server
#include "Net_Config_TFTP_Server.h"
#endif
#ifdef RTE_Network_TFTP_Client
#include "Net_Config_TFTP_Client.h"
#endif
#ifdef RTE_Network_FTP_Server
#include "Net_Config_FTP_Server.h"
#endif
#ifdef RTE_Network_FTP_Client
#include "Net_Config_FTP_Client.h"
#endif
#ifdef RTE_Network_DNS_Client
#include "Net_Config_DNS_Client.h"
#endif
#ifdef RTE_Network_SMTP_Client
#include "Net_Config_SMTP_Client.h"
#endif
#ifdef RTE_Network_SNMP_Agent
#include "Net_Config_SNMP_Agent.h"
#endif
#ifdef RTE_Network_SNTP_Client
#include "Net_Config_SNTP_Client.h"
#endif
#include "net_config.h"
/**
\addtogroup net_genFunc
@{
*/
/**
\fn void net_sys_error (NET_ERROR error)
\ingroup net_cores
\brief Network system error handler.
*/
void net_sys_error (NET_ERROR error) {
/* This function is called when a fatal error is encountered. */
/* The normal program execution is not possible anymore. */
switch (error) {
case NET_ERROR_MEM_ALLOC:
/* Out of memory */
break;
case NET_ERROR_MEM_FREE:
/* Trying to release non existing memory block */
break;
case NET_ERROR_MEM_CORRUPT:
/* Memory Link pointer corrupted */
/* More data written than the size of allocated memory block */
break;
case NET_ERROR_CONFIG:
/* Network configuration error detected */
break;
case NET_ERROR_UDP_ALLOC:
/* Out of UDP Sockets */
break;
case NET_ERROR_TCP_ALLOC:
/* Out of TCP Sockets */
break;
case NET_ERROR_TCP_STATE:
/* TCP State machine in undefined state */
break;
}
/* End-less loop */
while (1);
}
/**
@}
*/
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::Network:Socket
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: Net_Config_TCP.h
* Purpose: Network Configuration for TCP Sockets
* Rev.: V7.1.1
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>TCP Sockets
#define TCP_ENABLE 1
// <o>Number of TCP Sockets <1-20>
// <i>Number of available TCP sockets
// <i>Default: 6
#define TCP_NUM_SOCKS 6
// <o>Number of Retries <0-20>
// <i>How many times TCP module will try to retransmit data
// <i>before giving up. Increase this value for high-latency
// <i>and low throughput networks.
// <i>Default: 5
#define TCP_MAX_RETRY 5
// <o>Retry Timeout in seconds <1-10>
// <i>If data frame not acknowledged within this time frame,
// <i>TCP module will try to resend the data again.
// <i>Default: 4
#define TCP_RETRY_TOUT 4
// <o>Default Connect Timeout in seconds <1-65535>
// <i>If no TCP data frame has been exchanged during this time,
// <i>the TCP connection is either closed or a keep-alive frame
// <i>is sent to verify that the connection still exists.
// <i>Default: 120
#define TCP_DEFAULT_TOUT 120
// <o>Maximum Segment Size <536-1440>
// <i>The Maximum Segment Size specifies the maximum
// <i>number of bytes in the TCP segment's Data field.
// <i>Default: 1440
#define TCP_MAX_SEG_SIZE 1440
// <o>Receive Window Size <536-65535>
// <i>Receive Window Size specifies the size of data,
// <i>that the socket is able to buffer in flow-control mode.
// <i>Default: 4320
#define TCP_RECEIVE_WIN_SIZE 4320
// </h>
// TCP Initial Retransmit period in seconds
#define TCP_INITIAL_RETRY_TOUT 1
// TCP SYN frame retransmit period in seconds
#define TCP_SYN_RETRY_TOUT 2
// Number of retries to establish a connection
#define TCP_CONNECT_RETRY 7
// Dynamic port start (default 49152)
#define TCP_DYN_PORT_START 49152
// Dynamic port end (default 65535)
#define TCP_DYN_PORT_END 65535
//------------- <<< end of configuration section >>> ---------------------------
/*
* Configuration template
*
* Copyright (C) 2006-2021, Arm Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* This set of compile-time options may be used to enable
* or disable features selectively, and reduce the global
* memory footprint.
*/
#ifndef MBEDTLS_CONFIG_H
#define MBEDTLS_CONFIG_H
/* System support */
//#define MBEDTLS_HAVE_ASM
//#define MBEDTLS_HAVE_TIME
//#define MBEDTLS_HAVE_TIME_DATE
//#define MBEDTLS_PLATFORM_MEMORY
//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
//#define MBEDTLS_CHECK_PARAMS
/* mbed TLS feature support */
//#define MBEDTLS_AES_ROM_TABLES
//#define MBEDTLS_AES_FEWER_TABLES
//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
//#define MBEDTLS_CIPHER_MODE_CBC
//#define MBEDTLS_CIPHER_MODE_CFB
//#define MBEDTLS_CIPHER_MODE_CTR
//#define MBEDTLS_CIPHER_MODE_OFB
//#define MBEDTLS_CIPHER_MODE_XTS
//#define MBEDTLS_CIPHER_PADDING_PKCS7
//#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
//#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
//#define MBEDTLS_CIPHER_PADDING_ZEROS
//#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
//#define MBEDTLS_REMOVE_3DES_CIPHERSUITES
//#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
//#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
//#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
//#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
//#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
//#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
//#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
//#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
//#define MBEDTLS_ECP_DP_BP256R1_ENABLED
//#define MBEDTLS_ECP_DP_BP384R1_ENABLED
//#define MBEDTLS_ECP_DP_BP512R1_ENABLED
//#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
//#define MBEDTLS_ECP_DP_CURVE448_ENABLED
//#define MBEDTLS_ECP_NIST_OPTIM
//#define MBEDTLS_ECP_RESTARTABLE
//#define MBEDTLS_ECDSA_DETERMINISTIC
//#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
//#define MBEDTLS_PK_PARSE_EC_EXTENDED
//#define MBEDTLS_ERROR_STRERROR_DUMMY
//#define MBEDTLS_GENPRIME
//#define MBEDTLS_FS_IO
//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
//#define MBEDTLS_NO_PLATFORM_ENTROPY
//#define MBEDTLS_ENTROPY_FORCE_SHA256
//#define MBEDTLS_ENTROPY_NV_SEED
//#define MBEDTLS_MEMORY_DEBUG
//#define MBEDTLS_MEMORY_BACKTRACE
//#define MBEDTLS_PK_RSA_ALT_SUPPORT
//#define MBEDTLS_PKCS1_V15
//#define MBEDTLS_PKCS1_V21
//#define MBEDTLS_PSA_CRYPTO_SPM
//#define MBEDTLS_RSA_NO_CRT
//#define MBEDTLS_SELF_TEST
//#define MBEDTLS_SHA256_SMALLER
//#define MBEDTLS_SHA512_SMALLER
//#define MBEDTLS_SHA512_NO_SHA384
//#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
//#define MBEDTLS_SSL_RECORD_CHECKING
//#define MBEDTLS_SSL_DTLS_CONNECTION_ID
//#define MBEDTLS_SSL_ASYNC_PRIVATE
//#define MBEDTLS_SSL_CONTEXT_SERIALIZATION
//#define MBEDTLS_SSL_DEBUG_ALL
//#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
//#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
//#define MBEDTLS_SSL_FALLBACK_SCSV
//#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
//#define MBEDTLS_SSL_HW_RECORD_ACCEL
//#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
//#define MBEDTLS_SSL_RENEGOTIATION
//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
//#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
//#define MBEDTLS_SSL_PROTO_SSL3
//#define MBEDTLS_SSL_PROTO_TLS1
//#define MBEDTLS_SSL_PROTO_TLS1_1
//#define MBEDTLS_SSL_PROTO_TLS1_2
//#define MBEDTLS_SSL_PROTO_DTLS
//#define MBEDTLS_SSL_ALPN
//#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
//#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
//#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
//#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
//#define MBEDTLS_SSL_SESSION_TICKETS
//#define MBEDTLS_SSL_EXPORT_KEYS
//#define MBEDTLS_SSL_SERVER_NAME_INDICATION
//#define MBEDTLS_SSL_TRUNCATED_HMAC
//#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
//#define MBEDTLS_USE_PSA_CRYPTO
//#define MBEDTLS_VERSION_FEATURES
//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
//#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
//#define MBEDTLS_X509_CHECK_KEY_USAGE
//#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
//#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
//#define MBEDTLS_ZLIB_SUPPORT
/* mbed TLS modules */
//#define MBEDTLS_AES_C
//#define MBEDTLS_ARC4_C
//#define MBEDTLS_ASN1_PARSE_C
//#define MBEDTLS_ASN1_WRITE_C
//#define MBEDTLS_BASE64_C
//#define MBEDTLS_BIGNUM_C
//#define MBEDTLS_BLOWFISH_C
//#define MBEDTLS_CAMELLIA_C
//#define MBEDTLS_ARIA_C
//#define MBEDTLS_CCM_C
//#define MBEDTLS_CERTS_C
//#define MBEDTLS_CHACHA20_C
//#define MBEDTLS_CHACHAPOLY_C
//#define MBEDTLS_CIPHER_C
//#define MBEDTLS_CMAC_C
//#define MBEDTLS_CTR_DRBG_C
//#define MBEDTLS_DEBUG_C
//#define MBEDTLS_DES_C
//#define MBEDTLS_DHM_C
//#define MBEDTLS_ECDH_C
//#define MBEDTLS_ECDSA_C
//#define MBEDTLS_ECJPAKE_C
//#define MBEDTLS_ECP_C
//#define MBEDTLS_ENTROPY_C
//#define MBEDTLS_ERROR_C
//#define MBEDTLS_GCM_C
//#define MBEDTLS_HAVEGE_C
//#define MBEDTLS_HKDF_C
//#define MBEDTLS_HMAC_DRBG_C
//#define MBEDTLS_NIST_KW_C
//#define MBEDTLS_MD_C
//#define MBEDTLS_MD2_C
//#define MBEDTLS_MD4_C
//#define MBEDTLS_MD5_C
//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
//#define MBEDTLS_NET_C
//#define MBEDTLS_OID_C
//#define MBEDTLS_PEM_PARSE_C
//#define MBEDTLS_PEM_WRITE_C
//#define MBEDTLS_PK_C
//#define MBEDTLS_PK_PARSE_C
//#define MBEDTLS_PK_WRITE_C
//#define MBEDTLS_PKCS5_C
//#define MBEDTLS_PKCS11_C
//#define MBEDTLS_PKCS12_C
//#define MBEDTLS_PLATFORM_C
//#define MBEDTLS_POLY1305_C
//#define MBEDTLS_PSA_CRYPTO_C
//#define MBEDTLS_PSA_CRYPTO_SE_C
//#define MBEDTLS_PSA_CRYPTO_STORAGE_C
//#define MBEDTLS_PSA_ITS_FILE_C
//#define MBEDTLS_RIPEMD160_C
//#define MBEDTLS_RSA_C
//#define MBEDTLS_SHA1_C
//#define MBEDTLS_SHA256_C
//#define MBEDTLS_SHA512_C
//#define MBEDTLS_SSL_CACHE_C
//#define MBEDTLS_SSL_COOKIE_C
//#define MBEDTLS_SSL_TICKET_C
//#define MBEDTLS_SSL_CLI_C
//#define MBEDTLS_SSL_SRV_C
//#define MBEDTLS_SSL_TLS_C
//#define MBEDTLS_THREADING_C
//#define MBEDTLS_TIMING_C
//#define MBEDTLS_VERSION_C
//#define MBEDTLS_X509_USE_C
//#define MBEDTLS_X509_CRT_PARSE_C
//#define MBEDTLS_X509_CRL_PARSE_C
//#define MBEDTLS_X509_CSR_PARSE_C
//#define MBEDTLS_X509_CREATE_C
//#define MBEDTLS_X509_CRT_WRITE_C
//#define MBEDTLS_X509_CSR_WRITE_C
//#define MBEDTLS_XTEA_C
#include "mbedtls/check_config.h"
#endif /* MBEDTLS_CONFIG_H */
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'NonSecure'
* Target: 'NonSecure'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "M2351.h"
/* ARM::PSA:Crypto:mbed TLS:2.24.0 */
#define RTE_PSA_API_CRYPTO
#endif /* RTE_COMPONENTS_H */
/******************************************************************************
**************************Hardware interface layer*****************************
* | file : DEV_Config.c
* | version : V1.0
* | date : 2017-08-14
* | function :
Provide the hardware underlying interface
******************************************************************************/
#include "DEV_Config.h"
//#include "stm32f1xx_hal_i2c.h"
//#include "i2c.h"
//#include "stm32f1xx_hal_spi.h"
//#include "spi.h"
//#include "usart.h"
#include <stdio.h> //printf()
#include <string.h>
#include <stdlib.h>
/********************************************************************************
function: System Init
note:
Initialize the communication method
********************************************************************************/
uint8_t System_Init(void)
{
#if USE_SPI_4W
//printf("USE 4wire spi\r\n");
#elif USE_IIC
printf("USE i2c\r\n");
//DC = 1 => addrdess = 0X3D
//DC = 0 => addrdess = 0X3C
OLED_DC_1;
#endif
return 0;
}
void System_Exit(void)
{
}
/********************************************************************************
function: Hardware interface
note:
SPI4W_Write_Byte(value) :
HAL library hardware SPI
Register hardware SPI
Gpio analog SPI
I2C_Write_Byte(value, cmd):
HAL library hardware I2C
********************************************************************************/
void SPI4W_Write_Byte(uint8_t value)
{
SPI_WRITE_TX(SPI1_NS, value);
while (SPI_IS_BUSY(SPI1_NS));
//printf("[RX] : %d\t [TX] : %d(%#x) \n", SPI_READ_RX(SPI0), value, value);
}
/********************************************************************************
function: Delay function
note:
Driver_Delay_ms(xms) : Delay x ms
Driver_Delay_us(xus) : Delay x us
********************************************************************************/
void Driver_Delay_ms(uint32_t xms)
{
CLK_SysTickDelay(xms * 1000);
}
void Driver_Delay_us(uint32_t xus)
{
int j;
for(j=xus; j > 0; j--);
}
/******************************************************************************
**************************Hardware interface layer*****************************
* | file : DEV_Config.h
* | version : V1.0
* | date : 2017-08-14
* | function :
Provide the hardware underlying interface
******************************************************************************/
#ifndef _DEV_CONFIG_H_
#define _DEV_CONFIG_H_
//#include "stm32f1xx_hal.h"
//#include "stm32f1xx_hal_gpio.h"
//#include "main.h"
#include <stdint.h>
#include "NuMicro.h"
#define USE_SPI_4W 1
#define USE_IIC 0
#define IIC_CMD 0X00
#define IIC_RAM 0X40
//#define SPI0_SCK PD2_NS
//#define SPI0_SCK_GPIO_Port GPIOD
//#define SPI0_MISO PD1_NS
//#define SPI0_MISO_GPIO_Port GPIOD
//#define SPI0_MOSI PD0_NS
//#define SPI0_MOSI_GPIO_Port GPIOD
#define OLED_DC PC11_NS
#define OLED_DC_GPIO_Port GPIOC
#define OLED_RST PC12_NS
#define OLED_RST_GPIO_Port GPIOC
#define OLED_CS PH9_NS
#define OLED_CS_GPIO_Port GPIOH
/*
#define I2C1_SCL_Pin GPIO_PIN_8
#define I2C1_SCL_GPIO_Port GPIOB
#define I2C1_SDA_Pin GPIO_PIN_9
#define I2C1_SDA_GPIO_Port GPIOB
//OLED GPIO
#define OLED_CS_0 HAL_GPIO_WritePin(OLED_CS_GPIO_Port, OLED_CS_Pin, GPIO_PIN_RESET)
#define OLED_CS_1 HAL_GPIO_WritePin(OLED_CS_GPIO_Port, OLED_CS_Pin, GPIO_PIN_SET)
#define OLED_DC_0 HAL_GPIO_WritePin(OLED_DC_GPIO_Port, OLED_DC_Pin, GPIO_PIN_RESET)
#define OLED_DC_1 HAL_GPIO_WritePin(OLED_DC_GPIO_Port, OLED_DC_Pin, GPIO_PIN_SET)
#define OLED_RST_0 HAL_GPIO_WritePin(OLED_RST_GPIO_Port, OLED_RST_Pin, GPIO_PIN_RESET)
#define OLED_RST_1 HAL_GPIO_WritePin(OLED_RST_GPIO_Port, OLED_RST_Pin, GPIO_PIN_SET)
//SPI GPIO
#define SPI1_SCK_0 HAL_GPIO_WritePin(SPI1_SCK_GPIO_Port, SPI1_SCK_Pin, GPIO_PIN_RESET)
#define SPI1_SCK_1 HAL_GPIO_WritePin(SPI1_SCK_GPIO_Port, SPI1_SCK_Pin, GPIO_PIN_SET)
#define SPI1_MOSI_0 HAL_GPIO_WritePin(SPI1_MOSI_GPIO_Port, SPI1_MOSI_Pin, GPIO_PIN_RESET)
#define SPI1_MOSI_1 HAL_GPIO_WritePin(SPI1_MOSI_GPIO_Port, SPI1_MOSI_Pin, GPIO_PIN_SET)
*/
/*------------------------------------------------------------------------------------------------------*/
uint8_t System_Init(void);
void System_Exit(void);
void SPI4W_Write_Byte(uint8_t value);
//void I2C_Write_Byte(uint8_t value, uint8_t Cmd);
void Driver_Delay_ms(uint32_t xms);
void Driver_Delay_us(uint32_t xus);
#endif
/******************************************************************************
***************************Intermediate driver layer***************************
* | file : OLED_Driver.c
* | version : V1.0
* | date : 2017-11-09
* | function : SSD1327 Drive function
note:
Image scanning:
Please use progressive scanning to generate images or fonts
******************************************************************************/
#include "OLED_Driver.h"
#include <stdio.h>
COLOR Buffer[OLED_WIDTH / 2 * OLED_HEIGHT];
OLED_DIS sOLED_DIS;
/*******************************************************************************
function:
Hardware reset
*******************************************************************************/
static void OLED_Reset(void)
{
OLED_RST = 1;
//PC12 = 1;
Driver_Delay_ms(100);
OLED_RST = 0;
//PC12 = 0;
Driver_Delay_ms(100);
OLED_RST = 1;
//PC12 = 1;
Driver_Delay_ms(100);
}
/*******************************************************************************
function:
Write register address and data
*******************************************************************************/
void OLED_WriteReg(uint8_t Reg)
{
#if USE_SPI_4W
OLED_DC = 0;
OLED_CS = 0;
SPI4W_Write_Byte(Reg);
OLED_CS = 1;
#elif USE_IIC
I2C_Write_Byte(Reg,IIC_CMD);
#endif
}
void OLED_WriteData(uint8_t Data)
{
#if USE_SPI_4W
OLED_DC = 1;
OLED_CS = 0;
SPI4W_Write_Byte(Data);
OLED_CS = 1;
#elif USE_IIC
I2C_Write_Byte(Data,IIC_RAM);
#endif
}
/*******************************************************************************
function:
Common register initialization
*******************************************************************************/
static void OLED_InitReg(void)
{
OLED_WriteReg(0xae);//--turn off oled panel
OLED_WriteReg(0x15); // set column address
OLED_WriteReg(0x00); // start column 0
OLED_WriteReg(0x7f); // end column 127
OLED_WriteReg(0x75); // set row address
OLED_WriteReg(0x00); // start row 0
OLED_WriteReg(0x7f); // end row 127
OLED_WriteReg(0x81); // set contrast control
OLED_WriteReg(0x80);
OLED_WriteReg(0xa0); // gment remap
OLED_WriteReg(0x51); //51
OLED_WriteReg(0xa1); // start line
OLED_WriteReg(0x00);
OLED_WriteReg(0xa2); // display offset
OLED_WriteReg(0x00);
OLED_WriteReg(0xa4); // rmal display
OLED_WriteReg(0xa8); // set multiplex ratio
OLED_WriteReg(0x7f);
OLED_WriteReg(0xb1); // set phase leghth
OLED_WriteReg(0xf1);
OLED_WriteReg(0xb3); // set dclk
OLED_WriteReg(0x00); //80Hz:0xc1 90Hz:0xe1 100Hz:0x00 110Hz:0x30 120Hz:0x50 130Hz:0x70 01
OLED_WriteReg(0xab); //
OLED_WriteReg(0x01); //
OLED_WriteReg(0xb6); // set phase leghth
OLED_WriteReg(0x0f);
OLED_WriteReg(0xbe);
OLED_WriteReg(0x0f);
OLED_WriteReg(0xbc);
OLED_WriteReg(0x08);
OLED_WriteReg(0xd5);
OLED_WriteReg(0x62);
OLED_WriteReg(0xfd);
OLED_WriteReg(0x12);
}
/********************************************************************************
function: Set the display scan and color transfer modes
parameter:
Scan_dir : Scan direction
Colorchose : RGB or GBR color format
********************************************************************************/
void OLED_SetGramScanWay(OLED_SCAN_DIR Scan_dir)
{
//Get the screen scan direction
sOLED_DIS.OLED_Scan_Dir = Scan_dir;
//Get GRAM and OLED width and height
if(Scan_dir == L2R_U2D || Scan_dir == L2R_D2U || Scan_dir == R2L_U2D || Scan_dir == R2L_D2U) {
sOLED_DIS.OLED_Dis_Column = OLED_WIDTH;
sOLED_DIS.OLED_Dis_Page = OLED_HEIGHT;
sOLED_DIS.OLED_X_Adjust = OLED_X;
sOLED_DIS.OLED_Y_Adjust = OLED_Y;
} else {
sOLED_DIS.OLED_Dis_Column = OLED_HEIGHT;
sOLED_DIS.OLED_Dis_Page = OLED_WIDTH;
sOLED_DIS.OLED_X_Adjust = OLED_Y;
sOLED_DIS.OLED_Y_Adjust = OLED_X;
}
}
/********************************************************************************
function:
initialization
********************************************************************************/
void OLED_Init(OLED_SCAN_DIR OLED_ScanDir)
{
//Hardware reset
OLED_Reset();
//Set the initialization register
OLED_InitReg();
//Set the display scan and color transfer modes
OLED_SetGramScanWay(OLED_ScanDir);
Driver_Delay_ms(200);
//Turn on the OLED display
OLED_WriteReg(0xAF);
}
/********************************************************************************
function: Set the display point(Xpoint, Ypoint)
parameter:
xStart : X direction Start coordinates
xEnd : X direction end coordinates
********************************************************************************/
void OLED_SetCursor(POINT Xpoint, POINT Ypoint)
{
if((Xpoint > sOLED_DIS.OLED_Dis_Column) || (Ypoint > sOLED_DIS.OLED_Dis_Page))
return;
OLED_WriteReg(0x15);
OLED_WriteReg(Xpoint);
OLED_WriteReg(Xpoint);
OLED_WriteReg(0x75);
OLED_WriteReg(Ypoint);
OLED_WriteReg(Ypoint);
}
/********************************************************************************
function: Set the display Window(Xstart, Ystart, Xend, Yend)
parameter:
xStart : X direction Start coordinates
Ystart : Y direction Start coordinates
Xend : X direction end coordinates
Yend : Y direction end coordinates
********************************************************************************/
void OLED_SetWindow(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend)
{
if((Xstart > sOLED_DIS.OLED_Dis_Column) || (Ystart > sOLED_DIS.OLED_Dis_Page) ||
(Xend > sOLED_DIS.OLED_Dis_Column) || (Yend > sOLED_DIS.OLED_Dis_Page))
return;
OLED_WriteReg(0x15);
OLED_WriteReg(Xstart);
OLED_WriteReg(Xend - 1);
OLED_WriteReg(0x75);
OLED_WriteReg(Ystart);
OLED_WriteReg(Yend - 1);
}
/********************************************************************************
function: Set show color
parameter:
Color : Set show color,16-bit depth
********************************************************************************/
//static void OLED_SetColor(LENGTH Dis_Width, LENGTH Dis_Height, COLOR Color ){
void OLED_SetColor(POINT Xpoint, POINT Ypoint, COLOR Color)
{
if(Xpoint > sOLED_DIS.OLED_Dis_Column || Ypoint > sOLED_DIS.OLED_Dis_Page) {
return;
}
//1 byte control two points
if(Xpoint % 2 == 0) {
Buffer[Xpoint / 2 + Ypoint * 64] = (Color << 4) | Buffer[Xpoint / 2 + Ypoint * 64];
} else {
Buffer[Xpoint / 2 + Ypoint * 64] = (Color & 0x0f) | Buffer[Xpoint / 2 + Ypoint * 64];
}
}
/********************************************************************************
function:
Clear screen
********************************************************************************/
void OLED_Clear(COLOR Color)
{
unsigned int i,m;
//OLED_SetWindow(0, 0, sOLED_DIS.OLED_Dis_Column, sOLED_DIS.OLED_Dis_Page);
for(i = 0; i < sOLED_DIS.OLED_Dis_Page; i++) {
for(m = 0; m < (sOLED_DIS.OLED_Dis_Column / 2); m++) {
Buffer[i * (sOLED_DIS.OLED_Dis_Column / 2) + m] = Color | (Color << 4);
}
}
}
/********************************************************************************
function: Update all memory to LCD
********************************************************************************/
void OLED_Display(void)
{
uint16_t page, Column;
COLOR *pBuf = (COLOR *)Buffer;
OLED_SetWindow(0, 0, sOLED_DIS.OLED_Dis_Column, sOLED_DIS.OLED_Dis_Page);
//write data
for (page = 0; page < sOLED_DIS.OLED_Dis_Page; page++) {
for(Column = 0; Column < sOLED_DIS.OLED_Dis_Column / 2; Column++ ) {
OLED_WriteData(*pBuf);
pBuf++;
}
}
}
/********************************************************************************
function:
Clear Window
********************************************************************************/
void OLED_ClearWindow(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend, COLOR Color)
{
uint16_t i,m, Xpoint, Ypoint;
Xpoint = (Xend - Xstart) / 2;
Ypoint = Yend - Ystart;
uint16_t Num = Xstart + Ystart * (sOLED_DIS.OLED_Dis_Column / 2);
for(i = 0; i < Ypoint; i++) {
for(m = 0; m < Xpoint; m++) {
Buffer[Num + m] = 0x00;
}
Num = Xstart + (Ystart + i + 1) * (sOLED_DIS.OLED_Dis_Column / 2);
}
}
/********************************************************************************
function: Update Window memory to LCD
********************************************************************************/
void OLED_DisWindow(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend)
{
uint16_t page, Column, Xpoint, Ypoint;
Xpoint = (Xend - Xstart) / 2;
Ypoint = Yend - Ystart;
OLED_SetWindow(Xstart, Ystart, Xend, Yend);
//write data
COLOR *pBuf = (COLOR *)Buffer + Xstart + Ystart * (sOLED_DIS.OLED_Dis_Column / 2);
for (page = 0; page < Ypoint; page++) {
for(Column = 0; Column < Xpoint; Column++ ) {
OLED_WriteData(*pBuf);
pBuf++;
}
pBuf = (COLOR *)Buffer + Xstart + (Ystart + page + 1) * (sOLED_DIS.OLED_Dis_Column / 2);
}
}
/******************************************************************************
***************************Intermediate driver layer***************************
* | file : OLED_Driver.h
* | version : V1.0
* | date : 2017-11-09
* | function : SSD1327 Drive function
note:
Image scanning:
Please use progressive scanning to generate images or fonts
******************************************************************************/
#ifndef __OLED_DRIVER_H
#define __OLED_DRIVER_H
#include <stdint.h>
#include "DEV_Config.h"
#define COLOR uint16_t //The variable type of the color (unsigned short)
#define POINT uint16_t //The type of coordinate (unsigned short)
#define LENGTH uint16_t //The type of coordinate (unsigned short)
/********************************************************************************
function:
Define the full screen height length of the display
********************************************************************************/
#define OLED_X_MAXPIXEL 128 //OLED width maximum memory
#define OLED_Y_MAXPIXEL 128 //OLED height maximum memory
#define OLED_X 0
#define OLED_Y 0
#define OLED_WIDTH (OLED_X_MAXPIXEL - 2 * OLED_X) //OLED width
#define OLED_HEIGHT OLED_Y_MAXPIXEL //OLED height
/********************************************************************************
function:
scanning method
********************************************************************************/
typedef enum{
L2R_U2D = 0, //The display interface is displayed , left to right, up to down
L2R_D2U ,
R2L_U2D ,
R2L_D2U ,
U2D_L2R ,
U2D_R2L ,
D2U_L2R ,
D2U_R2L ,
}OLED_SCAN_DIR;
#define SCAN_DIR_DFT L2R_U2D //Default scan direction = L2R_U2D
/********************************************************************************
function:
Defines the total number of rows in the display area
********************************************************************************/
typedef struct{
LENGTH OLED_Dis_Column; //COLUMN
LENGTH OLED_Dis_Page; //PAGE
OLED_SCAN_DIR OLED_Scan_Dir;
POINT OLED_X_Adjust; //OLED x actual display position calibration
POINT OLED_Y_Adjust; //OLED y actual display position calibration
}OLED_DIS;
/********************************************************************************
function:
Macro definition variable name
********************************************************************************/
void OLED_Init(OLED_SCAN_DIR OLED_ScanDir);
void OLED_SetGramScanWay(OLED_SCAN_DIR Scan_dir);
void OLED_WriteReg(uint8_t Reg);
void OLED_WriteData(uint8_t Data);
//OLED set cursor + windows + color
void OLED_SetCursor(POINT Xpoint, POINT Ypoint);
void OLED_SetColor(POINT Xpoint, POINT Ypoint, COLOR Color);
void OLED_SetWindow(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend);
void OLED_Clear(COLOR Color);
void OLED_Display(void);
void OLED_ClearWindow(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend, COLOR Color);
void OLED_DisWindow(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend);
#endif
/******************************************************************************
****************************Upper application layer****************************
* | file : OLED_GUI.c
* | version : V1.0
* | date : 2017-11-09
* | function :
Achieve drawing: draw points, lines, boxes, circles and their size,
solid dotted line, solid rectangle hollow rectangle,
solid circle hollow circle.
Achieve display characters: Display a single character, string, number
Achieve time display: adaptive size display time minutes and seconds
******************************************************************************/
#include <stdio.h>
#include "OLED_GUI.h"
extern OLED_DIS sOLED_DIS;
extern COLOR Buffer[OLED_WIDTH / 2 * OLED_HEIGHT];
/******************************************************************************
function: Coordinate conversion
******************************************************************************/
void GUI_Swop(POINT Point1, POINT Point2)
{
POINT Temp;
Temp = Point1;
Point1 = Point2;
Point2 = Temp;
}
/******************************************************************************
function: Draw Point(Xpoint, Ypoint) Fill the color
parameter:
Xpoint : The x coordinate of the point
Ypoint : The y coordinate of the point
Color : Set color
Dot_Pixel : point size
******************************************************************************/
void GUI_DrawPoint(POINT Xpoint, POINT Ypoint, COLOR Color,
DOT_PIXEL Dot_Pixel, DOT_STYLE DOT_STYLE)
{
if(Xpoint > sOLED_DIS.OLED_Dis_Column || Ypoint > sOLED_DIS.OLED_Dis_Page) {
printf("GUI_DrawPoint Input exceeds the normal display range\r\n");
return;
}
uint16_t XDir_Num ,YDir_Num;
if(DOT_STYLE == DOT_STYLE_DFT) {
for(XDir_Num = 0; XDir_Num < 2 * Dot_Pixel - 1; XDir_Num++) {
for(YDir_Num = 0; YDir_Num < 2 * Dot_Pixel - 1; YDir_Num++) {
// printf("YDir_Num = %d\r\n",YDir_Num);
OLED_SetColor(Xpoint + XDir_Num - Dot_Pixel, Ypoint + YDir_Num - Dot_Pixel, Color);
}
}
} else {
for(XDir_Num = 0; XDir_Num < Dot_Pixel; XDir_Num++) {
for(YDir_Num = 0; YDir_Num < Dot_Pixel; YDir_Num++) {
OLED_SetColor(Xpoint + XDir_Num, Ypoint + YDir_Num, Color);
}
}
}
}
/******************************************************************************
function: Draw a line of arbitrary slope
parameter:
Xstart :Starting x point coordinates
Ystart :Starting x point coordinates
Xend :End point x coordinate
Yend :End point y coordinate
Color :The color of the line segment
******************************************************************************/
void GUI_DrawLine(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend,
COLOR Color, LINE_STYLE Line_Style, DOT_PIXEL Dot_Pixel)
{
if(Xstart > sOLED_DIS.OLED_Dis_Column || Ystart > sOLED_DIS.OLED_Dis_Page ||
Xend > sOLED_DIS.OLED_Dis_Column || Yend > sOLED_DIS.OLED_Dis_Page) {
printf("GUI_DrawLine Input exceeds the normal display range\r\n");
return;
}
if(Xstart > Xend)
GUI_Swop(Xstart,Xend);
if(Ystart > Yend)
GUI_Swop(Ystart,Yend);
POINT Xpoint = Xstart;
POINT Ypoint = Ystart;
int32_t dx =(int32_t)Xend -(int32_t)Xstart >= 0 ? Xend - Xstart : Xstart - Xend;
int32_t dy =(int32_t)Yend -(int32_t)Ystart <= 0 ? Yend - Ystart : Ystart - Yend;
// Increment direction, 1 is positive, -1 is counter;
int32_t XAddway = Xstart < Xend ? 1 : -1;
int32_t YAddway = Ystart < Yend ? 1 : -1;
//Cumulative error
int32_t Esp = dx + dy;
int8_t Line_Style_Temp = 0;
for(;;) {
Line_Style_Temp++;
//Painted dotted line, 2 point is really virtual
if(Line_Style == LINE_DOTTED && Line_Style_Temp %3 == 0) {
//printf("LINE_DOTTED\r\n");
GUI_DrawPoint(Xpoint, Ypoint, OLED_BACKGROUND, Dot_Pixel, DOT_STYLE_DFT);
Line_Style_Temp = 0;
} else {
GUI_DrawPoint(Xpoint, Ypoint, Color, Dot_Pixel, DOT_STYLE_DFT);
}
if(2 * Esp >= dy) {
if(Xpoint == Xend) break;
Esp += dy;
Xpoint += XAddway;
}
if(2 * Esp <= dx) {
if(Ypoint == Yend) break;
Esp += dx;
Ypoint += YAddway;
}
}
}
/******************************************************************************
function: Draw a rectangle
parameter:
Xstart :Rectangular Starting x point coordinates
Ystart :Rectangular Starting x point coordinates
Xend :Rectangular End point x coordinate
Yend :Rectangular End point y coordinate
Color :The color of the Rectangular segment
Filled : Whether it is filled--- 1 solid 0:empty
******************************************************************************/
void GUI_DrawRectangle(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend,
COLOR Color, DRAW_FILL Filled, DOT_PIXEL Dot_Pixel )
{
if(Xstart > sOLED_DIS.OLED_Dis_Column || Ystart > sOLED_DIS.OLED_Dis_Page ||
Xend > sOLED_DIS.OLED_Dis_Column || Yend > sOLED_DIS.OLED_Dis_Page) {
printf("Input exceeds the normal display range\r\n");
return;
}
if(Xstart > Xend)
GUI_Swop(Xstart,Xend);
if(Ystart > Yend)
GUI_Swop(Ystart,Yend);
POINT Ypoint;
if(Filled ) {
for(Ypoint = Ystart; Ypoint < Yend; Ypoint++) {
GUI_DrawLine(Xstart, Ypoint, Xend, Ypoint, Color , LINE_SOLID, Dot_Pixel);
}
} else {
GUI_DrawLine(Xstart, Ystart, Xend, Ystart, Color , LINE_SOLID, Dot_Pixel);
GUI_DrawLine(Xstart, Ystart, Xstart, Yend, Color , LINE_SOLID, Dot_Pixel);
GUI_DrawLine(Xend, Yend, Xend, Ystart, Color , LINE_SOLID, Dot_Pixel);
GUI_DrawLine(Xend, Yend, Xstart, Yend, Color , LINE_SOLID, Dot_Pixel);
}
}
/******************************************************************************
function: Use the 8-point method to draw a circle of the
specified size at the specified position.
parameter:
X_Center :Center X coordinate
Y_Center :Center Y coordinate
Radius :circle Radius
Color :The color of the :circle segment
Filled : Whether it is filled: 1 filling 0:Do not
******************************************************************************/
void GUI_DrawCircle(POINT X_Center, POINT Y_Center, LENGTH Radius,
COLOR Color, DRAW_FILL Draw_Fill , DOT_PIXEL Dot_Pixel)
{
if(X_Center > sOLED_DIS.OLED_Dis_Column || Y_Center >= sOLED_DIS.OLED_Dis_Page) {
printf("GUI_DrawCircle Input exceeds the normal display range\r\n");
return;
}
//Draw a circle from(0, R) as a starting point
int16_t XCurrent, YCurrent;
XCurrent = 0;
YCurrent = Radius;
//Cumulative error,judge the next point of the logo
int16_t Esp = 3 -(Radius << 1 );
int16_t sCountY;
if(Draw_Fill == DRAW_FULL) {
while(XCurrent <= YCurrent ) { //Realistic circles
for(sCountY = XCurrent; sCountY <= YCurrent; sCountY ++ ) {
GUI_DrawPoint(X_Center + XCurrent, Y_Center + sCountY, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //1
GUI_DrawPoint(X_Center - XCurrent, Y_Center + sCountY, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //2
GUI_DrawPoint(X_Center - sCountY, Y_Center + XCurrent, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //3
GUI_DrawPoint(X_Center - sCountY, Y_Center - XCurrent, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //4
GUI_DrawPoint(X_Center - XCurrent, Y_Center - sCountY, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //5
GUI_DrawPoint(X_Center + XCurrent, Y_Center - sCountY, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //6
GUI_DrawPoint(X_Center + sCountY, Y_Center - XCurrent, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT ); //7
GUI_DrawPoint(X_Center + sCountY, Y_Center + XCurrent, Color, DOT_PIXEL_DFT, DOT_STYLE_DFT );
}
if(Esp < 0 )
Esp += 4 * XCurrent + 6;
else {
Esp += 10 + 4 *(XCurrent - YCurrent );
YCurrent --;
}
XCurrent ++;
}
} else { //Draw a hollow circle
while(XCurrent <= YCurrent ) {
GUI_DrawPoint(X_Center + XCurrent, Y_Center + YCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //1
GUI_DrawPoint(X_Center - XCurrent, Y_Center + YCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //2
GUI_DrawPoint(X_Center - YCurrent, Y_Center + XCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //3
GUI_DrawPoint(X_Center - YCurrent, Y_Center - XCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //4
GUI_DrawPoint(X_Center - XCurrent, Y_Center - YCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //5
GUI_DrawPoint(X_Center + XCurrent, Y_Center - YCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //6
GUI_DrawPoint(X_Center + YCurrent, Y_Center - XCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //7
GUI_DrawPoint(X_Center + YCurrent, Y_Center + XCurrent, Color, Dot_Pixel, DOT_STYLE_DFT ); //0
if(Esp < 0 )
Esp += 4 * XCurrent + 6;
else {
Esp += 10 + 4 *(XCurrent - YCurrent );
YCurrent --;
}
XCurrent ++;
}
}
}
/******************************************************************************
function: Show English characters
parameter:
Xpoint :X coordinate
Ypoint :Y coordinate
Acsii_Char :To display the English characters
Font :A structure pointer that displays a character size
Color_Background : Select the background color of the English character
Color_Foreground : Select the foreground color of the English character
******************************************************************************/
void GUI_DisChar(POINT Xpoint, POINT Ypoint, const char Acsii_Char,
sFONT* Font, COLOR Color_Background, COLOR Color_Foreground)
{
POINT Page, Column;
if(Xpoint > sOLED_DIS.OLED_Dis_Column || Ypoint > sOLED_DIS.OLED_Dis_Page) {
printf("GUI_DisChar Input exceeds the normal display range\r\n");
return;
}
uint32_t Char_Offset =(Acsii_Char - ' ') * Font->Height *(Font->Width / 8 +(Font->Width % 8 ? 1 : 0));
const unsigned char *ptr = &Font->table[Char_Offset];
for(Page = 0; Page < Font->Height; Page ++ ) {
for(Column = 0; Column < Font->Width; Column ++ ) {
//To determine whether the font background color and screen background color is consistent
if(FONT_BACKGROUND == Color_Background) { //this process is to speed up the scan
if(*ptr &(0x80 >>(Column % 8)))
GUI_DrawPoint(Xpoint + Column, Ypoint + Page, Color_Foreground, DOT_PIXEL_DFT, DOT_STYLE_DFT);
} else {
if(*ptr &(0x80 >>(Column % 8))) {
GUI_DrawPoint(Xpoint + Column, Ypoint + Page, Color_Foreground, DOT_PIXEL_DFT, DOT_STYLE_DFT);
} else {
GUI_DrawPoint(Xpoint + Column, Ypoint + Page, Color_Background, DOT_PIXEL_DFT, DOT_STYLE_DFT);
}
}
//One pixel is 8 bits
if(Column % 8 == 7)
ptr++;
}/* Write a line */
if(Font->Width % 8 != 0)
ptr++;
}/* Write all */
}
/******************************************************************************
function: Display the string
parameter:
Xstart :X coordinate
Ystart :Y coordinate
pString :The first address of the English string to be displayed
Font :A structure pointer that displays a character size
Color_Background : Select the background color of the English character
Color_Foreground : Select the foreground color of the English character
******************************************************************************/
void GUI_DisString_EN(POINT Xstart, POINT Ystart, const char * pString,
sFONT* Font,COLOR Color_Background, COLOR Color_Foreground )
{
POINT Xpoint = Xstart;
POINT Ypoint = Ystart;
if(Xstart > sOLED_DIS.OLED_Dis_Column || Ystart > sOLED_DIS.OLED_Dis_Page) {
printf("GUI_DisString_EN Input exceeds the normal display range\r\n");
return;
}
while(* pString != '\0') {
//if X direction filled , reposition to(Xstart,Ypoint),Ypoint is Y direction plus the height of the character
if((Xpoint + Font->Width ) > sOLED_DIS.OLED_Dis_Column ) {
Xpoint = Xstart;
Ypoint += Font->Height;
}
// If the Y direction is full, reposition to(Xstart, Ystart)
if((Ypoint + Font->Height ) > sOLED_DIS.OLED_Dis_Page ) {
Xpoint = Xstart;
Ypoint = Ystart;
}
GUI_DisChar(Xpoint, Ypoint, * pString, Font, Color_Background, Color_Foreground);
//The next character of the address
pString ++;
//The next word of the abscissa increases the font of the broadband
Xpoint += Font->Width;
}
}
/******************************************************************************
function: Display the string
parameter:
Xstart :X coordinate
Ystart : Y coordinate
Nummber : The number displayed
Font :A structure pointer that displays a character size
Color_Background : Select the background color of the English character
Color_Foreground : Select the foreground color of the English character
******************************************************************************/
#define ARRAY_LEN 255
void GUI_DisNum(POINT Xpoint, POINT Ypoint, int32_t Nummber,
sFONT* Font,COLOR Color_Background, COLOR Color_Foreground )
{
int16_t Num_Bit = 0, Str_Bit = 0;
uint8_t Str_Array[ARRAY_LEN] = {0},Num_Array[ARRAY_LEN] = {0};
uint8_t *pStr = Str_Array;
if(Xpoint > sOLED_DIS.OLED_Dis_Column || Ypoint > sOLED_DIS.OLED_Dis_Page) {
printf("GUI_DisNum Input exceeds the normal display range\r\n");
return;
}
if (!Nummber)
{
Num_Array[Num_Bit] = Nummber % 10 + '0';
Num_Bit++;
}
//Converts a number to a string
while(Nummber) {
Num_Array[Num_Bit] = Nummber % 10 + '0';
Num_Bit++;
Nummber /= 10;
}
//The string is inverted
while(Num_Bit > 0) {
Str_Array[Str_Bit] = Num_Array[Num_Bit -1];
Str_Bit ++;
Num_Bit --;
}
//show
GUI_DisString_EN(Xpoint, Ypoint, (const char*)pStr, Font, Color_Background, Color_Foreground );
}
/******************************************************************************
function: Display the bit map,1 byte = 8bit = 8 points
parameter:
Xpoint :X coordinate
Ypoint : Y coordinate
pMap : Pointing to the picture
Width :Bitmap Width
Height : Bitmap Height
note:
This function is suitable for bitmap, because a 16-bit data accounted for 16 points
******************************************************************************/
void GUI_Disbitmap(POINT Xpoint, POINT Ypoint, const unsigned char *pMap,
POINT Width, POINT Height)
{
POINT i, j, byteWidth = (Width + 7)/8;
for(j = 0; j < Height; j++) {
for(i = 0; i <Width; i ++) {
if(*(pMap + j*byteWidth + i/8) & (128 >> (i & 7))) {
GUI_DrawPoint(Xpoint+i, Ypoint+j, WHITE, DOT_PIXEL_DFT, DOT_STYLE_DFT);
}
}
}
}
/******************************************************************************
function: Display the Gray map,1 byte = 8bit = 2 points
parameter:
Xpoint :X coordinate
Ypoint : Y coordinate
pMap : Pointing to the picture
Width :Bitmap Width
Height : Bitmap Height
note:
This function is suitable for bitmap, because a 4-bit data accounted for 1 points
Please use the Image2lcd generated array
******************************************************************************/
void GUI_DisGrayMap(POINT Xpoint, POINT Ypoint, const unsigned char *pBmp)
{
//Get the Map header Gray, width, height
char Gray;
Gray = *(pBmp + 1);
POINT Height,Width;
Width = (*(pBmp + 3) << 8) | (*(pBmp + 2));
Height = (*(pBmp + 5) << 8) | (*(pBmp + 4));
POINT i, j;
if(Gray == 0x04){//Sixteen gray levels
pBmp = pBmp + 6;
for(j = 0; j < Height; j++)
for(i = 0; i < Width / 2; i++){
GUI_DrawPoint(Xpoint + i * 2, Ypoint + j, ~(*pBmp >> 4), DOT_PIXEL_DFT, DOT_STYLE_DFT);
GUI_DrawPoint(Xpoint + i * 2 + 1, Ypoint + j, ~*pBmp , DOT_PIXEL_DFT, DOT_STYLE_DFT);
pBmp++;
}
}else{
printf("Does not support type\r\n");
return;
}
}
/******************************************************************************
function: According to the display area adaptive display time
parameter:
xStart : X direction Start coordinates
Ystart : Y direction Start coordinates
Xend : X direction end coordinates
Yend : Y direction end coordinates
pTime : Pointer to the definition of the structure
Color : Set show color
note:
******************************************************************************/
void GUI_Showtime(POINT Xstart, POINT Ystart, POINT Xend, POINT Yend,
DEV_TIME *pTime,COLOR Color)
{
uint8_t value[10] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'};
sFONT *Font;
OLED_SetWindow(Xstart, Ystart, Xend, Yend);
OLED_ClearWindow(Xstart, Ystart, Xend, Yend, BLACK);
//According to the display area adaptive font size
POINT Dx = (Xend - Xstart) / 7;//Determine the spacing between characters
POINT Dy = Yend - Ystart; //determine the font size
if(Dx > Font24.Width && Dy > Font24.Height){
Font = &Font24;
}else if((Dx > Font20.Width && Dx < Font24.Width) &&
(Dy > Font20.Height && Dy < Font24.Height)){
Font = &Font20;
}else if((Dx > Font16.Width && Dx < Font20.Width) &&
(Dy > Font16.Height && Dy < Font20.Height)){
Font = &Font16;
}else if((Dx > Font12.Width && Dx < Font16.Width) &&
(Dy > Font12.Height && Dy < Font16.Height)){
Font = &Font12;
}else if((Dx > Font8.Width && Dx < Font12.Width) &&
(Dy > Font8.Height && Dy < Font12.Height)){
Font = &Font8;
}else{
printf("Please change the display area size, or add a larger font to modify\r\n");
}
//Write data into the cache
GUI_DisChar(Xstart , Ystart, value[pTime->Hour / 10], Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx , Ystart, value[pTime->Hour % 10], Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx + Dx / 4 + Dx / 2 , Ystart, ':' , Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx * 2 + Dx / 2 , Ystart, value[pTime->Min / 10] , Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx * 3 + Dx / 2 , Ystart, value[pTime->Min % 10] , Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx * 4 + Dx / 2 - Dx / 4, Ystart, ':' , Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx * 5 , Ystart, value[pTime->Sec / 10] , Font, FONT_BACKGROUND, Color);
GUI_DisChar(Xstart + Dx * 6 , Ystart, value[pTime->Sec % 10] , Font, FONT_BACKGROUND, Color);
OLED_DisWindow(Xstart, Ystart, Xend, Yend);
}
/******************************************************************************
function: OLED_Show
note:
OLED Clear,
Draw Line,
Draw Rectangle,
Draw Rings,
Draw Olympic Rings,
Display String,
Show Pic
******************************************************************************/
void GUI_Show(void)
{
//printf("Clear... \r\n");
OLED_Clear(OLED_BACKGROUND);//OLED_BACKGROUND
OLED_Display();
//printf("Draw Line \r\n");
GUI_DrawLine(0, 1 , sOLED_DIS.OLED_Dis_Column - 1, 1 , WHITE, LINE_SOLID , DOT_PIXEL_2X2);
GUI_DrawLine(0, 4 , sOLED_DIS.OLED_Dis_Column - 1, 4 , WHITE, LINE_DOTTED, DOT_PIXEL_DFT);
GUI_DrawLine(0, sOLED_DIS.OLED_Dis_Page - 5, sOLED_DIS.OLED_Dis_Column - 1, sOLED_DIS.OLED_Dis_Page - 5, WHITE, LINE_DOTTED, DOT_PIXEL_DFT);
GUI_DrawLine(0, sOLED_DIS.OLED_Dis_Page - 1, sOLED_DIS.OLED_Dis_Column - 1, sOLED_DIS.OLED_Dis_Page - 1, WHITE, LINE_SOLID , DOT_PIXEL_2X2);
//printf("Draw Rectangle \r\n");
GUI_DrawRectangle(5 , 7 , sOLED_DIS.OLED_Dis_Column - 5 , sOLED_DIS.OLED_Dis_Page - 7, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawRectangle(10, 10, sOLED_DIS.OLED_Dis_Column - 10, 20 , WHITE, DRAW_FULL , DOT_PIXEL_DFT);
//printf("Draw Rings\r\n");
GUI_DrawCircle(10, 30, 3, WHITE, DRAW_FULL , DOT_PIXEL_DFT);
GUI_DrawCircle(10, 40, 3, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawCircle(10, 50, 3, WHITE, DRAW_FULL , DOT_PIXEL_DFT);
GUI_DrawCircle(sOLED_DIS.OLED_Dis_Column - 10, 30, 3, WHITE, DRAW_FULL , DOT_PIXEL_DFT);
GUI_DrawCircle(sOLED_DIS.OLED_Dis_Column - 10, 40, 3, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawCircle(sOLED_DIS.OLED_Dis_Column - 10, 50, 3, WHITE, DRAW_FULL , DOT_PIXEL_DFT);
//printf("Draw Olympic Rings\r\n");
uint16_t Cx1 = 35, Cy1 = 85, Cr = 12;
uint16_t Cx2 = Cx1 + (2.5 * Cr), Cy2 = Cy1;
uint16_t Cx3 = Cx1 + (5 * Cr), Cy3 = Cy1;
uint16_t Cx4 = (Cx1 + Cx2) / 2, Cy4 = Cy1 + Cr;
uint16_t Cx5 = (Cx2 + Cx3) / 2, Cy5 = Cy1 + Cr;
GUI_DrawCircle(Cx1, Cy1, Cr, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawCircle(Cx2, Cy2, Cr, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawCircle(Cx3, Cy3, Cr, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawCircle(Cx4, Cy4, Cr, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
GUI_DrawCircle(Cx5, Cy5, Cr, WHITE, DRAW_EMPTY, DOT_PIXEL_DFT);
//printf("Display String \r\n");
GUI_DisString_EN(30, 25, "WaveShare" , &Font12, FONT_BACKGROUND, WHITE);
GUI_DisString_EN(28, 35, "Electronic" , &Font12, FONT_BACKGROUND, WHITE);
GUI_DisString_EN(18, 45, "1.5inch OLED", &Font12, FONT_BACKGROUND, WHITE);
//printf("Showing...\r\n");
OLED_Display();
Driver_Delay_ms(2000);
}
/*----------------------------------------------------------------------------
User Function
*----------------------------------------------------------------------------*/
void OLED_Config(void)
{
/* Init GPIO Port C for non-secure OLED control */
GPIO_SetMode(PC_NS, BIT12 | BIT11, GPIO_MODE_OUTPUT);
PC11_NS = 1; //OLED_DC(DATA or COMMAND)
PC12_NS = 1; //OLED_RST
/* USER CODE BEGIN 2 */
if(OLED_PRINT)
printf("**********1.5inch OLED Init**********\r\n");
System_Init();
if(OLED_PRINT)
printf("OLED_Init()...\r\n");
OLED_Init(SCAN_DIR_DFT);//SCAN_DIR_DFT = D2U_L2R
if(OLED_PRINT)
printf("OLED_Show()...\r\n");
GUI_Show();
if(OLED_PRINT)
printf("************************************\r\n");
OLED_Clear(OLED_BACKGROUND);//OLED_BACKGROUND
OLED_Display();
}
void OLED_Background_On()
{
OLED_SetWindow(0, 0, 127, 127);
OLED_ClearWindow(0, 0, 127, 127, BLACK);
if(OLED_PRINT)
printf("Show toolbar icons\n");
GUI_Disbitmap(0 , 2, Signal816 , 16, 8);
GUI_Disbitmap(24 , 2, Bluetooth88, 8 , 8);
GUI_Disbitmap(40 , 2, Msg816 , 16, 8);
GUI_Disbitmap(64 , 2, GPRS88 , 8 , 8);
GUI_Disbitmap(90 , 2, Alarm88 , 8 , 8);
GUI_Disbitmap(112, 2, Bat816 , 16, 8);
if(OLED_PRINT)
printf("Show background(16 gray map)\n");
GUI_DisGrayMap(0, 0, gImage_background);
OLED_DisWindow(0, 0, 127, 127);
}
void OLED_BPM(uint32_t bpm)
{
if(bpm == 9999)
{
OLED_SetWindow(0, 10, 127, 50);
OLED_ClearWindow(0, 10, 127, 50, BLACK);
OLED_DisWindow(0, 10, 127, 50);
return ;
}
if(OLED_PRINT)
printf("Show Heart Rate\n");
OLED_SetWindow(0, 10, 127, 50);
GUI_DisNum(22 , 25, bpm, &Font24, FONT_BACKGROUND, WHITE);
OLED_DisWindow(0, 10, 127, 50);
}
void OLED_Off(void)
{
OLED_Clear(OLED_BACKGROUND);//OLED_BACKGROUND
OLED_Display();
}
This diff could not be displayed because it is too large.
/**
******************************************************************************
* @file Font12.c
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief This file provides text Font12 for STM32xx-EVAL's LCD driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fonts.h"
//
// Font data for Courier New 12pt
//
const uint8_t Font12_Table[] =
{
// @0 ' ' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @12 '!' (7 pixels wide)
0x00, //
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x00, //
0x00, //
0x10, // #
0x00, //
0x00, //
0x00, //
// @24 '"' (7 pixels wide)
0x00, //
0x6C, // ## ##
0x48, // # #
0x48, // # #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @36 '#' (7 pixels wide)
0x00, //
0x14, // # #
0x14, // # #
0x28, // # #
0x7C, // #####
0x28, // # #
0x7C, // #####
0x28, // # #
0x50, // # #
0x50, // # #
0x00, //
0x00, //
// @48 '$' (7 pixels wide)
0x00, //
0x10, // #
0x38, // ###
0x40, // #
0x40, // #
0x38, // ###
0x48, // # #
0x70, // ###
0x10, // #
0x10, // #
0x00, //
0x00, //
// @60 '%' (7 pixels wide)
0x00, //
0x20, // #
0x50, // # #
0x20, // #
0x0C, // ##
0x70, // ###
0x08, // #
0x14, // # #
0x08, // #
0x00, //
0x00, //
0x00, //
// @72 '&' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x18, // ##
0x20, // #
0x20, // #
0x54, // # # #
0x48, // # #
0x34, // ## #
0x00, //
0x00, //
0x00, //
// @84 ''' (7 pixels wide)
0x00, //
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @96 '(' (7 pixels wide)
0x00, //
0x08, // #
0x08, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x08, // #
0x08, // #
0x00, //
// @108 ')' (7 pixels wide)
0x00, //
0x20, // #
0x20, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x20, // #
0x20, // #
0x00, //
// @120 '*' (7 pixels wide)
0x00, //
0x10, // #
0x7C, // #####
0x10, // #
0x28, // # #
0x28, // # #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @132 '+' (7 pixels wide)
0x00, //
0x00, //
0x10, // #
0x10, // #
0x10, // #
0xFE, // #######
0x10, // #
0x10, // #
0x10, // #
0x00, //
0x00, //
0x00, //
// @144 ',' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x18, // ##
0x10, // #
0x30, // ##
0x20, // #
0x00, //
// @156 '-' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x7C, // #####
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @168 '.' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x30, // ##
0x30, // ##
0x00, //
0x00, //
0x00, //
// @180 '/' (7 pixels wide)
0x00, //
0x04, // #
0x04, // #
0x08, // #
0x08, // #
0x10, // #
0x10, // #
0x20, // #
0x20, // #
0x40, // #
0x00, //
0x00, //
// @192 '0' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @204 '1' (7 pixels wide)
0x00, //
0x30, // ##
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @216 '2' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x04, // #
0x08, // #
0x10, // #
0x20, // #
0x44, // # #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @228 '3' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x04, // #
0x18, // ##
0x04, // #
0x04, // #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @240 '4' (7 pixels wide)
0x00, //
0x0C, // ##
0x14, // # #
0x14, // # #
0x24, // # #
0x44, // # #
0x7E, // ######
0x04, // #
0x0E, // ###
0x00, //
0x00, //
0x00, //
// @252 '5' (7 pixels wide)
0x00, //
0x3C, // ####
0x20, // #
0x20, // #
0x38, // ###
0x04, // #
0x04, // #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @264 '6' (7 pixels wide)
0x00, //
0x1C, // ###
0x20, // #
0x40, // #
0x78, // ####
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @276 '7' (7 pixels wide)
0x00, //
0x7C, // #####
0x44, // # #
0x04, // #
0x08, // #
0x08, // #
0x08, // #
0x10, // #
0x10, // #
0x00, //
0x00, //
0x00, //
// @288 '8' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x44, // # #
0x38, // ###
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @300 '9' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x44, // # #
0x44, // # #
0x3C, // ####
0x04, // #
0x08, // #
0x70, // ###
0x00, //
0x00, //
0x00, //
// @312 ':' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x30, // ##
0x30, // ##
0x00, //
0x00, //
0x30, // ##
0x30, // ##
0x00, //
0x00, //
0x00, //
// @324 ';' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x18, // ##
0x18, // ##
0x00, //
0x00, //
0x18, // ##
0x30, // ##
0x20, // #
0x00, //
0x00, //
// @336 '<' (7 pixels wide)
0x00, //
0x00, //
0x0C, // ##
0x10, // #
0x60, // ##
0x80, // #
0x60, // ##
0x10, // #
0x0C, // ##
0x00, //
0x00, //
0x00, //
// @348 '=' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x7C, // #####
0x00, //
0x7C, // #####
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @360 '>' (7 pixels wide)
0x00, //
0x00, //
0xC0, // ##
0x20, // #
0x18, // ##
0x04, // #
0x18, // ##
0x20, // #
0xC0, // ##
0x00, //
0x00, //
0x00, //
// @372 '?' (7 pixels wide)
0x00, //
0x00, //
0x18, // ##
0x24, // # #
0x04, // #
0x08, // #
0x10, // #
0x00, //
0x30, // ##
0x00, //
0x00, //
0x00, //
// @384 '@' (7 pixels wide)
0x38, // ###
0x44, // # #
0x44, // # #
0x4C, // # ##
0x54, // # # #
0x54, // # # #
0x4C, // # ##
0x40, // #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
// @396 'A' (7 pixels wide)
0x00, //
0x30, // ##
0x10, // #
0x28, // # #
0x28, // # #
0x28, // # #
0x7C, // #####
0x44, // # #
0xEE, // ### ###
0x00, //
0x00, //
0x00, //
// @408 'B' (7 pixels wide)
0x00, //
0xF8, // #####
0x44, // # #
0x44, // # #
0x78, // ####
0x44, // # #
0x44, // # #
0x44, // # #
0xF8, // #####
0x00, //
0x00, //
0x00, //
// @420 'C' (7 pixels wide)
0x00, //
0x3C, // ####
0x44, // # #
0x40, // #
0x40, // #
0x40, // #
0x40, // #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @432 'D' (7 pixels wide)
0x00, //
0xF0, // ####
0x48, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x48, // # #
0xF0, // ####
0x00, //
0x00, //
0x00, //
// @444 'E' (7 pixels wide)
0x00, //
0xFC, // ######
0x44, // # #
0x50, // # #
0x70, // ###
0x50, // # #
0x40, // #
0x44, // # #
0xFC, // ######
0x00, //
0x00, //
0x00, //
// @456 'F' (7 pixels wide)
0x00, //
0x7E, // ######
0x22, // # #
0x28, // # #
0x38, // ###
0x28, // # #
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
0x00, //
// @468 'G' (7 pixels wide)
0x00, //
0x3C, // ####
0x44, // # #
0x40, // #
0x40, // #
0x4E, // # ###
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @480 'H' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x44, // # #
0x44, // # #
0x7C, // #####
0x44, // # #
0x44, // # #
0x44, // # #
0xEE, // ### ###
0x00, //
0x00, //
0x00, //
// @492 'I' (7 pixels wide)
0x00, //
0x7C, // #####
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @504 'J' (7 pixels wide)
0x00, //
0x3C, // ####
0x08, // #
0x08, // #
0x08, // #
0x48, // # #
0x48, // # #
0x48, // # #
0x30, // ##
0x00, //
0x00, //
0x00, //
// @516 'K' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x44, // # #
0x48, // # #
0x50, // # #
0x70, // ###
0x48, // # #
0x44, // # #
0xE6, // ### ##
0x00, //
0x00, //
0x00, //
// @528 'L' (7 pixels wide)
0x00, //
0x70, // ###
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x24, // # #
0x24, // # #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @540 'M' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x6C, // ## ##
0x6C, // ## ##
0x54, // # # #
0x54, // # # #
0x44, // # #
0x44, // # #
0xEE, // ### ###
0x00, //
0x00, //
0x00, //
// @552 'N' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x64, // ## #
0x64, // ## #
0x54, // # # #
0x54, // # # #
0x54, // # # #
0x4C, // # ##
0xEC, // ### ##
0x00, //
0x00, //
0x00, //
// @564 'O' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @576 'P' (7 pixels wide)
0x00, //
0x78, // ####
0x24, // # #
0x24, // # #
0x24, // # #
0x38, // ###
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
0x00, //
// @588 'Q' (7 pixels wide)
0x00, //
0x38, // ###
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x1C, // ###
0x00, //
0x00, //
// @600 'R' (7 pixels wide)
0x00, //
0xF8, // #####
0x44, // # #
0x44, // # #
0x44, // # #
0x78, // ####
0x48, // # #
0x44, // # #
0xE2, // ### #
0x00, //
0x00, //
0x00, //
// @612 'S' (7 pixels wide)
0x00, //
0x34, // ## #
0x4C, // # ##
0x40, // #
0x38, // ###
0x04, // #
0x04, // #
0x64, // ## #
0x58, // # ##
0x00, //
0x00, //
0x00, //
// @624 'T' (7 pixels wide)
0x00, //
0xFE, // #######
0x92, // # # #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @636 'U' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @648 'V' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x44, // # #
0x44, // # #
0x28, // # #
0x28, // # #
0x28, // # #
0x10, // #
0x10, // #
0x00, //
0x00, //
0x00, //
// @660 'W' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x44, // # #
0x44, // # #
0x54, // # # #
0x54, // # # #
0x54, // # # #
0x54, // # # #
0x28, // # #
0x00, //
0x00, //
0x00, //
// @672 'X' (7 pixels wide)
0x00, //
0xC6, // ## ##
0x44, // # #
0x28, // # #
0x10, // #
0x10, // #
0x28, // # #
0x44, // # #
0xC6, // ## ##
0x00, //
0x00, //
0x00, //
// @684 'Y' (7 pixels wide)
0x00, //
0xEE, // ### ###
0x44, // # #
0x28, // # #
0x28, // # #
0x10, // #
0x10, // #
0x10, // #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @696 'Z' (7 pixels wide)
0x00, //
0x7C, // #####
0x44, // # #
0x08, // #
0x10, // #
0x10, // #
0x20, // #
0x44, // # #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @708 '[' (7 pixels wide)
0x00, //
0x38, // ###
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x38, // ###
0x00, //
// @720 '\' (7 pixels wide)
0x00, //
0x40, // #
0x20, // #
0x20, // #
0x20, // #
0x10, // #
0x10, // #
0x08, // #
0x08, // #
0x08, // #
0x00, //
0x00, //
// @732 ']' (7 pixels wide)
0x00, //
0x38, // ###
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x38, // ###
0x00, //
// @744 '^' (7 pixels wide)
0x00, //
0x10, // #
0x10, // #
0x28, // # #
0x44, // # #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @756 '_' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0xFE, // #######
// @768 '`' (7 pixels wide)
0x00, //
0x10, // #
0x08, // #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @780 'a' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x38, // ###
0x44, // # #
0x3C, // ####
0x44, // # #
0x44, // # #
0x3E, // #####
0x00, //
0x00, //
0x00, //
// @792 'b' (7 pixels wide)
0x00, //
0xC0, // ##
0x40, // #
0x58, // # ##
0x64, // ## #
0x44, // # #
0x44, // # #
0x44, // # #
0xF8, // #####
0x00, //
0x00, //
0x00, //
// @804 'c' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x3C, // ####
0x44, // # #
0x40, // #
0x40, // #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @816 'd' (7 pixels wide)
0x00, //
0x0C, // ##
0x04, // #
0x34, // ## #
0x4C, // # ##
0x44, // # #
0x44, // # #
0x44, // # #
0x3E, // #####
0x00, //
0x00, //
0x00, //
// @828 'e' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x38, // ###
0x44, // # #
0x7C, // #####
0x40, // #
0x40, // #
0x3C, // ####
0x00, //
0x00, //
0x00, //
// @840 'f' (7 pixels wide)
0x00, //
0x1C, // ###
0x20, // #
0x7C, // #####
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @852 'g' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x36, // ## ##
0x4C, // # ##
0x44, // # #
0x44, // # #
0x44, // # #
0x3C, // ####
0x04, // #
0x38, // ###
0x00, //
// @864 'h' (7 pixels wide)
0x00, //
0xC0, // ##
0x40, // #
0x58, // # ##
0x64, // ## #
0x44, // # #
0x44, // # #
0x44, // # #
0xEE, // ### ###
0x00, //
0x00, //
0x00, //
// @876 'i' (7 pixels wide)
0x00, //
0x10, // #
0x00, //
0x70, // ###
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @888 'j' (7 pixels wide)
0x00, //
0x10, // #
0x00, //
0x78, // ####
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x08, // #
0x70, // ###
0x00, //
// @900 'k' (7 pixels wide)
0x00, //
0xC0, // ##
0x40, // #
0x5C, // # ###
0x48, // # #
0x70, // ###
0x50, // # #
0x48, // # #
0xDC, // ## ###
0x00, //
0x00, //
0x00, //
// @912 'l' (7 pixels wide)
0x00, //
0x30, // ##
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @924 'm' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xE8, // ### #
0x54, // # # #
0x54, // # # #
0x54, // # # #
0x54, // # # #
0xFE, // #######
0x00, //
0x00, //
0x00, //
// @936 'n' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xD8, // ## ##
0x64, // ## #
0x44, // # #
0x44, // # #
0x44, // # #
0xEE, // ### ###
0x00, //
0x00, //
0x00, //
// @948 'o' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x38, // ###
0x44, // # #
0x44, // # #
0x44, // # #
0x44, // # #
0x38, // ###
0x00, //
0x00, //
0x00, //
// @960 'p' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xD8, // ## ##
0x64, // ## #
0x44, // # #
0x44, // # #
0x44, // # #
0x78, // ####
0x40, // #
0xE0, // ###
0x00, //
// @972 'q' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x36, // ## ##
0x4C, // # ##
0x44, // # #
0x44, // # #
0x44, // # #
0x3C, // ####
0x04, // #
0x0E, // ###
0x00, //
// @984 'r' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x6C, // ## ##
0x30, // ##
0x20, // #
0x20, // #
0x20, // #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @996 's' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x3C, // ####
0x44, // # #
0x38, // ###
0x04, // #
0x44, // # #
0x78, // ####
0x00, //
0x00, //
0x00, //
// @1008 't' (7 pixels wide)
0x00, //
0x00, //
0x20, // #
0x7C, // #####
0x20, // #
0x20, // #
0x20, // #
0x22, // # #
0x1C, // ###
0x00, //
0x00, //
0x00, //
// @1020 'u' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xCC, // ## ##
0x44, // # #
0x44, // # #
0x44, // # #
0x4C, // # ##
0x36, // ## ##
0x00, //
0x00, //
0x00, //
// @1032 'v' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xEE, // ### ###
0x44, // # #
0x44, // # #
0x28, // # #
0x28, // # #
0x10, // #
0x00, //
0x00, //
0x00, //
// @1044 'w' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xEE, // ### ###
0x44, // # #
0x54, // # # #
0x54, // # # #
0x54, // # # #
0x28, // # #
0x00, //
0x00, //
0x00, //
// @1056 'x' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xCC, // ## ##
0x48, // # #
0x30, // ##
0x30, // ##
0x48, // # #
0xCC, // ## ##
0x00, //
0x00, //
0x00, //
// @1068 'y' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0xEE, // ### ###
0x44, // # #
0x24, // # #
0x28, // # #
0x18, // ##
0x10, // #
0x10, // #
0x78, // ####
0x00, //
// @1080 'z' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x7C, // #####
0x48, // # #
0x10, // #
0x20, // #
0x44, // # #
0x7C, // #####
0x00, //
0x00, //
0x00, //
// @1092 '{' (7 pixels wide)
0x00, //
0x08, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x20, // #
0x10, // #
0x10, // #
0x10, // #
0x08, // #
0x00, //
// @1104 '|' (7 pixels wide)
0x00, //
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x00, //
0x00, //
// @1116 '}' (7 pixels wide)
0x00, //
0x20, // #
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x08, // #
0x10, // #
0x10, // #
0x10, // #
0x20, // #
0x00, //
// @1128 '~' (7 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x24, // # #
0x58, // # ##
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
};
sFONT Font12 = {
Font12_Table,
7, /* Width */
12, /* Height */
};
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**
******************************************************************************
* @file font16.c
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief This file provides text font16 for STM32xx-EVAL's LCD driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fonts.h"
//
// Font data for Courier New 12pt
//
const uint8_t Font16_Table[] =
{
// @0 ' ' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @32 '!' (11 pixels wide)
0x00, 0x00, //
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @64 '"' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1D, 0xC0, // ### ###
0x1D, 0xC0, // ### ###
0x08, 0x80, // # #
0x08, 0x80, // # #
0x08, 0x80, // # #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @96 '#' (11 pixels wide)
0x00, 0x00, //
0x0D, 0x80, // ## ##
0x0D, 0x80, // ## ##
0x0D, 0x80, // ## ##
0x0D, 0x80, // ## ##
0x3F, 0xC0, // ########
0x1B, 0x00, // ## ##
0x3F, 0xC0, // ########
0x1B, 0x00, // ## ##
0x1B, 0x00, // ## ##
0x1B, 0x00, // ## ##
0x1B, 0x00, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @128 '$' (11 pixels wide)
0x04, 0x00, // #
0x1F, 0x80, // ######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x38, 0x00, // ###
0x1E, 0x00, // ####
0x0F, 0x00, // ####
0x03, 0x80, // ###
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x3F, 0x00, // ######
0x04, 0x00, // #
0x04, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @160 '%' (11 pixels wide)
0x00, 0x00, //
0x18, 0x00, // ##
0x24, 0x00, // # #
0x24, 0x00, // # #
0x18, 0xC0, // ## ##
0x07, 0x80, // ####
0x1E, 0x00, // ####
0x31, 0x80, // ## ##
0x02, 0x40, // # #
0x02, 0x40, // # #
0x01, 0x80, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @192 '&' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x0F, 0x00, // ####
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x0C, 0x00, // ##
0x1D, 0x80, // ### ##
0x37, 0x00, // ## ###
0x33, 0x00, // ## ##
0x1D, 0x80, // ### ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @224 ''' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x00, // ###
0x07, 0x00, // ###
0x02, 0x00, // #
0x02, 0x00, // #
0x02, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @256 '(' (11 pixels wide)
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x0E, 0x00, // ###
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0E, 0x00, // ###
0x06, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @288 ')' (11 pixels wide)
0x00, 0x00, //
0x18, 0x00, // ##
0x18, 0x00, // ##
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x1C, 0x00, // ###
0x18, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @320 '*' (11 pixels wide)
0x00, 0x00, //
0x06, 0x00, // ##
0x06, 0x00, // ##
0x3F, 0xC0, // ########
0x3F, 0xC0, // ########
0x0F, 0x00, // ####
0x1F, 0x80, // ######
0x19, 0x80, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @352 '+' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x04, 0x00, // #
0x04, 0x00, // #
0x04, 0x00, // #
0x3F, 0x80, // #######
0x04, 0x00, // #
0x04, 0x00, // #
0x04, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @384 ',' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x06, 0x00, // ##
0x04, 0x00, // #
0x0C, 0x00, // ##
0x08, 0x00, // #
0x08, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
// @416 '-' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0x80, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @448 '.' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @480 '/' (11 pixels wide)
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x30, 0x00, // ##
0x30, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @512 '0' (11 pixels wide)
0x00, 0x00, //
0x0E, 0x00, // ###
0x1B, 0x00, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1B, 0x00, // ## ##
0x0E, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @544 '1' (11 pixels wide)
0x00, 0x00, //
0x06, 0x00, // ##
0x3E, 0x00, // #####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x3F, 0xC0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @576 '2' (11 pixels wide)
0x00, 0x00, //
0x0F, 0x00, // ####
0x19, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x18, 0x00, // ##
0x30, 0x00, // ##
0x3F, 0x80, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @608 '3' (11 pixels wide)
0x00, 0x00, //
0x3F, 0x00, // ######
0x61, 0x80, // ## ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x1F, 0x00, // #####
0x03, 0x80, // ###
0x01, 0x80, // ##
0x01, 0x80, // ##
0x61, 0x80, // ## ##
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @640 '4' (11 pixels wide)
0x00, 0x00, //
0x07, 0x00, // ###
0x07, 0x00, // ###
0x0F, 0x00, // ####
0x0B, 0x00, // # ##
0x1B, 0x00, // ## ##
0x13, 0x00, // # ##
0x33, 0x00, // ## ##
0x3F, 0x80, // #######
0x03, 0x00, // ##
0x0F, 0x80, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @672 '5' (11 pixels wide)
0x00, 0x00, //
0x1F, 0x80, // ######
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x1F, 0x00, // #####
0x11, 0x80, // # ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x21, 0x80, // # ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @704 '6' (11 pixels wide)
0x00, 0x00, //
0x07, 0x80, // ####
0x1C, 0x00, // ###
0x18, 0x00, // ##
0x30, 0x00, // ##
0x37, 0x00, // ## ###
0x39, 0x80, // ### ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x19, 0x80, // ## ##
0x0F, 0x00, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @736 '7' (11 pixels wide)
0x00, 0x00, //
0x7F, 0x00, // #######
0x43, 0x00, // # ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @768 '8' (11 pixels wide)
0x00, 0x00, //
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @800 '9' (11 pixels wide)
0x00, 0x00, //
0x1E, 0x00, // ####
0x33, 0x00, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x33, 0x80, // ## ###
0x1D, 0x80, // ### ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x07, 0x00, // ###
0x3C, 0x00, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @832 ':' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @864 ';' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x06, 0x00, // ##
0x04, 0x00, // #
0x08, 0x00, // #
0x08, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @896 '<' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0xC0, // ##
0x03, 0x00, // ##
0x04, 0x00, // #
0x18, 0x00, // ##
0x60, 0x00, // ##
0x18, 0x00, // ##
0x04, 0x00, // #
0x03, 0x00, // ##
0x00, 0xC0, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @928 '=' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0xC0, // #########
0x00, 0x00, //
0x7F, 0xC0, // #########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @960 '>' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x60, 0x00, // ##
0x18, 0x00, // ##
0x04, 0x00, // #
0x03, 0x00, // ##
0x00, 0xC0, // ##
0x03, 0x00, // ##
0x04, 0x00, // #
0x18, 0x00, // ##
0x60, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @992 '?' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x01, 0x80, // ##
0x07, 0x00, // ###
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1024 '@' (11 pixels wide)
0x00, 0x00, //
0x0E, 0x00, // ###
0x11, 0x00, // # #
0x21, 0x00, // # #
0x21, 0x00, // # #
0x27, 0x00, // # ###
0x29, 0x00, // # # #
0x29, 0x00, // # # #
0x27, 0x00, // # ###
0x20, 0x00, // #
0x11, 0x00, // # #
0x0E, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1056 'A' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0x00, // ######
0x0F, 0x00, // ####
0x09, 0x00, // # #
0x19, 0x80, // ## ##
0x19, 0x80, // ## ##
0x1F, 0x80, // ######
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x79, 0xE0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1088 'B' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x00, // #######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x3F, 0x00, // ######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x7F, 0x00, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1120 'C' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x40, // ##### #
0x30, 0xC0, // ## ##
0x60, 0x40, // ## #
0x60, 0x00, // ##
0x60, 0x00, // ##
0x60, 0x00, // ##
0x60, 0x40, // ## #
0x30, 0x80, // ## #
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1152 'D' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x00, // #######
0x31, 0x80, // ## ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x31, 0x80, // ## ##
0x7F, 0x00, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1184 'E' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x80, // ########
0x30, 0x80, // ## #
0x30, 0x80, // ## #
0x32, 0x00, // ## #
0x3E, 0x00, // #####
0x32, 0x00, // ## #
0x30, 0x80, // ## #
0x30, 0x80, // ## #
0x7F, 0x80, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1216 'F' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0xC0, // #########
0x30, 0x40, // ## #
0x30, 0x40, // ## #
0x32, 0x00, // ## #
0x3E, 0x00, // #####
0x32, 0x00, // ## #
0x30, 0x00, // ##
0x30, 0x00, // ##
0x7C, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1248 'G' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1E, 0x80, // #### #
0x31, 0x80, // ## ##
0x60, 0x80, // ## #
0x60, 0x00, // ##
0x60, 0x00, // ##
0x67, 0xC0, // ## #####
0x61, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1280 'H' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x3F, 0x80, // #######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x7B, 0xC0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1312 'I' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xC0, // ########
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x3F, 0xC0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1344 'J' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0xC0, // #######
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x63, 0x00, // ## ##
0x63, 0x00, // ## ##
0x63, 0x00, // ## ##
0x3E, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1376 'K' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x31, 0x80, // ## ##
0x33, 0x00, // ## ##
0x36, 0x00, // ## ##
0x3C, 0x00, // ####
0x3E, 0x00, // #####
0x33, 0x00, // ## ##
0x31, 0x80, // ## ##
0x79, 0xC0, // #### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1408 'L' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7E, 0x00, // ######
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x40, // ## #
0x18, 0x40, // ## #
0x18, 0x40, // ## #
0x7F, 0xC0, // #########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1440 'M' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0xE0, 0xE0, // ### ###
0x60, 0xC0, // ## ##
0x71, 0xC0, // ### ###
0x7B, 0xC0, // #### ####
0x6A, 0xC0, // ## # # ##
0x6E, 0xC0, // ## ### ##
0x64, 0xC0, // ## # ##
0x60, 0xC0, // ## ##
0xFB, 0xE0, // ##### #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1472 'N' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x73, 0xC0, // ### ####
0x31, 0x80, // ## ##
0x39, 0x80, // ### ##
0x3D, 0x80, // #### ##
0x35, 0x80, // ## # ##
0x37, 0x80, // ## ####
0x33, 0x80, // ## ###
0x31, 0x80, // ## ##
0x79, 0x80, // #### ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1504 'O' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1536 'P' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x00, // #######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x3F, 0x00, // ######
0x30, 0x00, // ##
0x30, 0x00, // ##
0x7E, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1568 'Q' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x0C, 0xC0, // ## ##
0x1F, 0x80, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1600 'R' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x00, // #######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x3E, 0x00, // #####
0x33, 0x00, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x7C, 0xE0, // ##### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1632 'S' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x80, // ######
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x38, 0x00, // ###
0x1F, 0x00, // #####
0x03, 0x80, // ###
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1664 'T' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x80, // ########
0x4C, 0x80, // # ## #
0x4C, 0x80, // # ## #
0x4C, 0x80, // # ## #
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1696 'U' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1728 'V' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1B, 0x00, // ## ##
0x1B, 0x00, // ## ##
0x1B, 0x00, // ## ##
0x0A, 0x00, // # #
0x0E, 0x00, // ###
0x0E, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1760 'W' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0xFB, 0xE0, // ##### #####
0x60, 0xC0, // ## ##
0x64, 0xC0, // ## # ##
0x6E, 0xC0, // ## ### ##
0x6E, 0xC0, // ## ### ##
0x2A, 0x80, // # # # #
0x3B, 0x80, // ### ###
0x3B, 0x80, // ### ###
0x31, 0x80, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1792 'X' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x31, 0x80, // ## ##
0x1B, 0x00, // ## ##
0x0E, 0x00, // ###
0x0E, 0x00, // ###
0x0E, 0x00, // ###
0x1B, 0x00, // ## ##
0x31, 0x80, // ## ##
0x7B, 0xC0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1824 'Y' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x79, 0xE0, // #### ####
0x30, 0xC0, // ## ##
0x19, 0x80, // ## ##
0x0F, 0x00, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x1F, 0x80, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1856 'Z' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0x80, // #######
0x21, 0x80, // # ##
0x23, 0x00, // # ##
0x06, 0x00, // ##
0x04, 0x00, // #
0x0C, 0x00, // ##
0x18, 0x80, // ## #
0x30, 0x80, // ## #
0x3F, 0x80, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1888 '[' (11 pixels wide)
0x00, 0x00, //
0x07, 0x80, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x07, 0x80, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1920 '\' (11 pixels wide)
0x30, 0x00, // ##
0x30, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1952 ']' (11 pixels wide)
0x00, 0x00, //
0x1E, 0x00, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x1E, 0x00, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1984 '^' (11 pixels wide)
0x04, 0x00, // #
0x0A, 0x00, // # #
0x0A, 0x00, // # #
0x11, 0x00, // # #
0x20, 0x80, // # #
0x20, 0x80, // # #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2016 '_' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0xFF, 0xE0, // ###########
// @2048 '`' (11 pixels wide)
0x08, 0x00, // #
0x04, 0x00, // #
0x02, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2080 'a' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x01, 0x80, // ##
0x01, 0x80, // ##
0x1F, 0x80, // ######
0x31, 0x80, // ## ##
0x33, 0x80, // ## ###
0x1D, 0xC0, // ### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2112 'b' (11 pixels wide)
0x00, 0x00, //
0x70, 0x00, // ###
0x30, 0x00, // ##
0x30, 0x00, // ##
0x37, 0x00, // ## ###
0x39, 0x80, // ### ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x39, 0x80, // ### ##
0x77, 0x00, // ### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2144 'c' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1E, 0x80, // #### #
0x31, 0x80, // ## ##
0x60, 0x80, // ## #
0x60, 0x00, // ##
0x60, 0x80, // ## #
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2176 'd' (11 pixels wide)
0x00, 0x00, //
0x03, 0x80, // ###
0x01, 0x80, // ##
0x01, 0x80, // ##
0x1D, 0x80, // ### ##
0x33, 0x80, // ## ###
0x61, 0x80, // ## ##
0x61, 0x80, // ## ##
0x61, 0x80, // ## ##
0x33, 0x80, // ## ###
0x1D, 0xC0, // ### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2208 'e' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x60, 0xC0, // ## ##
0x7F, 0xC0, // #########
0x60, 0x00, // ##
0x30, 0xC0, // ## ##
0x1F, 0x80, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2240 'f' (11 pixels wide)
0x00, 0x00, //
0x07, 0xE0, // ######
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x3F, 0x80, // #######
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x3F, 0x80, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2272 'g' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1D, 0xC0, // ### ###
0x33, 0x80, // ## ###
0x61, 0x80, // ## ##
0x61, 0x80, // ## ##
0x61, 0x80, // ## ##
0x33, 0x80, // ## ###
0x1D, 0x80, // ### ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
// @2304 'h' (11 pixels wide)
0x00, 0x00, //
0x70, 0x00, // ###
0x30, 0x00, // ##
0x30, 0x00, // ##
0x37, 0x00, // ## ###
0x39, 0x80, // ### ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x7B, 0xC0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2336 'i' (11 pixels wide)
0x00, 0x00, //
0x06, 0x00, // ##
0x06, 0x00, // ##
0x00, 0x00, //
0x1E, 0x00, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x3F, 0xC0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2368 'j' (11 pixels wide)
0x00, 0x00, //
0x06, 0x00, // ##
0x06, 0x00, // ##
0x00, 0x00, //
0x3F, 0x00, // ######
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x3E, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
// @2400 'k' (11 pixels wide)
0x00, 0x00, //
0x70, 0x00, // ###
0x30, 0x00, // ##
0x30, 0x00, // ##
0x37, 0x80, // ## ####
0x36, 0x00, // ## ##
0x3C, 0x00, // ####
0x3C, 0x00, // ####
0x36, 0x00, // ## ##
0x33, 0x00, // ## ##
0x77, 0xC0, // ### #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2432 'l' (11 pixels wide)
0x00, 0x00, //
0x1E, 0x00, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x3F, 0xC0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2464 'm' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x80, // ########
0x36, 0xC0, // ## ## ##
0x36, 0xC0, // ## ## ##
0x36, 0xC0, // ## ## ##
0x36, 0xC0, // ## ## ##
0x36, 0xC0, // ## ## ##
0x76, 0xE0, // ### ## ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2496 'n' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x77, 0x00, // ### ###
0x39, 0x80, // ### ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x7B, 0xC0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2528 'o' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x31, 0x80, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x60, 0xC0, // ## ##
0x31, 0x80, // ## ##
0x1F, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2560 'p' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x77, 0x00, // ### ###
0x39, 0x80, // ### ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x39, 0x80, // ### ##
0x37, 0x00, // ## ###
0x30, 0x00, // ##
0x30, 0x00, // ##
0x7C, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
// @2592 'q' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1D, 0xC0, // ### ###
0x33, 0x80, // ## ###
0x61, 0x80, // ## ##
0x61, 0x80, // ## ##
0x61, 0x80, // ## ##
0x33, 0x80, // ## ###
0x1D, 0x80, // ### ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x07, 0xC0, // #####
0x00, 0x00, //
0x00, 0x00, //
// @2624 'r' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0x80, // #### ###
0x1C, 0xC0, // ### ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x7F, 0x00, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2656 's' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x80, // ######
0x31, 0x80, // ## ##
0x3C, 0x00, // ####
0x1F, 0x00, // #####
0x03, 0x80, // ###
0x31, 0x80, // ## ##
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2688 't' (11 pixels wide)
0x00, 0x00, //
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x7F, 0x00, // #######
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x80, // ## #
0x0F, 0x00, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2720 'u' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x73, 0x80, // ### ###
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x33, 0x80, // ## ###
0x1D, 0xC0, // ### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2752 'v' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x31, 0x80, // ## ##
0x31, 0x80, // ## ##
0x1B, 0x00, // ## ##
0x1B, 0x00, // ## ##
0x0E, 0x00, // ###
0x0E, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2784 'w' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0xF1, 0xE0, // #### ####
0x60, 0xC0, // ## ##
0x64, 0xC0, // ## # ##
0x6E, 0xC0, // ## ### ##
0x3B, 0x80, // ### ###
0x3B, 0x80, // ### ###
0x31, 0x80, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2816 'x' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7B, 0xC0, // #### ####
0x1B, 0x00, // ## ##
0x0E, 0x00, // ###
0x0E, 0x00, // ###
0x0E, 0x00, // ###
0x1B, 0x00, // ## ##
0x7B, 0xC0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2848 'y' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x79, 0xE0, // #### ####
0x30, 0xC0, // ## ##
0x19, 0x80, // ## ##
0x19, 0x80, // ## ##
0x0B, 0x00, // # ##
0x0F, 0x00, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x3E, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
// @2880 'z' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0x80, // #######
0x21, 0x80, // # ##
0x03, 0x00, // ##
0x0E, 0x00, // ###
0x18, 0x00, // ##
0x30, 0x80, // ## #
0x3F, 0x80, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2912 '{' (11 pixels wide)
0x00, 0x00, //
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x18, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2944 '|' (11 pixels wide)
0x00, 0x00, //
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2976 '}' (11 pixels wide)
0x00, 0x00, //
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3008 '~' (11 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x18, 0x00, // ##
0x24, 0x80, // # # #
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
};
sFONT Font16 = {
Font16_Table,
11, /* Width */
16, /* Height */
};
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**
******************************************************************************
* @file font20.c
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief This file provides text font20 for STM32xx-EVAL's LCD driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fonts.h"
// Character bitmaps for Courier New 15pt
const uint8_t Font20_Table[] =
{
// @0 ' ' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @40 '!' (14 pixels wide)
0x00, 0x00, //
0x07, 0x00, // ###
0x07, 0x00, // ###
0x07, 0x00, // ###
0x07, 0x00, // ###
0x07, 0x00, // ###
0x07, 0x00, // ###
0x07, 0x00, // ###
0x02, 0x00, // #
0x02, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x00, // ###
0x07, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @80 '"' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1C, 0xE0, // ### ###
0x1C, 0xE0, // ### ###
0x1C, 0xE0, // ### ###
0x08, 0x40, // # #
0x08, 0x40, // # #
0x08, 0x40, // # #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @120 '#' (14 pixels wide)
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @160 '$' (14 pixels wide)
0x03, 0x00, // ##
0x03, 0x00, // ##
0x07, 0xE0, // ######
0x0F, 0xE0, // #######
0x18, 0x60, // ## ##
0x18, 0x00, // ##
0x1F, 0x00, // #####
0x0F, 0xC0, // ######
0x00, 0xE0, // ###
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x1F, 0xC0, // #######
0x1F, 0x80, // ######
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @200 '%' (14 pixels wide)
0x00, 0x00, //
0x1C, 0x00, // ###
0x22, 0x00, // # #
0x22, 0x00, // # #
0x22, 0x00, // # #
0x1C, 0x60, // ### ##
0x01, 0xE0, // ####
0x0F, 0x80, // #####
0x3C, 0x00, // ####
0x31, 0xC0, // ## ###
0x02, 0x20, // # #
0x02, 0x20, // # #
0x02, 0x20, // # #
0x01, 0xC0, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @240 '&' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0xE0, // #####
0x0F, 0xE0, // #######
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x0F, 0x30, // #### ##
0x1F, 0xF0, // #########
0x19, 0xE0, // ## ####
0x18, 0xC0, // ## ##
0x1F, 0xF0, // #########
0x07, 0xB0, // #### ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @280 ''' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x80, // ###
0x03, 0x80, // ###
0x03, 0x80, // ###
0x01, 0x00, // #
0x01, 0x00, // #
0x01, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @320 '(' (14 pixels wide)
0x00, 0x00, //
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @360 ')' (14 pixels wide)
0x00, 0x00, //
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @400 '*' (14 pixels wide)
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x1B, 0x60, // ## ## ##
0x1F, 0xE0, // ########
0x07, 0x80, // ####
0x07, 0x80, // ####
0x0F, 0xC0, // ######
0x0C, 0xC0, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @440 '+' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @480 ',' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x80, // ###
0x03, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x04, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @520 '-' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xE0, // #########
0x3F, 0xE0, // #########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @560 '.' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x80, // ###
0x03, 0x80, // ###
0x03, 0x80, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @600 '/' (14 pixels wide)
0x00, 0x60, // ##
0x00, 0x60, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @640 '0' (14 pixels wide)
0x00, 0x00, //
0x0F, 0x80, // #####
0x1F, 0xC0, // #######
0x18, 0xC0, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x18, 0xC0, // ## ##
0x1F, 0xC0, // #######
0x0F, 0x80, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @680 '1' (14 pixels wide)
0x00, 0x00, //
0x03, 0x00, // ##
0x1F, 0x00, // #####
0x1F, 0x00, // #####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @720 '2' (14 pixels wide)
0x00, 0x00, //
0x0F, 0x80, // #####
0x1F, 0xC0, // #######
0x38, 0xE0, // ### ###
0x30, 0x60, // ## ##
0x00, 0x60, // ##
0x00, 0xC0, // ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x18, 0x00, // ##
0x3F, 0xE0, // #########
0x3F, 0xE0, // #########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @760 '3' (14 pixels wide)
0x00, 0x00, //
0x0F, 0x80, // #####
0x3F, 0xC0, // ########
0x30, 0xE0, // ## ###
0x00, 0x60, // ##
0x00, 0xE0, // ###
0x07, 0xC0, // #####
0x07, 0xC0, // #####
0x00, 0xE0, // ###
0x00, 0x60, // ##
0x00, 0x60, // ##
0x60, 0xE0, // ## ###
0x7F, 0xC0, // #########
0x3F, 0x80, // #######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @800 '4' (14 pixels wide)
0x00, 0x00, //
0x01, 0xC0, // ###
0x03, 0xC0, // ####
0x03, 0xC0, // ####
0x06, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x18, 0xC0, // ## ##
0x30, 0xC0, // ## ##
0x3F, 0xE0, // #########
0x3F, 0xE0, // #########
0x00, 0xC0, // ##
0x03, 0xE0, // #####
0x03, 0xE0, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @840 '5' (14 pixels wide)
0x00, 0x00, //
0x1F, 0xC0, // #######
0x1F, 0xC0, // #######
0x18, 0x00, // ##
0x18, 0x00, // ##
0x1F, 0x80, // ######
0x1F, 0xC0, // #######
0x18, 0xE0, // ## ###
0x00, 0x60, // ##
0x00, 0x60, // ##
0x00, 0x60, // ##
0x30, 0xE0, // ## ###
0x3F, 0xC0, // ########
0x1F, 0x80, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @880 '6' (14 pixels wide)
0x00, 0x00, //
0x03, 0xE0, // #####
0x0F, 0xE0, // #######
0x1E, 0x00, // ####
0x18, 0x00, // ##
0x38, 0x00, // ###
0x37, 0x80, // ## ####
0x3F, 0xC0, // ########
0x38, 0xE0, // ### ###
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x18, 0xE0, // ## ###
0x1F, 0xC0, // #######
0x07, 0x80, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @920 '7' (14 pixels wide)
0x00, 0x00, //
0x3F, 0xE0, // #########
0x3F, 0xE0, // #########
0x30, 0x60, // ## ##
0x00, 0x60, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @960 '8' (14 pixels wide)
0x00, 0x00, //
0x0F, 0x80, // #####
0x1F, 0xC0, // #######
0x38, 0xE0, // ### ###
0x30, 0x60, // ## ##
0x38, 0xE0, // ### ###
0x1F, 0xC0, // #######
0x1F, 0xC0, // #######
0x38, 0xE0, // ### ###
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x38, 0xE0, // ### ###
0x1F, 0xC0, // #######
0x0F, 0x80, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1000 '9' (14 pixels wide)
0x00, 0x00, //
0x0F, 0x00, // ####
0x1F, 0xC0, // #######
0x38, 0xC0, // ### ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x38, 0xE0, // ### ###
0x1F, 0xE0, // ########
0x0F, 0x60, // #### ##
0x00, 0xE0, // ###
0x00, 0xC0, // ##
0x03, 0xC0, // ####
0x3F, 0x80, // #######
0x3E, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1040 ':' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x80, // ###
0x03, 0x80, // ###
0x03, 0x80, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x80, // ###
0x03, 0x80, // ###
0x03, 0x80, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1080 ';' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x01, 0xC0, // ###
0x01, 0xC0, // ###
0x01, 0xC0, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x03, 0x80, // ###
0x03, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x04, 0x00, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1120 '<' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x30, // ##
0x00, 0xF0, // ####
0x03, 0xC0, // ####
0x07, 0x00, // ###
0x1C, 0x00, // ###
0x78, 0x00, // ####
0x1C, 0x00, // ###
0x07, 0x00, // ###
0x03, 0xC0, // ####
0x00, 0xF0, // ####
0x00, 0x30, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1160 '=' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0xF0, // ###########
0x7F, 0xF0, // ###########
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0xF0, // ###########
0x7F, 0xF0, // ###########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1200 '>' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x30, 0x00, // ##
0x3C, 0x00, // ####
0x0F, 0x00, // ####
0x03, 0x80, // ###
0x00, 0xE0, // ###
0x00, 0x78, // ####
0x00, 0xE0, // ###
0x03, 0x80, // ###
0x0F, 0x00, // ####
0x3C, 0x00, // ####
0x30, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1240 '?' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x0F, 0x80, // #####
0x1F, 0xC0, // #######
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x00, 0x60, // ##
0x01, 0xC0, // ###
0x03, 0x80, // ###
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x00, // ###
0x07, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1280 '@' (14 pixels wide)
0x00, 0x00, //
0x03, 0x80, // ###
0x0C, 0x80, // ## #
0x08, 0x40, // # #
0x10, 0x40, // # #
0x10, 0x40, // # #
0x11, 0xC0, // # ###
0x12, 0x40, // # # #
0x12, 0x40, // # # #
0x12, 0x40, // # # #
0x11, 0xC0, // # ###
0x10, 0x00, // #
0x08, 0x00, // #
0x08, 0x40, // # #
0x07, 0x80, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1320 'A' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x80, // ######
0x1F, 0x80, // ######
0x03, 0x80, // ###
0x06, 0xC0, // ## ##
0x06, 0xC0, // ## ##
0x0C, 0xC0, // ## ##
0x0C, 0x60, // ## ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x30, 0x30, // ## ##
0x78, 0x78, // #### ####
0x78, 0x78, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1360 'B' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0x80, // #######
0x3F, 0xC0, // ########
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0xE0, // ## ###
0x1F, 0xC0, // #######
0x1F, 0xE0, // ########
0x18, 0x70, // ## ###
0x18, 0x30, // ## ##
0x18, 0x30, // ## ##
0x3F, 0xF0, // ##########
0x3F, 0xE0, // #########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1400 'C' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x07, 0xB0, // #### ##
0x0F, 0xF0, // ########
0x1C, 0x70, // ### ###
0x38, 0x30, // ### ##
0x30, 0x00, // ##
0x30, 0x00, // ##
0x30, 0x00, // ##
0x30, 0x00, // ##
0x38, 0x30, // ### ##
0x1C, 0x70, // ### ###
0x0F, 0xE0, // #######
0x07, 0xC0, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1440 'D' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7F, 0x80, // ########
0x7F, 0xC0, // #########
0x30, 0xE0, // ## ###
0x30, 0x70, // ## ###
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x70, // ## ###
0x30, 0xE0, // ## ###
0x7F, 0xC0, // #########
0x7F, 0x80, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1480 'E' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x18, 0x30, // ## ##
0x18, 0x30, // ## ##
0x19, 0x80, // ## ##
0x1F, 0x80, // ######
0x1F, 0x80, // ######
0x19, 0x80, // ## ##
0x18, 0x30, // ## ##
0x18, 0x30, // ## ##
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1520 'F' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x18, 0x30, // ## ##
0x18, 0x30, // ## ##
0x19, 0x80, // ## ##
0x1F, 0x80, // ######
0x1F, 0x80, // ######
0x19, 0x80, // ## ##
0x18, 0x00, // ##
0x18, 0x00, // ##
0x3F, 0x00, // ######
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1560 'G' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x07, 0xB0, // #### ##
0x1F, 0xF0, // #########
0x18, 0x70, // ## ###
0x30, 0x30, // ## ##
0x30, 0x00, // ##
0x30, 0x00, // ##
0x31, 0xF8, // ## ######
0x31, 0xF8, // ## ######
0x30, 0x30, // ## ##
0x18, 0x30, // ## ##
0x1F, 0xF0, // #########
0x07, 0xC0, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1600 'H' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1640 'I' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1680 'J' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x03, 0xF8, // #######
0x03, 0xF8, // #######
0x00, 0x60, // ##
0x00, 0x60, // ##
0x00, 0x60, // ##
0x00, 0x60, // ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x30, 0xE0, // ## ###
0x3F, 0xC0, // ########
0x0F, 0x80, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1720 'K' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3E, 0xF8, // ##### #####
0x3E, 0xF8, // ##### #####
0x18, 0xE0, // ## ###
0x19, 0x80, // ## ##
0x1B, 0x00, // ## ##
0x1F, 0x00, // #####
0x1D, 0x80, // ### ##
0x18, 0xC0, // ## ##
0x18, 0xC0, // ## ##
0x18, 0x60, // ## ##
0x3E, 0x78, // ##### ####
0x3E, 0x38, // ##### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1760 'L' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0x00, // ######
0x3F, 0x00, // ######
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x30, // ## ##
0x0C, 0x30, // ## ##
0x0C, 0x30, // ## ##
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1800 'M' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x78, 0x78, // #### ####
0x78, 0x78, // #### ####
0x38, 0x70, // ### ###
0x3C, 0xF0, // #### ####
0x34, 0xB0, // ## # # ##
0x37, 0xB0, // ## #### ##
0x37, 0xB0, // ## #### ##
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x30, 0x30, // ## ##
0x7C, 0xF8, // ##### #####
0x7C, 0xF8, // ##### #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1840 'N' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x39, 0xF0, // ### #####
0x3D, 0xF0, // #### #####
0x1C, 0x60, // ### ##
0x1E, 0x60, // #### ##
0x1E, 0x60, // #### ##
0x1B, 0x60, // ## ## ##
0x1B, 0x60, // ## ## ##
0x19, 0xE0, // ## ####
0x19, 0xE0, // ## ####
0x18, 0xE0, // ## ###
0x3E, 0xE0, // ##### ###
0x3E, 0x60, // ##### ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1880 'O' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x80, // ####
0x0F, 0xC0, // ######
0x1C, 0xE0, // ### ###
0x38, 0x70, // ### ###
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x38, 0x70, // ### ###
0x1C, 0xE0, // ### ###
0x0F, 0xC0, // ######
0x07, 0x80, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1920 'P' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xC0, // ########
0x3F, 0xE0, // #########
0x18, 0x70, // ## ###
0x18, 0x30, // ## ##
0x18, 0x30, // ## ##
0x18, 0x70, // ## ###
0x1F, 0xE0, // ########
0x1F, 0xC0, // #######
0x18, 0x00, // ##
0x18, 0x00, // ##
0x3F, 0x00, // ######
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @1960 'Q' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x80, // ####
0x0F, 0xC0, // ######
0x1C, 0xE0, // ### ###
0x38, 0x70, // ### ###
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x38, 0x70, // ### ###
0x1C, 0xE0, // ### ###
0x0F, 0xC0, // ######
0x07, 0x80, // ####
0x07, 0xB0, // #### ##
0x0F, 0xF0, // ########
0x0C, 0xE0, // ## ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2000 'R' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xC0, // ########
0x3F, 0xE0, // #########
0x18, 0x70, // ## ###
0x18, 0x30, // ## ##
0x18, 0x70, // ## ###
0x1F, 0xE0, // ########
0x1F, 0xC0, // #######
0x18, 0xE0, // ## ###
0x18, 0x60, // ## ##
0x18, 0x70, // ## ###
0x3E, 0x38, // ##### ###
0x3E, 0x18, // ##### ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2040 'S' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x0F, 0xB0, // ##### ##
0x1F, 0xF0, // #########
0x38, 0x70, // ### ###
0x30, 0x30, // ## ##
0x38, 0x00, // ###
0x1F, 0x80, // ######
0x07, 0xE0, // ######
0x00, 0x70, // ###
0x30, 0x30, // ## ##
0x38, 0x70, // ### ###
0x3F, 0xE0, // #########
0x37, 0xC0, // ## #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2080 'T' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x0F, 0xC0, // ######
0x0F, 0xC0, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2120 'U' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x1C, 0xE0, // ### ###
0x0F, 0xC0, // ######
0x07, 0x80, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2160 'V' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x78, 0xF0, // #### ####
0x78, 0xF0, // #### ####
0x30, 0x60, // ## ##
0x30, 0x60, // ## ##
0x18, 0xC0, // ## ##
0x18, 0xC0, // ## ##
0x0D, 0x80, // ## ##
0x0D, 0x80, // ## ##
0x0D, 0x80, // ## ##
0x07, 0x00, // ###
0x07, 0x00, // ###
0x07, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2200 'W' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x7C, 0x7C, // ##### #####
0x7C, 0x7C, // ##### #####
0x30, 0x18, // ## ##
0x33, 0x98, // ## ### ##
0x33, 0x98, // ## ### ##
0x33, 0x98, // ## ### ##
0x36, 0xD8, // ## ## ## ##
0x16, 0xD0, // # ## ## #
0x1C, 0x70, // ### ###
0x1C, 0x70, // ### ###
0x1C, 0x70, // ### ###
0x18, 0x30, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2240 'X' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x78, 0xF0, // #### ####
0x78, 0xF0, // #### ####
0x30, 0x60, // ## ##
0x18, 0xC0, // ## ##
0x0D, 0x80, // ## ##
0x07, 0x00, // ###
0x07, 0x00, // ###
0x0D, 0x80, // ## ##
0x18, 0xC0, // ## ##
0x30, 0x60, // ## ##
0x78, 0xF0, // #### ####
0x78, 0xF0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2280 'Y' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x18, 0x60, // ## ##
0x0C, 0xC0, // ## ##
0x07, 0x80, // ####
0x07, 0x80, // ####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x0F, 0xC0, // ######
0x0F, 0xC0, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2320 'Z' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x18, 0x60, // ## ##
0x18, 0xC0, // ## ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x60, // ## ##
0x18, 0x60, // ## ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2360 '[' (14 pixels wide)
0x00, 0x00, //
0x03, 0xC0, // ####
0x03, 0xC0, // ####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0xC0, // ####
0x03, 0xC0, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2400 '\' (14 pixels wide)
0x18, 0x00, // ##
0x18, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x01, 0x80, // ##
0x01, 0x80, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0x60, // ##
0x00, 0x60, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2440 ']' (14 pixels wide)
0x00, 0x00, //
0x0F, 0x00, // ####
0x0F, 0x00, // ####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x0F, 0x00, // ####
0x0F, 0x00, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2480 '^' (14 pixels wide)
0x00, 0x00, //
0x02, 0x00, // #
0x07, 0x00, // ###
0x0D, 0x80, // ## ##
0x18, 0xC0, // ## ##
0x30, 0x60, // ## ##
0x20, 0x20, // # #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2520 '_' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0xFF, 0xFC, // ##############
0xFF, 0xFC, // ##############
// @2560 '`' (14 pixels wide)
0x00, 0x00, //
0x04, 0x00, // #
0x03, 0x00, // ##
0x00, 0x80, // #
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2600 'a' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x0F, 0xC0, // ######
0x1F, 0xE0, // ########
0x00, 0x60, // ##
0x0F, 0xE0, // #######
0x1F, 0xE0, // ########
0x38, 0x60, // ### ##
0x30, 0xE0, // ## ###
0x3F, 0xF0, // ##########
0x1F, 0x70, // ##### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2640 'b' (14 pixels wide)
0x00, 0x00, //
0x70, 0x00, // ###
0x70, 0x00, // ###
0x30, 0x00, // ##
0x30, 0x00, // ##
0x37, 0x80, // ## ####
0x3F, 0xE0, // #########
0x38, 0x60, // ### ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x38, 0x60, // ### ##
0x7F, 0xE0, // ##########
0x77, 0x80, // ### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2680 'c' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x07, 0xB0, // #### ##
0x1F, 0xF0, // #########
0x18, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x00, // ##
0x30, 0x00, // ##
0x38, 0x30, // ### ##
0x1F, 0xF0, // #########
0x0F, 0xC0, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2720 'd' (14 pixels wide)
0x00, 0x00, //
0x00, 0x70, // ###
0x00, 0x70, // ###
0x00, 0x30, // ##
0x00, 0x30, // ##
0x07, 0xB0, // #### ##
0x1F, 0xF0, // #########
0x18, 0x70, // ## ###
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x38, 0x70, // ### ###
0x1F, 0xF8, // ##########
0x07, 0xB8, // #### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2760 'e' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x80, // ####
0x1F, 0xE0, // ########
0x18, 0x60, // ## ##
0x3F, 0xF0, // ##########
0x3F, 0xF0, // ##########
0x30, 0x00, // ##
0x18, 0x30, // ## ##
0x1F, 0xF0, // #########
0x07, 0xC0, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2800 'f' (14 pixels wide)
0x00, 0x00, //
0x03, 0xF0, // ######
0x07, 0xF0, // #######
0x06, 0x00, // ##
0x06, 0x00, // ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2840 'g' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x07, 0xB8, // #### ###
0x1F, 0xF8, // ##########
0x18, 0x70, // ## ###
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x18, 0x70, // ## ###
0x1F, 0xF0, // #########
0x07, 0xB0, // #### ##
0x00, 0x30, // ##
0x00, 0x70, // ###
0x0F, 0xE0, // #######
0x0F, 0xC0, // ######
0x00, 0x00, //
0x00, 0x00, //
// @2880 'h' (14 pixels wide)
0x00, 0x00, //
0x38, 0x00, // ###
0x38, 0x00, // ###
0x18, 0x00, // ##
0x18, 0x00, // ##
0x1B, 0xC0, // ## ####
0x1F, 0xE0, // ########
0x1C, 0x60, // ### ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2920 'i' (14 pixels wide)
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0x00, // #####
0x1F, 0x00, // #####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @2960 'j' (14 pixels wide)
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0xC0, // #######
0x1F, 0xC0, // #######
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x00, 0xC0, // ##
0x01, 0xC0, // ###
0x3F, 0x80, // #######
0x3F, 0x00, // ######
0x00, 0x00, //
0x00, 0x00, //
// @3000 'k' (14 pixels wide)
0x00, 0x00, //
0x38, 0x00, // ###
0x38, 0x00, // ###
0x18, 0x00, // ##
0x18, 0x00, // ##
0x1B, 0xE0, // ## #####
0x1B, 0xE0, // ## #####
0x1B, 0x00, // ## ##
0x1E, 0x00, // ####
0x1E, 0x00, // ####
0x1B, 0x00, // ## ##
0x19, 0x80, // ## ##
0x39, 0xF0, // ### #####
0x39, 0xF0, // ### #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3040 'l' (14 pixels wide)
0x00, 0x00, //
0x1F, 0x00, // #####
0x1F, 0x00, // #####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3080 'm' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x7E, 0xE0, // ###### ###
0x7F, 0xF0, // ###########
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x33, 0x30, // ## ## ##
0x7B, 0xB8, // #### ### ###
0x7B, 0xB8, // #### ### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3120 'n' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x3B, 0xC0, // ### ####
0x3F, 0xE0, // #########
0x1C, 0x60, // ### ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3160 'o' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x07, 0x80, // ####
0x1F, 0xE0, // ########
0x18, 0x60, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x18, 0x60, // ## ##
0x1F, 0xE0, // ########
0x07, 0x80, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3200 'p' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x77, 0x80, // ### ####
0x7F, 0xE0, // ##########
0x38, 0x60, // ### ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x38, 0x60, // ### ##
0x3F, 0xE0, // #########
0x37, 0x80, // ## ####
0x30, 0x00, // ##
0x30, 0x00, // ##
0x7C, 0x00, // #####
0x7C, 0x00, // #####
0x00, 0x00, //
0x00, 0x00, //
// @3240 'q' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x07, 0xB8, // #### ###
0x1F, 0xF8, // ##########
0x18, 0x70, // ## ###
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x30, 0x30, // ## ##
0x18, 0x70, // ## ###
0x1F, 0xF0, // #########
0x07, 0xB0, // #### ##
0x00, 0x30, // ##
0x00, 0x30, // ##
0x00, 0xF8, // #####
0x00, 0xF8, // #####
0x00, 0x00, //
0x00, 0x00, //
// @3280 'r' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x3C, 0xE0, // #### ###
0x3D, 0xF0, // #### #####
0x0F, 0x30, // #### ##
0x0E, 0x00, // ###
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x3F, 0xC0, // ########
0x3F, 0xC0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3320 's' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x07, 0xE0, // ######
0x1F, 0xE0, // ########
0x18, 0x60, // ## ##
0x1E, 0x00, // ####
0x0F, 0xC0, // ######
0x01, 0xE0, // ####
0x18, 0x60, // ## ##
0x1F, 0xE0, // ########
0x1F, 0x80, // ######
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3360 't' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x3F, 0xE0, // #########
0x3F, 0xE0, // #########
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x00, // ##
0x0C, 0x30, // ## ##
0x0F, 0xF0, // ########
0x07, 0xC0, // #####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3400 'u' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x38, 0xE0, // ### ###
0x38, 0xE0, // ### ###
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0x60, // ## ##
0x18, 0xE0, // ## ###
0x1F, 0xF0, // #########
0x0F, 0x70, // #### ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3440 'v' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x78, 0xF0, // #### ####
0x78, 0xF0, // #### ####
0x30, 0x60, // ## ##
0x18, 0xC0, // ## ##
0x18, 0xC0, // ## ##
0x0D, 0x80, // ## ##
0x0D, 0x80, // ## ##
0x07, 0x00, // ###
0x07, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3480 'w' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x78, 0xF0, // #### ####
0x78, 0xF0, // #### ####
0x32, 0x60, // ## # ##
0x32, 0x60, // ## # ##
0x37, 0xE0, // ## ######
0x1D, 0xC0, // ### ###
0x1D, 0xC0, // ### ###
0x18, 0xC0, // ## ##
0x18, 0xC0, // ## ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3520 'x' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x0C, 0xC0, // ## ##
0x07, 0x80, // ####
0x03, 0x00, // ##
0x07, 0x80, // ####
0x0C, 0xC0, // ## ##
0x3C, 0xF0, // #### ####
0x3C, 0xF0, // #### ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3560 'y' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x78, 0xF0, // #### ####
0x78, 0xF0, // #### ####
0x30, 0x60, // ## ##
0x18, 0xC0, // ## ##
0x18, 0xC0, // ## ##
0x0D, 0x80, // ## ##
0x0F, 0x80, // #####
0x07, 0x00, // ###
0x06, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x00, // ##
0x7F, 0x00, // #######
0x7F, 0x00, // #######
0x00, 0x00, //
0x00, 0x00, //
// @3600 'z' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x18, 0xC0, // ## ##
0x01, 0x80, // ##
0x03, 0x00, // ##
0x06, 0x00, // ##
0x0C, 0x60, // ## ##
0x1F, 0xE0, // ########
0x1F, 0xE0, // ########
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3640 '{' (14 pixels wide)
0x00, 0x00, //
0x01, 0xC0, // ###
0x03, 0xC0, // ####
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x07, 0x00, // ###
0x0E, 0x00, // ###
0x07, 0x00, // ###
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0xC0, // ####
0x01, 0xC0, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3680 '|' (14 pixels wide)
0x00, 0x00, //
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x03, 0x00, // ##
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3720 '}' (14 pixels wide)
0x00, 0x00, //
0x1C, 0x00, // ###
0x1E, 0x00, // ####
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x07, 0x00, // ###
0x03, 0x80, // ###
0x07, 0x00, // ###
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x06, 0x00, // ##
0x1E, 0x00, // ####
0x1C, 0x00, // ###
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
// @3760 '~' (14 pixels wide)
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x0E, 0x00, // ###
0x3F, 0x30, // ###### ##
0x33, 0xF0, // ## ######
0x01, 0xE0, // ####
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
0x00, 0x00, //
};
sFONT Font20 = {
Font20_Table,
14, /* Width */
20, /* Height */
};
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**
******************************************************************************
* @file font24.c
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief This file provides text font24 for STM32xx-EVAL's LCD driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fonts.h"
const uint8_t Font24_Table [] =
{
// @0 ' ' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @72 '!' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x01, 0x00, 0x00, // #
0x01, 0x00, 0x00, // #
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @144 '"' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x0E, 0x70, 0x00, // ### ###
0x0E, 0x70, 0x00, // ### ###
0x0E, 0x70, 0x00, // ### ###
0x04, 0x20, 0x00, // # #
0x04, 0x20, 0x00, // # #
0x04, 0x20, 0x00, // # #
0x04, 0x20, 0x00, // # #
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @216 '#' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x3F, 0xF8, 0x00, // ###########
0x3F, 0xF8, 0x00, // ###########
0x06, 0x60, 0x00, // ## ##
0x0C, 0xC0, 0x00, // ## ##
0x3F, 0xF8, 0x00, // ###########
0x3F, 0xF8, 0x00, // ###########
0x0C, 0xC0, 0x00, // ## ##
0x0C, 0xC0, 0x00, // ## ##
0x0C, 0xC0, 0x00, // ## ##
0x0C, 0xC0, 0x00, // ## ##
0x0C, 0xC0, 0x00, // ## ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @288 '$' (17 pixels wide)
0x00, 0x00, 0x00, //
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x07, 0xB0, 0x00, // #### ##
0x0F, 0xF0, 0x00, // ########
0x18, 0x70, 0x00, // ## ###
0x18, 0x70, 0x00, // ## ###
0x1C, 0x00, 0x00, // ###
0x0F, 0x80, 0x00, // #####
0x07, 0xE0, 0x00, // ######
0x00, 0xF0, 0x00, // ####
0x18, 0x30, 0x00, // ## ##
0x1C, 0x30, 0x00, // ### ##
0x1C, 0x70, 0x00, // ### ###
0x1F, 0xE0, 0x00, // ########
0x1B, 0xC0, 0x00, // ## ####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @360 '%' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0x80, 0x00, // ####
0x0F, 0xC0, 0x00, // ######
0x1C, 0xE0, 0x00, // ### ###
0x18, 0x60, 0x00, // ## ##
0x18, 0x60, 0x00, // ## ##
0x1C, 0xE0, 0x00, // ### ###
0x0F, 0xF8, 0x00, // #########
0x07, 0xE0, 0x00, // ######
0x1F, 0xF0, 0x00, // #########
0x07, 0x38, 0x00, // ### ###
0x06, 0x18, 0x00, // ## ##
0x06, 0x18, 0x00, // ## ##
0x07, 0x38, 0x00, // ### ###
0x03, 0xF0, 0x00, // ######
0x01, 0xE0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @432 '&' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xF0, 0x00, // ######
0x07, 0xF0, 0x00, // #######
0x0C, 0x60, 0x00, // ## ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x07, 0x00, 0x00, // ###
0x0F, 0x9C, 0x00, // ##### ###
0x1D, 0xFC, 0x00, // ### #######
0x18, 0xF0, 0x00, // ## ####
0x18, 0x70, 0x00, // ## ###
0x0F, 0xFC, 0x00, // ##########
0x07, 0xDC, 0x00, // ##### ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @504 ''' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x01, 0x00, 0x00, // #
0x01, 0x00, 0x00, // #
0x01, 0x00, 0x00, // #
0x01, 0x00, 0x00, // #
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @576 '(' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x18, 0x00, // ##
0x00, 0x38, 0x00, // ###
0x00, 0x70, 0x00, // ###
0x00, 0xF0, 0x00, // ####
0x00, 0xE0, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x00, 0x70, 0x00, // ###
0x00, 0x70, 0x00, // ###
0x00, 0x38, 0x00, // ###
0x00, 0x18, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @648 ')' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x18, 0x00, 0x00, // ##
0x1C, 0x00, 0x00, // ###
0x0E, 0x00, 0x00, // ###
0x0E, 0x00, 0x00, // ###
0x07, 0x00, 0x00, // ###
0x07, 0x00, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x07, 0x00, 0x00, // ###
0x07, 0x00, 0x00, // ###
0x0F, 0x00, 0x00, // ####
0x0E, 0x00, 0x00, // ###
0x1C, 0x00, 0x00, // ###
0x18, 0x00, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @720 '*' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x1D, 0xB8, 0x00, // ### ## ###
0x1F, 0xF8, 0x00, // ##########
0x07, 0xE0, 0x00, // ######
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @792 '+' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x3F, 0xFC, 0x00, // ############
0x3F, 0xFC, 0x00, // ############
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @864 ',' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xE0, 0x00, // ###
0x00, 0xC0, 0x00, // ##
0x01, 0xC0, 0x00, // ###
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @936 '-' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1008 '.' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1080 '/' (17 pixels wide)
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x38, 0x00, // ###
0x00, 0x30, 0x00, // ##
0x00, 0x70, 0x00, // ###
0x00, 0x60, 0x00, // ##
0x00, 0x60, 0x00, // ##
0x00, 0xC0, 0x00, // ##
0x00, 0xC0, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x0E, 0x00, 0x00, // ###
0x0C, 0x00, 0x00, // ##
0x1C, 0x00, 0x00, // ###
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1152 '0' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x07, 0xE0, 0x00, // ######
0x0C, 0x30, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x07, 0xE0, 0x00, // ######
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1224 '1' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x80, 0x00, // #
0x07, 0x80, 0x00, // ####
0x1F, 0x80, 0x00, // ######
0x1D, 0x80, 0x00, // ### ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1296 '2' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xC0, 0x00, // #####
0x1F, 0xF0, 0x00, // #########
0x38, 0x30, 0x00, // ### ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x00, 0x18, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x60, 0x00, // ##
0x01, 0xC0, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x06, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x3F, 0xF8, 0x00, // ###########
0x3F, 0xF8, 0x00, // ###########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1368 '3' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x0F, 0xE0, 0x00, // #######
0x0C, 0x70, 0x00, // ## ###
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x60, 0x00, // ##
0x03, 0xC0, 0x00, // ####
0x03, 0xE0, 0x00, // #####
0x00, 0x70, 0x00, // ###
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xF0, 0x00, // #########
0x0F, 0xC0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1440 '4' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xE0, 0x00, // ###
0x01, 0xE0, 0x00, // ####
0x01, 0xE0, 0x00, // ####
0x03, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x0C, 0x60, 0x00, // ## ##
0x0C, 0x60, 0x00, // ## ##
0x18, 0x60, 0x00, // ## ##
0x30, 0x60, 0x00, // ## ##
0x3F, 0xF8, 0x00, // ###########
0x3F, 0xF8, 0x00, // ###########
0x00, 0x60, 0x00, // ##
0x03, 0xF8, 0x00, // #######
0x03, 0xF8, 0x00, // #######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1512 '5' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF0, 0x00, // #########
0x1F, 0xF0, 0x00, // #########
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x1B, 0xC0, 0x00, // ## ####
0x1F, 0xF0, 0x00, // #########
0x1C, 0x30, 0x00, // ### ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x30, 0x30, 0x00, // ## ##
0x3F, 0xF0, 0x00, // ##########
0x0F, 0xC0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1584 '6' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xF8, 0x00, // #####
0x03, 0xF8, 0x00, // #######
0x07, 0x00, 0x00, // ###
0x0E, 0x00, 0x00, // ###
0x0C, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x1B, 0xC0, 0x00, // ## ####
0x1F, 0xF0, 0x00, // #########
0x1C, 0x30, 0x00, // ### ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x0C, 0x38, 0x00, // ## ###
0x0F, 0xF0, 0x00, // ########
0x03, 0xE0, 0x00, // #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1656 '7' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x18, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x70, 0x00, // ###
0x00, 0x60, 0x00, // ##
0x00, 0x60, 0x00, // ##
0x00, 0xE0, 0x00, // ###
0x00, 0xC0, 0x00, // ##
0x00, 0xC0, 0x00, // ##
0x01, 0xC0, 0x00, // ###
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1728 '8' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xE0, 0x00, // ######
0x0F, 0xF0, 0x00, // ########
0x1C, 0x38, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x07, 0xE0, 0x00, // ######
0x07, 0xE0, 0x00, // ######
0x0C, 0x30, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x1C, 0x38, 0x00, // ### ###
0x0F, 0xF0, 0x00, // ########
0x07, 0xE0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1800 '9' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xC0, 0x00, // #####
0x0F, 0xF0, 0x00, // ########
0x1C, 0x30, 0x00, // ### ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x0C, 0x38, 0x00, // ## ###
0x0F, 0xF8, 0x00, // #########
0x03, 0xD8, 0x00, // #### ##
0x00, 0x18, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x70, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x1F, 0xC0, 0x00, // #######
0x1F, 0x00, 0x00, // #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1872 ':' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @1944 ';' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xF0, 0x00, // ####
0x00, 0xF0, 0x00, // ####
0x00, 0xF0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xE0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x02, 0x00, 0x00, // #
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2016 '<' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x1C, 0x00, // ###
0x00, 0x3C, 0x00, // ####
0x00, 0xF0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x0F, 0x00, 0x00, // ####
0x3C, 0x00, 0x00, // ####
0xF0, 0x00, 0x00, // ####
0x3C, 0x00, 0x00, // ####
0x0F, 0x00, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x00, 0xF0, 0x00, // ####
0x00, 0x3C, 0x00, // ####
0x00, 0x1C, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2088 '=' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0xFC, 0x00, // #############
0x7F, 0xFC, 0x00, // #############
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0xFC, 0x00, // #############
0x7F, 0xFC, 0x00, // #############
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2160 '>' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x70, 0x00, 0x00, // ###
0x78, 0x00, 0x00, // ####
0x1E, 0x00, 0x00, // ####
0x07, 0x80, 0x00, // ####
0x01, 0xE0, 0x00, // ####
0x00, 0x78, 0x00, // ####
0x00, 0x1E, 0x00, // ####
0x00, 0x78, 0x00, // ####
0x01, 0xE0, 0x00, // ####
0x07, 0x80, 0x00, // ####
0x1E, 0x00, 0x00, // ####
0x78, 0x00, 0x00, // ####
0x70, 0x00, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2232 '?' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xC0, 0x00, // #####
0x0F, 0xE0, 0x00, // #######
0x18, 0x70, 0x00, // ## ###
0x18, 0x30, 0x00, // ## ##
0x18, 0x30, 0x00, // ## ##
0x00, 0x70, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x03, 0xC0, 0x00, // ####
0x03, 0x80, 0x00, // ###
0x03, 0x00, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, // ###
0x07, 0x00, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2304 '@' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xE0, 0x00, // #####
0x07, 0xF0, 0x00, // #######
0x0E, 0x38, 0x00, // ### ###
0x0C, 0x18, 0x00, // ## ##
0x18, 0x78, 0x00, // ## ####
0x18, 0xF8, 0x00, // ## #####
0x19, 0xD8, 0x00, // ## ### ##
0x19, 0x98, 0x00, // ## ## ##
0x19, 0x98, 0x00, // ## ## ##
0x19, 0x98, 0x00, // ## ## ##
0x18, 0xF8, 0x00, // ## #####
0x18, 0x78, 0x00, // ## ####
0x18, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0E, 0x18, 0x00, // ### ##
0x07, 0xF8, 0x00, // ########
0x03, 0xE0, 0x00, // #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2376 'A' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0x80, 0x00, // ######
0x1F, 0xC0, 0x00, // #######
0x01, 0xC0, 0x00, // ###
0x03, 0x60, 0x00, // ## ##
0x03, 0x60, 0x00, // ## ##
0x06, 0x30, 0x00, // ## ##
0x06, 0x30, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x0F, 0xF8, 0x00, // #########
0x1F, 0xF8, 0x00, // ##########
0x18, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0xFC, 0x7F, 0x00, // ###### #######
0xFC, 0x7F, 0x00, // ###### #######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2448 'B' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0xE0, 0x00, // ##########
0x7F, 0xF0, 0x00, // ###########
0x18, 0x38, 0x00, // ## ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xF0, 0x00, // #########
0x1F, 0xF8, 0x00, // ##########
0x18, 0x1C, 0x00, // ## ###
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x7F, 0xF8, 0x00, // ############
0x7F, 0xF0, 0x00, // ###########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2520 'C' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xEC, 0x00, // ##### ##
0x0F, 0xFC, 0x00, // ##########
0x1C, 0x1C, 0x00, // ### ###
0x18, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x18, 0x0C, 0x00, // ## ##
0x1C, 0x1C, 0x00, // ### ###
0x0F, 0xF8, 0x00, // #########
0x03, 0xF0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2592 'D' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0xC0, 0x00, // #########
0x7F, 0xF0, 0x00, // ###########
0x18, 0x38, 0x00, // ## ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x7F, 0xF0, 0x00, // ###########
0x7F, 0xE0, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2664 'E' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0xF8, 0x00, // ############
0x7F, 0xF8, 0x00, // ############
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x19, 0x98, 0x00, // ## ## ##
0x19, 0x80, 0x00, // ## ##
0x1F, 0x80, 0x00, // ######
0x1F, 0x80, 0x00, // ######
0x19, 0x80, 0x00, // ## ##
0x19, 0x98, 0x00, // ## ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x7F, 0xF8, 0x00, // ############
0x7F, 0xF8, 0x00, // ############
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2736 'F' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x3F, 0xFC, 0x00, // ############
0x3F, 0xFC, 0x00, // ############
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0xCC, 0x00, // ## ## ##
0x0C, 0xC0, 0x00, // ## ##
0x0F, 0xC0, 0x00, // ######
0x0F, 0xC0, 0x00, // ######
0x0C, 0xC0, 0x00, // ## ##
0x0C, 0xC0, 0x00, // ## ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x3F, 0xC0, 0x00, // ########
0x3F, 0xC0, 0x00, // ########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2808 'G' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xEC, 0x00, // ##### ##
0x0F, 0xFC, 0x00, // ##########
0x1C, 0x1C, 0x00, // ### ###
0x18, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x30, 0xFE, 0x00, // ## #######
0x30, 0xFE, 0x00, // ## #######
0x30, 0x0C, 0x00, // ## ##
0x38, 0x0C, 0x00, // ### ##
0x1C, 0x1C, 0x00, // ### ###
0x0F, 0xFC, 0x00, // ##########
0x03, 0xF0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2880 'H' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @2952 'I' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3024 'J' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xFE, 0x00, // ##########
0x07, 0xFE, 0x00, // ##########
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x30, 0x30, 0x00, // ## ##
0x30, 0x30, 0x00, // ## ##
0x30, 0x30, 0x00, // ## ##
0x30, 0x30, 0x00, // ## ##
0x30, 0x60, 0x00, // ## ##
0x3F, 0xE0, 0x00, // #########
0x0F, 0x80, 0x00, // #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3096 'K' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0x3E, 0x00, // ####### #####
0x7F, 0x3E, 0x00, // ####### #####
0x18, 0x30, 0x00, // ## ##
0x18, 0x60, 0x00, // ## ##
0x18, 0xC0, 0x00, // ## ##
0x19, 0x80, 0x00, // ## ##
0x1B, 0x80, 0x00, // ## ###
0x1F, 0xC0, 0x00, // #######
0x1C, 0xE0, 0x00, // ### ###
0x18, 0x70, 0x00, // ## ###
0x18, 0x30, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x7F, 0x1F, 0x00, // ####### #####
0x7F, 0x1F, 0x00, // ####### #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3168 'L' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0x80, 0x00, // ########
0x7F, 0x80, 0x00, // ########
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x0C, 0x00, // ## ##
0x7F, 0xFC, 0x00, // #############
0x7F, 0xFC, 0x00, // #############
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3240 'M' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0xF0, 0x0F, 0x00, // #### ####
0xF8, 0x1F, 0x00, // ##### #####
0x38, 0x1C, 0x00, // ### ###
0x3C, 0x3C, 0x00, // #### ####
0x3C, 0x3C, 0x00, // #### ####
0x36, 0x6C, 0x00, // ## ## ## ##
0x36, 0x6C, 0x00, // ## ## ## ##
0x33, 0xCC, 0x00, // ## #### ##
0x33, 0xCC, 0x00, // ## #### ##
0x31, 0x8C, 0x00, // ## ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0xFE, 0x7F, 0x00, // ####### #######
0xFE, 0x7F, 0x00, // ####### #######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3312 'N' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x78, 0xFE, 0x00, // #### #######
0x78, 0xFE, 0x00, // #### #######
0x1C, 0x18, 0x00, // ### ##
0x1E, 0x18, 0x00, // #### ##
0x1F, 0x18, 0x00, // ##### ##
0x1B, 0x18, 0x00, // ## ## ##
0x1B, 0x98, 0x00, // ## ### ##
0x19, 0xD8, 0x00, // ## ### ##
0x18, 0xD8, 0x00, // ## ## ##
0x18, 0xF8, 0x00, // ## #####
0x18, 0x78, 0x00, // ## ####
0x18, 0x38, 0x00, // ## ###
0x7F, 0x18, 0x00, // ####### ##
0x7F, 0x18, 0x00, // ####### ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3384 'O' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x0F, 0xF0, 0x00, // ########
0x1C, 0x38, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x38, 0x1C, 0x00, // ### ###
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x38, 0x1C, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x1C, 0x38, 0x00, // ### ###
0x0F, 0xF0, 0x00, // ########
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3456 'P' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x3F, 0xF0, 0x00, // ##########
0x3F, 0xF8, 0x00, // ###########
0x0C, 0x1C, 0x00, // ## ###
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x0C, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x0F, 0xF8, 0x00, // #########
0x0F, 0xE0, 0x00, // #######
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x3F, 0xC0, 0x00, // ########
0x3F, 0xC0, 0x00, // ########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3528 'Q' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x0F, 0xF0, 0x00, // ########
0x1C, 0x38, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x38, 0x1C, 0x00, // ### ###
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x38, 0x1C, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x1C, 0x38, 0x00, // ### ###
0x0F, 0xF0, 0x00, // ########
0x07, 0xC0, 0x00, // #####
0x07, 0xCC, 0x00, // ##### ##
0x0F, 0xFC, 0x00, // ##########
0x0C, 0x38, 0x00, // ## ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3600 'R' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0xE0, 0x00, // ##########
0x7F, 0xF0, 0x00, // ###########
0x18, 0x38, 0x00, // ## ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xF0, 0x00, // #########
0x1F, 0xC0, 0x00, // #######
0x18, 0xE0, 0x00, // ## ###
0x18, 0x70, 0x00, // ## ###
0x18, 0x30, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x7F, 0x1E, 0x00, // ####### ####
0x7F, 0x0E, 0x00, // ####### ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3672 'S' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xD8, 0x00, // ##### ##
0x0F, 0xF8, 0x00, // #########
0x1C, 0x38, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x1E, 0x00, 0x00, // ####
0x0F, 0xC0, 0x00, // ######
0x03, 0xF0, 0x00, // ######
0x00, 0x78, 0x00, // ####
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x1C, 0x38, 0x00, // ### ###
0x1F, 0xF0, 0x00, // #########
0x1B, 0xE0, 0x00, // ## #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3744 'T' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x3F, 0xFC, 0x00, // ############
0x3F, 0xFC, 0x00, // ############
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x0F, 0xF0, 0x00, // ########
0x0F, 0xF0, 0x00, // ########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3816 'U' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x0F, 0xF0, 0x00, // ########
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3888 'V' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7F, 0x7F, 0x00, // ####### #######
0x7F, 0x7F, 0x00, // ####### #######
0x18, 0x0C, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x06, 0x30, 0x00, // ## ##
0x06, 0x30, 0x00, // ## ##
0x03, 0x60, 0x00, // ## ##
0x03, 0x60, 0x00, // ## ##
0x03, 0x60, 0x00, // ## ##
0x01, 0xC0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x00, 0x80, 0x00, // #
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @3960 'W' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0xFE, 0x3F, 0x80, // ####### #######
0xFE, 0x3F, 0x80, // ####### #######
0x30, 0x06, 0x00, // ## ##
0x30, 0x06, 0x00, // ## ##
0x30, 0x86, 0x00, // ## # ##
0x19, 0xCC, 0x00, // ## ### ##
0x19, 0xCC, 0x00, // ## ### ##
0x1B, 0x6C, 0x00, // ## ## ## ##
0x1B, 0x6C, 0x00, // ## ## ## ##
0x1E, 0x7C, 0x00, // #### #####
0x0E, 0x38, 0x00, // ### ###
0x0E, 0x38, 0x00, // ### ###
0x0C, 0x18, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4032 'X' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x18, 0x18, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x03, 0xC0, 0x00, // ####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0xC0, 0x00, // ####
0x06, 0x60, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4104 'Y' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7C, 0x7E, 0x00, // ##### ######
0x7C, 0x7E, 0x00, // ##### ######
0x18, 0x18, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x03, 0xC0, 0x00, // ####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x0F, 0xF0, 0x00, // ########
0x0F, 0xF0, 0x00, // ########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4176 'Z' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x18, 0x18, 0x00, // ## ##
0x18, 0x30, 0x00, // ## ##
0x18, 0x60, 0x00, // ## ##
0x18, 0xC0, 0x00, // ## ##
0x01, 0x80, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x06, 0x18, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x3F, 0xF8, 0x00, // ###########
0x3F, 0xF8, 0x00, // ###########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4248 '[' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x01, 0xF0, 0x00, // #####
0x01, 0xF0, 0x00, // #####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0xF0, 0x00, // #####
0x01, 0xF0, 0x00, // #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4320 '\' (17 pixels wide)
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x1C, 0x00, 0x00, // ###
0x0C, 0x00, 0x00, // ##
0x0E, 0x00, 0x00, // ###
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x00, 0xC0, 0x00, // ##
0x00, 0xC0, 0x00, // ##
0x00, 0x60, 0x00, // ##
0x00, 0x60, 0x00, // ##
0x00, 0x70, 0x00, // ###
0x00, 0x30, 0x00, // ##
0x00, 0x38, 0x00, // ###
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4392 ']' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x0F, 0x80, 0x00, // #####
0x0F, 0x80, 0x00, // #####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x0F, 0x80, 0x00, // #####
0x0F, 0x80, 0x00, // #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4464 '^' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x80, 0x00, // #
0x01, 0xC0, 0x00, // ###
0x03, 0xE0, 0x00, // #####
0x07, 0x70, 0x00, // ### ###
0x06, 0x30, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x10, 0x04, 0x00, // # #
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4536 '_' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0xFF, 0xFF, 0x00, // ################
0xFF, 0xFF, 0x00, // ################
// @4608 '`' (17 pixels wide)
0x00, 0x00, 0x00, //
0x03, 0x00, 0x00, // ##
0x03, 0x80, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x00, 0x60, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4680 'a' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x0F, 0xC0, 0x00, // ######
0x1F, 0xE0, 0x00, // ########
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x07, 0xF0, 0x00, // #######
0x1F, 0xF0, 0x00, // #########
0x38, 0x30, 0x00, // ### ##
0x30, 0x30, 0x00, // ## ##
0x30, 0x70, 0x00, // ## ###
0x1F, 0xFC, 0x00, // ###########
0x0F, 0xBC, 0x00, // ##### ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4752 'b' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x78, 0x00, 0x00, // ####
0x78, 0x00, 0x00, // ####
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x1B, 0xE0, 0x00, // ## #####
0x1F, 0xF8, 0x00, // ##########
0x1C, 0x18, 0x00, // ### ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x1C, 0x18, 0x00, // ### ##
0x7F, 0xF8, 0x00, // ############
0x7B, 0xE0, 0x00, // #### #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4824 'c' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xEC, 0x00, // ##### ##
0x0F, 0xFC, 0x00, // ##########
0x1C, 0x1C, 0x00, // ### ###
0x38, 0x0C, 0x00, // ### ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x38, 0x0C, 0x00, // ### ##
0x1C, 0x1C, 0x00, // ### ###
0x0F, 0xF8, 0x00, // #########
0x03, 0xF0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4896 'd' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x78, 0x00, // ####
0x00, 0x78, 0x00, // ####
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x07, 0xD8, 0x00, // ##### ##
0x1F, 0xF8, 0x00, // ##########
0x18, 0x38, 0x00, // ## ###
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xFE, 0x00, // ############
0x07, 0xDE, 0x00, // ##### ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @4968 'e' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xE0, 0x00, // ######
0x1F, 0xF8, 0x00, // ##########
0x18, 0x18, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x3F, 0xFC, 0x00, // ############
0x3F, 0xFC, 0x00, // ############
0x30, 0x00, 0x00, // ##
0x30, 0x00, 0x00, // ##
0x18, 0x0C, 0x00, // ## ##
0x1F, 0xFC, 0x00, // ###########
0x07, 0xF0, 0x00, // #######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5040 'f' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x01, 0xFC, 0x00, // #######
0x03, 0xFC, 0x00, // ########
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x3F, 0xF8, 0x00, // ###########
0x3F, 0xF8, 0x00, // ###########
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x3F, 0xF0, 0x00, // ##########
0x3F, 0xF0, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5112 'g' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xDE, 0x00, // ##### ####
0x1F, 0xFE, 0x00, // ############
0x18, 0x38, 0x00, // ## ###
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xF8, 0x00, // ##########
0x07, 0xD8, 0x00, // ##### ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x38, 0x00, // ###
0x0F, 0xF0, 0x00, // ########
0x0F, 0xC0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5184 'h' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x78, 0x00, 0x00, // ####
0x78, 0x00, 0x00, // ####
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x1B, 0xE0, 0x00, // ## #####
0x1F, 0xF0, 0x00, // #########
0x1C, 0x38, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5256 'i' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0x80, 0x00, // ######
0x1F, 0x80, 0x00, // ######
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x3F, 0xFC, 0x00, // ############
0x3F, 0xFC, 0x00, // ############
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5328 'j' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xC0, 0x00, // ##
0x00, 0xC0, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF0, 0x00, // #########
0x1F, 0xF0, 0x00, // #########
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x30, 0x00, // ##
0x00, 0x70, 0x00, // ###
0x1F, 0xE0, 0x00, // ########
0x1F, 0x80, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5400 'k' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x3C, 0x00, 0x00, // ####
0x3C, 0x00, 0x00, // ####
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0xF8, 0x00, // ## #####
0x0C, 0xF8, 0x00, // ## #####
0x0C, 0xC0, 0x00, // ## ##
0x0D, 0x80, 0x00, // ## ##
0x0F, 0x80, 0x00, // #####
0x0F, 0x00, 0x00, // ####
0x0F, 0x80, 0x00, // #####
0x0D, 0xC0, 0x00, // ## ###
0x0C, 0xE0, 0x00, // ## ###
0x3C, 0x7C, 0x00, // #### #####
0x3C, 0x7C, 0x00, // #### #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5472 'l' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0x80, 0x00, // ######
0x1F, 0x80, 0x00, // ######
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x3F, 0xFC, 0x00, // ############
0x3F, 0xFC, 0x00, // ############
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5544 'm' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0xF7, 0x78, 0x00, // #### ### ####
0xFF, 0xFC, 0x00, // ##############
0x39, 0xCC, 0x00, // ### ### ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0x31, 0x8C, 0x00, // ## ## ##
0xFD, 0xEF, 0x00, // ###### #### ####
0xFD, 0xEF, 0x00, // ###### #### ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5616 'n' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7B, 0xE0, 0x00, // #### #####
0x7F, 0xF0, 0x00, // ###########
0x1C, 0x38, 0x00, // ### ###
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x7E, 0x7E, 0x00, // ###### ######
0x7E, 0x7E, 0x00, // ###### ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5688 'o' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x03, 0xC0, 0x00, // ####
0x0F, 0xF0, 0x00, // ########
0x1C, 0x38, 0x00, // ### ###
0x38, 0x1C, 0x00, // ### ###
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x30, 0x0C, 0x00, // ## ##
0x38, 0x1C, 0x00, // ### ###
0x1C, 0x38, 0x00, // ### ###
0x0F, 0xF0, 0x00, // ########
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5760 'p' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7B, 0xE0, 0x00, // #### #####
0x7F, 0xF8, 0x00, // ############
0x1C, 0x18, 0x00, // ### ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x18, 0x0C, 0x00, // ## ##
0x1C, 0x18, 0x00, // ### ##
0x1F, 0xF8, 0x00, // ##########
0x1B, 0xE0, 0x00, // ## #####
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x18, 0x00, 0x00, // ##
0x7F, 0x00, 0x00, // #######
0x7F, 0x00, 0x00, // #######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5832 'q' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xDE, 0x00, // ##### ####
0x1F, 0xFE, 0x00, // ############
0x18, 0x38, 0x00, // ## ###
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x30, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xF8, 0x00, // ##########
0x07, 0xD8, 0x00, // ##### ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0x18, 0x00, // ##
0x00, 0xFE, 0x00, // #######
0x00, 0xFE, 0x00, // #######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5904 'r' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x3E, 0x78, 0x00, // ##### ####
0x3E, 0xFC, 0x00, // ##### ######
0x07, 0xCC, 0x00, // ##### ##
0x07, 0x00, 0x00, // ###
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x06, 0x00, 0x00, // ##
0x3F, 0xF0, 0x00, // ##########
0x3F, 0xF0, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @5976 's' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0xF8, 0x00, // ########
0x0F, 0xF8, 0x00, // #########
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x1F, 0x80, 0x00, // ######
0x0F, 0xF0, 0x00, // ########
0x00, 0xF8, 0x00, // #####
0x18, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x1F, 0xF0, 0x00, // #########
0x1F, 0xE0, 0x00, // ########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6048 't' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x3F, 0xF0, 0x00, // ##########
0x3F, 0xF0, 0x00, // ##########
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x00, 0x00, // ##
0x0C, 0x1C, 0x00, // ## ###
0x07, 0xFC, 0x00, // #########
0x03, 0xF0, 0x00, // ######
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6120 'u' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x78, 0x78, 0x00, // #### ####
0x78, 0x78, 0x00, // #### ####
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x18, 0x38, 0x00, // ## ###
0x0F, 0xFE, 0x00, // ###########
0x07, 0xDE, 0x00, // ##### ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6192 'v' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7C, 0x3E, 0x00, // ##### #####
0x7C, 0x3E, 0x00, // ##### #####
0x18, 0x18, 0x00, // ## ##
0x18, 0x18, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x07, 0xE0, 0x00, // ######
0x03, 0xC0, 0x00, // ####
0x03, 0xC0, 0x00, // ####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6264 'w' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x78, 0x3C, 0x00, // #### ####
0x78, 0x3C, 0x00, // #### ####
0x31, 0x18, 0x00, // ## # ##
0x33, 0x98, 0x00, // ## ### ##
0x33, 0x98, 0x00, // ## ### ##
0x1A, 0xB0, 0x00, // ## # # ##
0x1E, 0xF0, 0x00, // #### ####
0x1E, 0xF0, 0x00, // #### ####
0x1C, 0x60, 0x00, // ### ##
0x0C, 0x60, 0x00, // ## ##
0x0C, 0x60, 0x00, // ## ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6336 'x' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x3E, 0x7C, 0x00, // ##### #####
0x3E, 0x7C, 0x00, // ##### #####
0x0C, 0x30, 0x00, // ## ##
0x06, 0x60, 0x00, // ## ##
0x03, 0xC0, 0x00, // ####
0x01, 0x80, 0x00, // ##
0x03, 0xC0, 0x00, // ####
0x06, 0x60, 0x00, // ## ##
0x0C, 0x30, 0x00, // ## ##
0x3E, 0x7C, 0x00, // ##### #####
0x3E, 0x7C, 0x00, // ##### #####
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6408 'y' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x7E, 0x1F, 0x00, // ###### #####
0x7E, 0x1F, 0x00, // ###### #####
0x18, 0x0C, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x06, 0x30, 0x00, // ## ##
0x06, 0x30, 0x00, // ## ##
0x03, 0x60, 0x00, // ## ##
0x03, 0xE0, 0x00, // #####
0x01, 0xC0, 0x00, // ###
0x00, 0xC0, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x3F, 0xC0, 0x00, // ########
0x3F, 0xC0, 0x00, // ########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6480 'z' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x18, 0x30, 0x00, // ## ##
0x18, 0x60, 0x00, // ## ##
0x00, 0xC0, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0x00, 0x00, // ##
0x06, 0x18, 0x00, // ## ##
0x0C, 0x18, 0x00, // ## ##
0x1F, 0xF8, 0x00, // ##########
0x1F, 0xF8, 0x00, // ##########
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6552 '{' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0xE0, 0x00, // ###
0x01, 0xE0, 0x00, // ####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x03, 0x80, 0x00, // ###
0x07, 0x00, 0x00, // ###
0x03, 0x80, 0x00, // ###
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0xE0, 0x00, // ####
0x00, 0xE0, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6624 '|' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6696 '}' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x07, 0x00, 0x00, // ###
0x07, 0x80, 0x00, // ####
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0xC0, 0x00, // ###
0x00, 0xE0, 0x00, // ###
0x01, 0xC0, 0x00, // ###
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x01, 0x80, 0x00, // ##
0x07, 0x80, 0x00, // ####
0x07, 0x00, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
// @6768 '~' (17 pixels wide)
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x0E, 0x00, 0x00, // ###
0x1F, 0x18, 0x00, // ##### ##
0x3B, 0xB8, 0x00, // ### ### ###
0x31, 0xF0, 0x00, // ## #####
0x00, 0xE0, 0x00, // ###
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
0x00, 0x00, 0x00, //
};
sFONT Font24 = {
Font24_Table,
17, /* Width */
24, /* Height */
};
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**
******************************************************************************
* @file Font8.c
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief This file provides text Font8 for STM32xx-EVAL's LCD driver.
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "fonts.h"
//
// Font data for Courier New 12pt
//
const uint8_t Font8_Table[] =
{
// @0 ' ' (5 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @8 '!' (5 pixels wide)
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x00, //
0x20, // #
0x00, //
0x00, //
// @16 '"' (5 pixels wide)
0x50, // # #
0x50, // # #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @24 '#' (5 pixels wide)
0x28, // # #
0x50, // # #
0xF8, // #####
0x50, // # #
0xF8, // #####
0x50, // # #
0xA0, // # #
0x00, //
// @32 '$' (5 pixels wide)
0x20, // #
0x30, // ##
0x60, // ##
0x30, // ##
0x10, // #
0x60, // ##
0x20, // #
0x00, //
// @40 '%' (5 pixels wide)
0x20, // #
0x20, // #
0x18, // ##
0x60, // ##
0x10, // #
0x10, // #
0x00, //
0x00, //
// @48 '&' (5 pixels wide)
0x00, //
0x38, // ###
0x20, // #
0x60, // ##
0x50, // # #
0x78, // ####
0x00, //
0x00, //
// @56 ''' (5 pixels wide)
0x20, // #
0x20, // #
0x20, // #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @64 '(' (5 pixels wide)
0x10, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x10, // #
0x00, //
// @72 ')' (5 pixels wide)
0x40, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x40, // #
0x00, //
// @80 '*' (5 pixels wide)
0x20, // #
0x70, // ###
0x20, // #
0x50, // # #
0x00, //
0x00, //
0x00, //
0x00, //
// @88 '+' (5 pixels wide)
0x00, //
0x20, // #
0x20, // #
0xF8, // #####
0x20, // #
0x20, // #
0x00, //
0x00, //
// @96 ',' (5 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x10, // #
0x20, // #
0x20, // #
0x00, //
// @104 '-' (5 pixels wide)
0x00, //
0x00, //
0x00, //
0x70, // ###
0x00, //
0x00, //
0x00, //
0x00, //
// @112 '.' (5 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x20, // #
0x00, //
0x00, //
// @120 '/' (5 pixels wide)
0x10, // #
0x20, // #
0x20, // #
0x20, // #
0x40, // #
0x40, // #
0x80, // #
0x00, //
// @128 '0' (5 pixels wide)
0x20, // #
0x50, // # #
0x50, // # #
0x50, // # #
0x50, // # #
0x20, // #
0x00, //
0x00, //
// @136 '1' (5 pixels wide)
0x60, // ##
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0xF8, // #####
0x00, //
0x00, //
// @144 '2' (5 pixels wide)
0x20, // #
0x50, // # #
0x20, // #
0x20, // #
0x40, // #
0x70, // ###
0x00, //
0x00, //
// @152 '3' (5 pixels wide)
0x20, // #
0x50, // # #
0x10, // #
0x20, // #
0x10, // #
0x60, // ##
0x00, //
0x00, //
// @160 '4' (5 pixels wide)
0x10, // #
0x30, // ##
0x50, // # #
0x78, // ####
0x10, // #
0x38, // ###
0x00, //
0x00, //
// @168 '5' (5 pixels wide)
0x70, // ###
0x40, // #
0x60, // ##
0x10, // #
0x50, // # #
0x20, // #
0x00, //
0x00, //
// @176 '6' (5 pixels wide)
0x30, // ##
0x40, // #
0x60, // ##
0x50, // # #
0x50, // # #
0x60, // ##
0x00, //
0x00, //
// @184 '7' (5 pixels wide)
0x70, // ###
0x50, // # #
0x10, // #
0x20, // #
0x20, // #
0x20, // #
0x00, //
0x00, //
// @192 '8' (5 pixels wide)
0x20, // #
0x50, // # #
0x20, // #
0x50, // # #
0x50, // # #
0x20, // #
0x00, //
0x00, //
// @200 '9' (5 pixels wide)
0x30, // ##
0x50, // # #
0x50, // # #
0x30, // ##
0x10, // #
0x60, // ##
0x00, //
0x00, //
// @208 ':' (5 pixels wide)
0x00, //
0x00, //
0x20, // #
0x00, //
0x00, //
0x20, // #
0x00, //
0x00, //
// @216 ';' (5 pixels wide)
0x00, //
0x00, //
0x10, // #
0x00, //
0x10, // #
0x20, // #
0x00, //
0x00, //
// @224 '<' (5 pixels wide)
0x00, //
0x10, // #
0x20, // #
0xC0, // ##
0x20, // #
0x10, // #
0x00, //
0x00, //
// @232 '=' (5 pixels wide)
0x00, //
0x70, // ###
0x00, //
0x70, // ###
0x00, //
0x00, //
0x00, //
0x00, //
// @240 '>' (5 pixels wide)
0x00, //
0x40, // #
0x20, // #
0x18, // ##
0x20, // #
0x40, // #
0x00, //
0x00, //
// @248 '?' (5 pixels wide)
0x20, // #
0x50, // # #
0x10, // #
0x20, // #
0x00, //
0x20, // #
0x00, //
0x00, //
// @256 '@' (5 pixels wide)
0x30, // ##
0x48, // # #
0x48, // # #
0x58, // # ##
0x48, // # #
0x40, // #
0x38, // ###
0x00, //
// @264 'A' (5 pixels wide)
0x60, // ##
0x20, // #
0x50, // # #
0x70, // ###
0x88, // # #
0xD8, // ## ##
0x00, //
0x00, //
// @272 'B' (5 pixels wide)
0xF0, // ####
0x48, // # #
0x70, // ###
0x48, // # #
0x48, // # #
0xF0, // ####
0x00, //
0x00, //
// @280 'C' (5 pixels wide)
0x70, // ###
0x50, // # #
0x40, // #
0x40, // #
0x40, // #
0x30, // ##
0x00, //
0x00, //
// @288 'D' (5 pixels wide)
0xF0, // ####
0x48, // # #
0x48, // # #
0x48, // # #
0x48, // # #
0xF0, // ####
0x00, //
0x00, //
// @296 'E' (5 pixels wide)
0xF8, // #####
0x48, // # #
0x60, // ##
0x40, // #
0x48, // # #
0xF8, // #####
0x00, //
0x00, //
// @304 'F' (5 pixels wide)
0xF8, // #####
0x48, // # #
0x60, // ##
0x40, // #
0x40, // #
0xE0, // ###
0x00, //
0x00, //
// @312 'G' (5 pixels wide)
0x70, // ###
0x40, // #
0x40, // #
0x58, // # ##
0x50, // # #
0x30, // ##
0x00, //
0x00, //
// @320 'H' (5 pixels wide)
0xE8, // ### #
0x48, // # #
0x78, // ####
0x48, // # #
0x48, // # #
0xE8, // ### #
0x00, //
0x00, //
// @328 'I' (5 pixels wide)
0x70, // ###
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @336 'J' (5 pixels wide)
0x38, // ###
0x10, // #
0x10, // #
0x50, // # #
0x50, // # #
0x20, // #
0x00, //
0x00, //
// @344 'K' (5 pixels wide)
0xD8, // ## ##
0x50, // # #
0x60, // ##
0x70, // ###
0x50, // # #
0xD8, // ## ##
0x00, //
0x00, //
// @352 'L' (5 pixels wide)
0xE0, // ###
0x40, // #
0x40, // #
0x40, // #
0x48, // # #
0xF8, // #####
0x00, //
0x00, //
// @360 'M' (5 pixels wide)
0xD8, // ## ##
0xD8, // ## ##
0xD8, // ## ##
0xA8, // # # #
0x88, // # #
0xD8, // ## ##
0x00, //
0x00, //
// @368 'N' (5 pixels wide)
0xD8, // ## ##
0x68, // ## #
0x68, // ## #
0x58, // # ##
0x58, // # ##
0xE8, // ### #
0x00, //
0x00, //
// @376 'O' (5 pixels wide)
0x30, // ##
0x48, // # #
0x48, // # #
0x48, // # #
0x48, // # #
0x30, // ##
0x00, //
0x00, //
// @384 'P' (5 pixels wide)
0xF0, // ####
0x48, // # #
0x48, // # #
0x70, // ###
0x40, // #
0xE0, // ###
0x00, //
0x00, //
// @392 'Q' (5 pixels wide)
0x30, // ##
0x48, // # #
0x48, // # #
0x48, // # #
0x48, // # #
0x30, // ##
0x18, // ##
0x00, //
// @400 'R' (5 pixels wide)
0xF0, // ####
0x48, // # #
0x48, // # #
0x70, // ###
0x48, // # #
0xE8, // ### #
0x00, //
0x00, //
// @408 'S' (5 pixels wide)
0x70, // ###
0x50, // # #
0x20, // #
0x10, // #
0x50, // # #
0x70, // ###
0x00, //
0x00, //
// @416 'T' (5 pixels wide)
0xF8, // #####
0xA8, // # # #
0x20, // #
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @424 'U' (5 pixels wide)
0xD8, // ## ##
0x48, // # #
0x48, // # #
0x48, // # #
0x48, // # #
0x30, // ##
0x00, //
0x00, //
// @432 'V' (5 pixels wide)
0xD8, // ## ##
0x88, // # #
0x48, // # #
0x50, // # #
0x50, // # #
0x30, // ##
0x00, //
0x00, //
// @440 'W' (5 pixels wide)
0xD8, // ## ##
0x88, // # #
0xA8, // # # #
0xA8, // # # #
0xA8, // # # #
0x50, // # #
0x00, //
0x00, //
// @448 'X' (5 pixels wide)
0xD8, // ## ##
0x50, // # #
0x20, // #
0x20, // #
0x50, // # #
0xD8, // ## ##
0x00, //
0x00, //
// @456 'Y' (5 pixels wide)
0xD8, // ## ##
0x88, // # #
0x50, // # #
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @464 'Z' (5 pixels wide)
0x78, // ####
0x48, // # #
0x10, // #
0x20, // #
0x48, // # #
0x78, // ####
0x00, //
0x00, //
// @472 '[' (5 pixels wide)
0x30, // ##
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x30, // ##
0x00, //
// @480 '\' (5 pixels wide)
0x80, // #
0x40, // #
0x40, // #
0x20, // #
0x20, // #
0x20, // #
0x10, // #
0x00, //
// @488 ']' (5 pixels wide)
0x60, // ##
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x60, // ##
0x00, //
// @496 '^' (5 pixels wide)
0x20, // #
0x20, // #
0x50, // # #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @504 '_' (5 pixels wide)
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0xF8, // #####
// @512 '`' (5 pixels wide)
0x20, // #
0x10, // #
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
0x00, //
// @520 'a' (5 pixels wide)
0x00, //
0x00, //
0x30, // ##
0x10, // #
0x70, // ###
0x78, // ####
0x00, //
0x00, //
// @528 'b' (5 pixels wide)
0xC0, // ##
0x40, // #
0x70, // ###
0x48, // # #
0x48, // # #
0xF0, // ####
0x00, //
0x00, //
// @536 'c' (5 pixels wide)
0x00, //
0x00, //
0x70, // ###
0x40, // #
0x40, // #
0x70, // ###
0x00, //
0x00, //
// @544 'd' (5 pixels wide)
0x18, // ##
0x08, // #
0x38, // ###
0x48, // # #
0x48, // # #
0x38, // ###
0x00, //
0x00, //
// @552 'e' (5 pixels wide)
0x00, //
0x00, //
0x70, // ###
0x70, // ###
0x40, // #
0x30, // ##
0x00, //
0x00, //
// @560 'f' (5 pixels wide)
0x10, // #
0x20, // #
0x70, // ###
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @568 'g' (5 pixels wide)
0x00, //
0x00, //
0x38, // ###
0x48, // # #
0x48, // # #
0x38, // ###
0x08, // #
0x30, // ##
// @576 'h' (5 pixels wide)
0xC0, // ##
0x40, // #
0x70, // ###
0x48, // # #
0x48, // # #
0xE8, // ### #
0x00, //
0x00, //
// @584 'i' (5 pixels wide)
0x20, // #
0x00, //
0x60, // ##
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @592 'j' (5 pixels wide)
0x20, // #
0x00, //
0x70, // ###
0x10, // #
0x10, // #
0x10, // #
0x10, // #
0x70, // ###
// @600 'k' (5 pixels wide)
0xC0, // ##
0x40, // #
0x58, // # ##
0x70, // ###
0x50, // # #
0xD8, // ## ##
0x00, //
0x00, //
// @608 'l' (5 pixels wide)
0x60, // ##
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @616 'm' (5 pixels wide)
0x00, //
0x00, //
0xD0, // ## #
0xA8, // # # #
0xA8, // # # #
0xA8, // # # #
0x00, //
0x00, //
// @624 'n' (5 pixels wide)
0x00, //
0x00, //
0xF0, // ####
0x48, // # #
0x48, // # #
0xC8, // ## #
0x00, //
0x00, //
// @632 'o' (5 pixels wide)
0x00, //
0x00, //
0x30, // ##
0x48, // # #
0x48, // # #
0x30, // ##
0x00, //
0x00, //
// @640 'p' (5 pixels wide)
0x00, //
0x00, //
0xF0, // ####
0x48, // # #
0x48, // # #
0x70, // ###
0x40, // #
0xE0, // ###
// @648 'q' (5 pixels wide)
0x00, //
0x00, //
0x38, // ###
0x48, // # #
0x48, // # #
0x38, // ###
0x08, // #
0x18, // ##
// @656 'r' (5 pixels wide)
0x00, //
0x00, //
0x78, // ####
0x20, // #
0x20, // #
0x70, // ###
0x00, //
0x00, //
// @664 's' (5 pixels wide)
0x00, //
0x00, //
0x30, // ##
0x20, // #
0x10, // #
0x60, // ##
0x00, //
0x00, //
// @672 't' (5 pixels wide)
0x00, //
0x40, // #
0xF0, // ####
0x40, // #
0x48, // # #
0x30, // ##
0x00, //
0x00, //
// @680 'u' (5 pixels wide)
0x00, //
0x00, //
0xD8, // ## ##
0x48, // # #
0x48, // # #
0x38, // ###
0x00, //
0x00, //
// @688 'v' (5 pixels wide)
0x00, //
0x00, //
0xC8, // ## #
0x48, // # #
0x30, // ##
0x30, // ##
0x00, //
0x00, //
// @696 'w' (5 pixels wide)
0x00, //
0x00, //
0xD8, // ## ##
0xA8, // # # #
0xA8, // # # #
0x50, // # #
0x00, //
0x00, //
// @704 'x' (5 pixels wide)
0x00, //
0x00, //
0x48, // # #
0x30, // ##
0x30, // ##
0x48, // # #
0x00, //
0x00, //
// @712 'y' (5 pixels wide)
0x00, //
0x00, //
0xD8, // ## ##
0x50, // # #
0x50, // # #
0x20, // #
0x20, // #
0x60, // ##
// @720 'z' (5 pixels wide)
0x00, //
0x00, //
0x78, // ####
0x50, // # #
0x28, // # #
0x78, // ####
0x00, //
0x00, //
// @728 '{' (5 pixels wide)
0x10, // #
0x20, // #
0x20, // #
0x60, // ##
0x20, // #
0x20, // #
0x10, // #
0x00, //
// @736 '|' (5 pixels wide)
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x20, // #
0x00, //
// @744 '}' (5 pixels wide)
0x40, // #
0x20, // #
0x20, // #
0x30, // ##
0x20, // #
0x20, // #
0x40, // #
0x00, //
// @752 '~' (5 pixels wide)
0x00, //
0x00, //
0x00, //
0x28, // # #
0x50, // # #
0x00, //
0x00, //
0x00, //
};
sFONT Font8 = {
Font8_Table,
5, /* Width */
8, /* Height */
};
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**
******************************************************************************
* @file fonts.h
* @author MCD Application Team
* @version V1.0.0
* @date 18-February-2014
* @brief Header for fonts.c file
******************************************************************************
* @attention
*
* <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __FONTS_H
#define __FONTS_H
/* Max size of bitmap will based on a font24 (17x24) */
#define MAX_HEIGHT_FONT 24
#define MAX_WIDTH_FONT 17
#define OFFSET_BITMAP 54
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
typedef struct _tFont
{
const uint8_t *table;
uint16_t Width;
uint16_t Height;
} sFONT;
extern sFONT Font24;
extern sFONT Font20;
extern sFONT Font16;
extern sFONT Font12;
extern sFONT Font8;
#ifdef __cplusplus
}
#endif
#endif /* __FONTS_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
/**********************************************************
*
* @file : wifi.c
* @author : HaewonSeo
*
* @note : ESP8266 WiFi Module
*
**********************************************************/
#include <string.h>
#include "wifi.h"
/* Basic AT command */
const char ATCommand_AT[] = "AT\r\n"; //Simple. AT.
const char ATCommand_RST[] = "AT+RST\r\n"; //Restart
const char ATCommand_GMR[] = "AT+GMR\r\n"; //Get version info
const char ATCommand_END[] = "\r\n"; //ATCommand end format string
/* WiFi Station */
const char ATCommand_CWMODE_GET[] = "AT+CWMODE?\r\n"; //Get current mode
const char ATCommand_CWMODE_SET1[] = "AT+CWMODE=1\r\n"; //Set current mode1 : Station
const char ATCommand_CWMODE_SET2[] = "AT+CWMODE=2\r\n"; //Set current mode2 : softAP
const char ATCommand_CWMODE_SET3[] = "AT+CWMODE=3\r\n"; //Set current mode3 : Station + softAP
const char ATCommand_CWJAP_GET[] = "AT+CWJAP=?\r\n"; //Get AP's info which is connected
const char ATCommand_CWJAP_SET[] = "AT+CWJAP=\"WIFIID\",\"WIFIIDPW\"\r\n"; //Connect to WiFi AP
const char ATCommand_CIPSTA_GET[] = "AT+CIPSTA=?\r\n"; //Get Station IP
const char ATCommand_CIPSTA_SET[] = "AT+CIPSTA=\"192.168.35.127\"\r\n"; //Set Station IP
/* WiFi softAP*/
/* TCP/IP Client */
const char ATCommand_CIPSTATUS[] = "AT+CIPSTATUS\r\n"; //Get info about connection
const char ATCommand_CIPMUX_GET[] = "AT+CIPMUX?\r\n"; //Get current mode(single or multiple)
const char ATCommand_CIPMUX_SET0[] = "AT+CIPMUX=0\r\n"; //Set mode for single connection
const char ATCommand_CIPMUX_SET1[] = "AT+CIPMUX=1\r\n"; //Set mode for multiple connection
const char ATCommand_CIFSR[] = "AT+CIFSR\r\n"; //Get local IP address
const char ATCommand_CIPSTART0[] = "AT+CIPSTART=0,\"TCP\",\"192.168.35.212\",80\r\n"; //Start connection(HTTP port)
const char ATCommand_CIPSTART1[] = "AT+CIPSTART=1,\"TCP\",\"192.168.35.212\",2351\r\n"; //Start connection
const char ATCommand_CIPSEND0[] = "AT+CIPSEND=0,";
const char ATCommand_CIPSEND1[] = "AT+CIPSEND=1,"; //Send data(without data and end string)
const char ATCommand_CIPCLOSE[] = "AT+CIPCLOSE\r\n"; //Close connection
enum
{
PULSE,
PUBKEY1,
PUBKEY2,
SIGNATURE_R,
SIGNATURE_S
};
const char GET_MSG_HEAD[] = "GET /process.php?";
const char *GET_MSG_BODY[5] = {"pulse=", "pubKey1=", "pubKey2=", "signatureR=", "signatureS="};
const char GET_MSG_AND[] = "&";
const char GET_MSG_TAIL[] = " HTTP/1.1\nHost: 127.0.0.1\nConnection: keep-alive\nAccept: */*\n\n";
//const char GET_MSG[] = "GET /process.php?pulse=112345 HTTP/1.1\nHost: 192.168.35.128\nConnection: keep-alive\nAccept: */*\n\n";
void printNetworkData(t_netData *netData)
{
printf("printNetworkData\n");
printf("netLen : %d\n", netData->len);
printf("netData : %s\n", netData->data);
return;
}
static void stringKeyToKey(char *stringKey, uint8_t *key, int len)
{
//printSecure("StringKeyToKey\n", NULL, NULL);
uint8_t temp0;
int i = 0;
//printSecure("stringKey[0] = %x\n", NULL,(uint8_t)stringKey[0]);
for (int nb = 0; nb < len; nb++)
{
if (stringKey[nb] >= 0x30 && stringKey[nb] <= 0x39)
{
if (!(nb % 2))
temp0 = ((uint8_t)stringKey[nb] - 0x30) << 4;
else
temp0 = temp0 | ((uint8_t)stringKey[nb] - 0x30);
//printSecure("temp0_A : %x\n", NULL,temp0);
}
else if (stringKey[nb] >= 0x61 && stringKey[nb] <= 0x66)
{
if (!(nb % 2))
temp0 = (stringKey[nb] - 0x57) << 4;
else
temp0 = temp0 | (stringKey[nb] - 0x57);
//printSecure("temp0_B : %x\n", NULL,temp0);
}
else
{
printSecure("StringKeyToKey ERROR : Bad Key.\n", NULL, NULL);
break;
}
i = (int)(nb / 2);
key[i] = temp0;
}
}
static void keyToStringKey(uint8_t *key, char *stringKey, int len)
{
//printSecure("keyToStringKey\n", NULL, NULL);
//printSecure("key[0] = %x\n", NULL,(uint8_t)key[0]);
uint8_t temp0;
int i = 0;
for (int nb = 0; nb < len; nb++)
{
i = (int)(nb / 2);
if (!(nb % 2))
temp0 = (key[i] >> 4) & 0x0f;
else
temp0 = 0x0f & key[i];
if (temp0 >= 0 && temp0 <= 9)
stringKey[nb] = (char)(temp0 + 0x30);
else if (temp0 >= 0xa && temp0 <= 0xf)
stringKey[nb] = (char)(temp0 + 0x57);
}
//printSecure("stringKey = %s\n", stringKey, NULL);
}
void WIFI_Init()
{
CLK->APBCLK0 |= CLK_APBCLK0_UART3CKEN_Msk;
CLK->CLKSEL3 = (CLK->CLKSEL3 & (~CLK_CLKSEL3_UART3SEL_Msk)) | CLK_CLKSEL3_UART3SEL_HIRC;
WIFI_PORT->LINE = UART_PARITY_NONE | UART_STOP_BIT_1 | UART_WORD_LEN_8;
WIFI_PORT->BAUD = UART_BAUD_MODE2 | UART_BAUD_MODE2_DIVIDER(__HIRC, 115200);
/* Set multi-function pins for RXD and TXD */
//SYS->GPC_MFPL = (SYS->GPC_MFPL & (~(UART4_RXD_PC6_Msk | UART4_TXD_PC7_Msk))) | UART4_RXD_PC6 | UART4_TXD_PC7;
SYS->GPD_MFPL = (SYS->GPD_MFPL & (~(UART3_RXD_PD0_Msk | UART3_TXD_PD1_Msk))) | UART3_RXD_PD0 | UART3_TXD_PD1;
}
void WIFI_Connect()
{
if (DEMO)
{
printf("| WiFi Module Loading ... |\n");
printf("| |\n");
}
IOCTL_INIT;
PWR_OFF = 1;
//FW_UPDATE_OFF = 0; // Set 0 to enable WIFI module firmware update.
FW_UPDATE_OFF = 1; // Set 1 to Disable WIFI module firmware update.
CLK_SysTickLongDelay(1000000);
PWR_OFF = 0;
char buff;
int ready = 0;
int indx = 0;
int loop = 0;
int wifiUP = 0;
while (wifiUP == 0)
{
//while((WIFI_PORT->FIFOSTS & UART_FIFOSTS_RXIDLE_Msk) == 1);
while ((WIFI_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0)
{
loop = 0;
buff = WIFI_PORT->DAT;
//printf("%c",buff);
if (indx == 0 && buff == 'r' && loop == 0)
{
indx = 1;
loop = 1;
//printf("%c",buff);
}
if (indx == 1 && buff == 'e' && loop == 0)
{
indx = 2;
loop = 1;
//printf("%c",buff);
}
else if (indx == 1 && loop == 0)
indx = 0;
if (indx == 2 && buff == 'a' && loop == 0)
{
indx = 3;
loop = 1;
//printf("%c",buff);
}
else if (indx == 2 && loop == 0)
indx = 0;
if (indx == 3 && buff == 'd' && loop == 0)
{
indx = 4;
loop = 1;
//printf("%c",buff);
}
else if (indx == 3 && loop == 0)
indx = 0;
if (indx == 4 && buff == 'y' && loop == 0)
{
ready = 1;
loop = 1;
//printf("%c",buff);
}
else if (indx == 4 && loop == 0)
indx = 0;
}
if (ready)
{
WIFI_Write(PRINT, ATCommand_AT, strlen(ATCommand_AT));
WIFI_Read(PRINT);
WIFI_Write(PRINT, ATCommand_CWMODE_SET1, strlen(ATCommand_CWMODE_SET1));
WIFI_Read(PRINT);
if (DEMO)
printf("| Current mode : Station |\n");
WIFI_Write(PRINT, ATCommand_CWJAP_SET, strlen(ATCommand_CWJAP_SET));
WIFI_Read(PRINT);
if (DEMO)
printf("| WiFi SSID : \"SK_WiFiGIGA7EB1\" |\n");
WIFI_Write(PRINT, ATCommand_CIPSTA_SET, strlen(ATCommand_CIPSTA_SET));
WIFI_Read(PRINT);
if (DEMO)
printf("| Set Station IP : 192.168.35.127 |\n");
// WIFI_Write(PRINT, ATCommand_CIPMUX_SET0, strlen(ATCommand_CIPMUX_SET0));
// WIFI_Read(PRINT);
// if (DEMO) printf("| WiFi Single Server Connections Enabled |\n");
WIFI_Write(PRINT, ATCommand_CIPMUX_SET1, strlen(ATCommand_CIPMUX_SET1));
WIFI_Read(PRINT);
if (DEMO)
printf("| WiFi Multiple Server Connections Enabled |\n");
WIFI_Write(PRINT, ATCommand_CIPSTATUS, strlen(ATCommand_CIPSTATUS));
WIFI_Read(PRINT);
WIFI_Write(PRINT, ATCommand_CIPSTART0, strlen(ATCommand_CIPSTART0));
WIFI_Read(PRINT);
if (DEMO)
printf("| Server TCP enabled on 80 port |\n");
WIFI_Write(PRINT, ATCommand_CIPSTART1, strlen(ATCommand_CIPSTART1));
WIFI_Read(PRINT);
if (DEMO)
printf("| Server TCP enabled on 2351 port |\n");
//WIFI_PORT_Write(command_CIPSTO, (sizeof(command_CIPSTO) / sizeof(char))-1);
//printf("WiFi Nuvoton Timeout is : \n");
//WIFI_PORT_Read(1);
if (DEMO)
{
printf("| |\n");
printf("| WiFi Module ESP8266 is Ready |\n");
printf("+---------------------------------------------+\n");
}
wifiUP = 1;
}
}
}
/* Receive data from ESP8266 char by char, until last 'OK' message is received */
void WIFI_Read(int print)
{
char buf = 0;
char lastBuf = 0;
int cmdOK = 0;
while (cmdOK == 0)
{
while ((WIFI_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0)
{
buf = (char)WIFI_PORT->DAT;
if (print)
printf("%c", buf);
if (lastBuf == 'O' && buf == 'K')
{
//printf("\n");
cmdOK = 1;
}
else
lastBuf = buf;
}
}
}
/* Send AT command on UART to ESP8266 char by char */
void WIFI_Write(int print, const char *command, int lenCommand)
{
for (int i = 0; i < lenCommand; i++)
{
while ((WIFI_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk))
;
WIFI_PORT->DAT = command[i];
if (print)
printf("%c", command[i]);
}
}
/* AT+CIPSEND : Send data */
int WIFI_SendData(int print, t_netData *netData, int port)
{
int lengthStrLen = 0;
char *lengthStr;
int tmpLen = netData->len;
if (DEMO)
printf("| NonSecure is running ... Send Data |\n");
while (tmpLen)
{
lengthStrLen++;
tmpLen /= 10;
}
lengthStr = calloc((lengthStrLen + 1), sizeof(char));
sprintf(lengthStr, "%d", netData->len);
// AT+CIPSEND=
if (port == 0)
WIFI_Write(print, ATCommand_CIPSEND0, strlen(ATCommand_CIPSEND0));
else if (port == 1)
WIFI_Write(print, ATCommand_CIPSEND1, strlen(ATCommand_CIPSEND1));
// <length>
WIFI_Write(print, lengthStr, lengthStrLen);
// \r\n
WIFI_Write(print, ATCommand_END, strlen(ATCommand_END));
WIFI_Read(print);
// >DATA
WIFI_Write(print, netData->data, netData->len);
// \r\n
WIFI_Write(print, ATCommand_END, strlen(ATCommand_END));
// SEND OK
WIFI_Read(print);
free(lengthStr);
if (print)
printf("\nData Sent !\n");
return 1;
}
/* +IPD : Receive network data */
int WIFI_ReceiveData(int print, t_netData *netData)
{
char buff = 0;
int isReceive = 0;
int loop = 0;
int indx = 0;
char dataR[64] = {0};
int i = 0;
int c = 0;
int nbCharLength = 0;
int lengthData = 0;
int columnDetect = 0;
if (DEMO)
printf("| NonSecure is running ... Wait Data |\n");
// +IPD,<channel>,<len>:data --- +IPD,1,4:abcd
while (isReceive == 0)
{
//printf(".");
while ((WIFI_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0)
{
loop = 0;
buff = WIFI_PORT->DAT;
printf("%c", buff);
if (indx == 0 && buff == '+' && loop == 0)
{
indx = 1;
loop = 1;
//printf("%c",buff);
}
if (indx == 1 && buff == 'I' && loop == 0)
{
indx = 2;
loop = 1;
//printf("%c",buff);
}
else if (indx == 1 && loop == 0)
indx = 0;
if (indx == 2 && buff == 'P' && loop == 0)
{
indx = 3;
loop = 1;
//printf("%c",buff);
}
else if (indx == 2 && loop == 0)
indx = 0;
if (indx == 3 && buff == 'D' && loop == 0)
{
indx = 4;
loop = 1;
//printf("%c",buff);
}
else if (indx == 3 && loop == 0)
indx = 0;
if (indx == 4 && buff == ',' && loop == 0)
{
isReceive = 1;
loop = 1;
break;
//printf("%c",buff);
}
else if (indx == 4 && loop == 0)
indx = 0;
}
}
printf("\n\n");
while (isReceive)
{
//printf(",");
while ((WIFI_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0)
{
buff = WIFI_PORT->DAT;
printf("[%c]", buff);
if (c == 0)
{
uint8_t channelID = buff - 0x30;
if (print)
printf("\nchannel ID : %d\n", channelID);
}
if (c == 1 && buff != ',')
isReceive = 0; //ERROR
//Data Read
if (columnDetect && c < lengthData + 3 + nbCharLength)
dataR[c - (3 + nbCharLength)] = buff;
//Length parse
if (c > 1 && columnDetect == 0)
{
//printf("#");
if (buff == ':')
{
columnDetect = 1;
lengthData--;
if (print)
printf("\nlengthData : %d\n", lengthData);
}
else
{
lengthData = 10 * lengthData + buff - 0x30;
nbCharLength++;
}
}
// 1,4:abcd
// lengthData = "abcd"
// 3 = "1,:"
// nbCharLength = strlen("4")
if (columnDetect && c == lengthData + 3 + nbCharLength)
isReceive = 0;
c++;
}
}
for (int nb = 0; nb <= lengthData; nb++)
(netData->data)[nb] = dataR[nb];
netData->len = lengthData;
printf("\ndataR : %s\n", dataR);
//printf("lengthData : %d\n", lengthData);
if (print)
printNetworkData(netData);
return 1;
}
void WIFI_Send_BPM(int pulse)
{
t_netData *get;
int tmpPulse;
char *strPulse;
int strPulseLen = 0;
int totalLen;
//Convert int pulse to char *strPulse
if (pulse == 0)
strPulseLen = 1;
else
{
tmpPulse = pulse;
while (tmpPulse)
{
strPulseLen++;
tmpPulse /= 10;
}
}
strPulse = calloc((strPulseLen + 1), sizeof(char));
sprintf(strPulse, "%d", pulse);
//Create t_netData *get
totalLen = strlen(GET_MSG_HEAD) + strlen(GET_MSG_BODY[PULSE]) + strlen(GET_MSG_TAIL) + strPulseLen;
get = calloc(1, sizeof(t_netData));
get->data = calloc(totalLen, sizeof(char));
get->len = totalLen;
strcat(get->data, GET_MSG_HEAD);
strcat(get->data, GET_MSG_BODY[PULSE]);
strcat(get->data, strPulse);
strcat(get->data, GET_MSG_TAIL);
//printNetworkData(get);
WIFI_SendData(0, get, 0);
free(get->data);
free(get);
free(strPulse);
}
void WIFI_Send_EncryptedMsg(uint8_t *encryptedMsg, int encryptedMsgBytes, uint32_t body)
{
t_netData *get;
char *strMsg;
int strMsgLen = encryptedMsgBytes * 2;
int totalLen;
//Convert uint8_t *encryptedBPM to char *strEncrytedBPM
strMsg = calloc(strMsgLen + 1, sizeof(char));
keyToStringKey(encryptedMsg, strMsg, strMsgLen);
//printf("strMsg(%d) : %s\n", strMsgLen, strMsg);
totalLen = strlen(GET_MSG_HEAD) + strlen(GET_MSG_BODY[body]) + strlen(GET_MSG_TAIL) + strMsgLen;
//Create t_netData *get
get = calloc(1, sizeof(t_netData));
get->data = calloc(totalLen, sizeof(char));
get->len = totalLen;
strcat(get->data, GET_MSG_HEAD);
strcat(get->data, GET_MSG_BODY[body]);
strcat(get->data, strMsg);
strcat(get->data, GET_MSG_TAIL);
//printBlock(encryptedBPM);
//printBlock(strPulse);
//printf("\nstrPulse : %s\n", strPulse);
// printf("\nstrPulseLen : %d\n", strlen(strPulse));
printNetworkData(get);
WIFI_SendData(0, get, 0);
free(get->data);
free(get);
free(strMsg);
}
void WIFI_Send_DigitallySignedData(t_digitallySignedData *dsd)
{
uint32_t u32i;
WIFI_Send_EncryptedMsg(dsd->data, 16, PULSE);
WIFI_Send_EncryptedMsg(dsd->pubKey1, 24, PUBKEY1);
WIFI_Send_EncryptedMsg(dsd->pubKey2, 24, PUBKEY2);
WIFI_Send_EncryptedMsg(dsd->R, 24, SIGNATURE_R);
WIFI_Send_EncryptedMsg(dsd->S, 24, SIGNATURE_S);
return;
}
void WIFI_Send_EncryptedDigitallySignedData(t_digitallySignedData *dsd)
{
t_netData *get;
char *strMsg;
int dsdLen[5] = {16, 24, 24, 24, 24};
int totalLen = 0;
totalLen += strlen(GET_MSG_HEAD);
totalLen += strlen(GET_MSG_BODY[PULSE]);
totalLen += 2 * dsdLen[PULSE] + 1; // sttlen(data) + strlen(GET_MSG_AND);
totalLen += strlen(GET_MSG_BODY[PUBKEY1]);
totalLen += 2 * dsdLen[PUBKEY1] + 1; // sttlen(pubKey1) + strlen(GET_MSG_AND);
totalLen += strlen(GET_MSG_BODY[PUBKEY2]);
totalLen += 2 * dsdLen[PUBKEY2] + 1; // sttlen(pubKey1) + strlen(GET_MSG_AND);
totalLen += strlen(GET_MSG_BODY[SIGNATURE_R]);
totalLen += 2 * dsdLen[SIGNATURE_R] + 1; // sttlen(signatureR) + strlen(GET_MSG_AND);
totalLen += strlen(GET_MSG_BODY[SIGNATURE_S]);
totalLen += 2 * dsdLen[SIGNATURE_S]; // strlen(signatureR);
totalLen += strlen(GET_MSG_TAIL);
//Create t_netData *get
get = calloc(1, sizeof(t_netData));
get->data = calloc(totalLen, sizeof(char));
get->len = totalLen;
strcat(get->data, GET_MSG_HEAD);
strcat(get->data, GET_MSG_BODY[PULSE]);
strMsg = calloc(2 * dsdLen[PULSE] + 1, sizeof(char));
keyToStringKey(dsd->data, strMsg, 2 * dsdLen[PULSE]);
strcat(get->data, strMsg);
free(strMsg);
strcat(get->data, GET_MSG_AND);
strcat(get->data, GET_MSG_BODY[PUBKEY1]);
strMsg = calloc(2 * dsdLen[PUBKEY1] + 1, sizeof(char));
keyToStringKey(dsd->pubKey1, strMsg, 2 * dsdLen[PUBKEY1]);
strcat(get->data, strMsg);
free(strMsg);
strcat(get->data, GET_MSG_AND);
strcat(get->data, GET_MSG_BODY[PUBKEY2]);
strMsg = calloc(2 * dsdLen[PUBKEY2] + 1, sizeof(char));
keyToStringKey(dsd->pubKey2, strMsg, 2 * dsdLen[PUBKEY2]);
strcat(get->data, strMsg);
free(strMsg);
strcat(get->data, GET_MSG_AND);
strcat(get->data, GET_MSG_BODY[SIGNATURE_R]);
strMsg = calloc(2 * dsdLen[SIGNATURE_R] + 1, sizeof(char));
keyToStringKey(dsd->R, strMsg, 2 * dsdLen[SIGNATURE_R]);
strcat(get->data, strMsg);
free(strMsg);
strcat(get->data, GET_MSG_AND);
strcat(get->data, GET_MSG_BODY[SIGNATURE_S]);
strMsg = calloc(2 * dsdLen[SIGNATURE_S] + 1, sizeof(char));
keyToStringKey(dsd->S, strMsg, 2 * dsdLen[SIGNATURE_S]);
strcat(get->data, strMsg);
free(strMsg);
strcat(get->data, GET_MSG_TAIL);
printNetworkData(get);
WIFI_SendData(0, get, 0);
free(get->data);
free(get);
}
/**********************************************************
*
* @file : wifi.h
* @author : HaewonSeo
*
* @note : ESP8266 WiFi Module
*
**********************************************************/
#include <stdio.h>
#include <stdlib.h>
#include "NuMicro.h"
#include "cssd_lib.h"
#ifndef __WIFI_H__
#define __WIFI_H__
#define WIFI_PORT UART3_NS // Used to connect to WIFI module
#define BYPASS_PORT UART0_NS // Used to byass WIFI module
//#define LED_Y PC11_NS // Yellow LED
//#define LED_G PC12_NS // Green LED
#define PWR_OFF PD7_NS
#define FW_UPDATE_OFF PD6_NS
#define IOCTL_INIT { \
PD_NS->MODE = (GPIO_MODE_OUTPUT << 6*2) | (GPIO_MODE_OUTPUT << 7*2); }\
//PC_NS->MODE = (GPIO_MODE_OUTPUT << 11*2) | (GPIO_MODE_OUTPUT << 12*2); } \
//PA->MODE = (GPIO_MODE_OUTPUT << 10*2) | (GPIO_MODE_OUTPUT << 11*2) ;}
typedef struct s_netData
{
char *data;
int len;
} t_netData;
void printNetworkData(t_netData *netData);
void WIFI_Init();
void WIFI_Connect();
void WIFI_Read(int);
void WIFI_Write(int, const char *, int);
int WIFI_ReceiveData(int, t_netData *);
int WIFI_SendData(int print, t_netData *netData, int port);
void WIFI_Send_BPM(int pulse);
void WIFI_Send_EncryptedMsg(uint8_t *encryptedMsg, int encryptedMsgBytes, uint32_t body);
void WIFI_Send_DigitallySignedData(t_digitallySignedData *dsd);
void WIFI_Send_EncryptedDigitallySignedData(t_digitallySignedData *dsd);
#endif /* __WIFI_H__ */
/**********************************************************
*
* @file : cssd_lib.h
* @author : HaewonSeo
*
* @note : M2351 Collaborative Secure Software Development Library header file
*
**********************************************************/
#include <stdint.h>
#ifndef __CSSD_LIB_H__
#define __CSSD_LIB_H__
typedef struct s_digitallySignedData
{
uint8_t data[17];
uint8_t pubKey1[25];
uint8_t pubKey2[25];
uint8_t R[25];
uint8_t S[25];
} t_digitallySignedData;
/*----------------------------------------------------------------------------
NonSecure Callable Functions from Secure Region
*----------------------------------------------------------------------------*/
extern uint32_t GetSystemCoreClock(void);
extern int32_t Secure_OLED_On_callback(void (*)(uint32_t));
extern int32_t Secure_OLED_Off_callback(void (*)(uint32_t));
/*----------------------------------------------------------------------------
MAX30102 Heart-Rate Sensor functions
*----------------------------------------------------------------------------*/
extern uint32_t Get_BPM();
extern uint32_t Get_EncryptedDigitallySignedData(t_digitallySignedData *dsd);
/*----------------------------------------------------------------------------
CRYPTO functions
*----------------------------------------------------------------------------*/
extern int32_t Encrypt_data(uint8_t *plainData, uint8_t *encryptedData, uint32_t bytes);
extern int32_t Decrypt_data(uint8_t *encryptedData, uint8_t *resultData, uint32_t bytes);
extern void M2351_LoadKey();
extern void M2351_DeleteKey();
/*----------------------------------------------------------------------------
PRINT functions
*----------------------------------------------------------------------------*/
extern void printBlock(uint8_t *block);
extern void printSecure(char *string, void *ptr, uint8_t val);
extern int32_t printDigitallySignedData(t_digitallySignedData *dsd);
#endif //__CSSD_LIB_H__
/**********************************************************
*
* @file : main_ns.c
* @author : HaewonSeo
*
* @note : Main of Non-secure world, Non-secure code for Collaborative Secure Software Development
*
**********************************************************/
#include <arm_cmse.h>
#include <string.h>
#include "NuMicro.h" /* Device header */
#include "cssd_lib.h" /* Collaborative Secure Software Development Library header */
#include "wifi.h"
#include "OLED_GUI.h"
#define SW2 PB0_NS
#define SW3 PB1_NS
extern const char ATCommand_CIPSTART[];
extern void OLED_BPM(uint32_t bpm);
/*----------------------------------------------------------------------------
NonSecure Functions from NonSecure Region
*----------------------------------------------------------------------------*/
void Control_SW3()
{
int result = 0;
t_netData *send;
send = calloc(1, sizeof(t_netData));
send->data = calloc(33, sizeof(char));
send->len = 0;
//result = WIFI_ReceiveData(1, rec);
const char msg[] = "Hello..";
send->len = strlen(msg);
strcpy(send->data, msg);
WIFI_SendData(1, send, 1);
free(send->data);
free(send);
t_netData *rec = malloc(sizeof(t_netData));
rec->data = malloc(sizeof(char)*33);
(rec->data)[32] = '\0';
rec->len = 0;
WIFI_ReceiveData(1, rec);
free(rec->data);
free(rec);
return ;
}
/*----------------------------------------------------------------------------
SysTick IRQ Handler
*----------------------------------------------------------------------------*/
void SysTick_Handler(void)
{
static uint32_t u32Ticks;
switch(u32Ticks++)
{
case 0:
break;
case 100:
break;
case 200:
break;
case 300:
break;
case 400:
break;
case 500:
break;
case 600:
u32Ticks = 0;
break;
default:
if(u32Ticks > 600)
{
u32Ticks = 0;
}
}
}
/*----------------------------------------------------------------------------
Main function
*----------------------------------------------------------------------------*/
int main(void)
{
int32_t i = 0;
int32_t ispulse = 0;
uint32_t pulse = 0;
t_digitallySignedData dsd;
memset(&dsd, 0, sizeof(t_digitallySignedData));
int32_t SW2_toggle = 0;
int32_t ns_ticks = 0;
printf("\n");
printf("+---------------------------------------------+\n");
printf("| Non-Secure is running ... |\n");
printf("+---------------------------------------------+\n");
/* register NonSecure callbacks in Secure application */
Secure_OLED_On_callback(&OLED_BPM);
//Secure_OLED_Off_callback(&NonSecure_OLED_Off);
/* Call secure API to get system core clock */
SystemCoreClock = GetSystemCoreClock();
/* Generate Systick interrupt each 10 ms */
SysTick_Config(SystemCoreClock / 100);
printf("\n");
printf("+---------------------------------------------+\n");
printf("| SDK1327 OLED Init |\n");
printf("+---------------------------------------------+\n");
OLED_Config();
printf("\n");
printf("+---------------------------------------------+\n");
printf("| ESP8266 WiFi Module Start |\n");
printf("+---------------------------------------------+\n");
WIFI_Connect();
while(1)
{
/* SW2 */
if(SW2 == 0)
{
while(SW2 == 0);
SW2_toggle = !SW2_toggle;
printf("\nSW2 ON in Non-secure code ...\n\n");
if(SW2_toggle)
{
ns_ticks = 0;
printf("\nMAX30102 On ...\n\n");
M2351_LoadKey();
OLED_Background_On();
}
else
{
printf("\nMAX30102 Off ...\n\n");
M2351_DeleteKey();
OLED_Off();
}
}
/* SW3 */
if(SW3 == 0)
{
while(SW3 == 0);
printf("\nSW3 ON in Non-secure code ...\n\n");
Control_SW3();
}
if(SW2_toggle)
{
/* Get digitally signed data of BPM from MAX30102 */
ispulse = Get_EncryptedDigitallySignedData(&dsd);
ns_ticks++;
if (ns_ticks >= 60)
{
ns_ticks = 0;
if (ispulse)
{
printf("\nEncrypted digitallySignedData\n");
printDigitallySignedData(&dsd);
/* Send digitally signed data of BPM to Server */
//WIFI_Send_BPM(ispulse);
WIFI_Send_EncryptedDigitallySignedData(&dsd);
}
}
}
}
}
//CLK_SysTickLongDelay(300000); //300000us = 300ms = 0.3s
/*
void testCryptDeCrypt() {
//Test Function to cipher and decypher data
//__attribute__((aligned(4))) uint8_t plainData[16] = {0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34};
__attribute__((aligned(4))) uint8_t plainData[16] = {0};
__attribute__((aligned(4))) uint8_t cipheredData[16] = {0};
__attribute__((aligned(4))) uint8_t resultData[16] = {0};
__attribute__((aligned(4))) uint8_t key[16] =
{
0x7f, 0x35, 0x91, 0xd3, 0x6f, 0xd5, 0x17, 0xa3, 0x7b, 0x6d, 0xe9, 0xe0, 0xdf, 0x93, 0x4b, 0x7a
};
__attribute__((aligned(4))) uint8_t iv[16] = {0};
sprintf((char *)plainData, "%d", 123);
printf("%s\n", plainData);
if (DEMO) {
//printSecure("&key = %p\n",key);
//printBlock(key);
//printSecure("&iv = %p\n",iv);
//printBlock(iv);
printSecure("&plainData = %p\n",plainData, NULL);
printBlock(plainData);
CLK_SysTickLongDelay(500000);
}
// Store_key(key);
// Store_iv(iv);
int c = Encrypt_data(plainData, cipheredData, 16);
if (c == NULL) printSecure("Error : 128bits only", NULL, NULL);
if (DEMO) {
CLK_SysTickLongDelay(500000);
printSecure("| Nonsecure is running ... |\n",NULL, NULL);
printSecure("&cipheredData = %p\n",cipheredData, NULL);
printBlock(cipheredData);
}
int r = Decrypt_data(cipheredData, resultData, 16);
if (r == NULL) printSecure("Error : 128bits only", NULL, NULL);
if (DEMO) {
CLK_SysTickLongDelay(500000);
printSecure("| Nonsecure is running ... |\n",NULL, NULL);
printSecure("&resultData = %p\n",resultData, NULL);
printBlock(resultData);
uint8_t error = 0;
for (uint8_t i = 0 ; i < 16 ; i++) {
if (resultData[i] != plainData[i]) error++;
}
if (error != 0) printSecure("Error plainData is not equal to resultData", NULL, NULL);
else printSecure("No error plainData is equal to resultData", NULL, NULL);
}
}
*/
\ 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>.\Secure\Secure.uvprojx</PathAndName>
<NodeIsExpanded>1</NodeIsExpanded>
</project>
<project>
<PathAndName>.\NonSecure\NonSecure.uvprojx</PathAndName>
<NodeIsActive>1</NodeIsActive>
<NodeIsExpanded>1</NodeIsExpanded>
</project>
</ProjectWorkspace>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectGui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_gui.xsd">
<SchemaVersion>-6.1</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<WinLayoutEx>
<sActiveDebugView></sActiveDebugView>
<WindowPosition>
<length>44</length>
<flags>2</flags>
<showCmd>1</showCmd>
<MinPosition>
<xPos>-1</xPos>
<yPos>-1</yPos>
</MinPosition>
<MaxPosition>
<xPos>-1</xPos>
<yPos>-1</yPos>
</MaxPosition>
<NormalPosition>
<Top>387</Top>
<Left>666</Left>
<Right>1946</Right>
<Bottom>1067</Bottom>
</NormalPosition>
</WindowPosition>
<MDIClientArea>
<RegID>0</RegID>
<MDITabState>
<Len>1305</Len>
<Data>010000000400000001000000010000000100000001000000000000000200000000000000010000000100000000000000280000002800000001000000060000000200000001000000AA433A5C55736572735C73687732365C4F6E6544726976655C4465736B746F705C323032315C323032312D315CC4B8BDBAC5E6B5F0C0DAC0CE325C4E75766F746F6E5C4D323335315F4253505F76332E30302E3030345C4D323335315365726965735F4253505F434D5349535F56332E30302E3030345C4D7950726F6A6563745C50756C73654D6F6E69746F72696E675C5365637572655C4D415833303130325C4D415833303130322E63000000000A4D415833303130322E6300000000C5D4F200FFFFFFFFA5433A5C55736572735C73687732365C4F6E6544726976655C4465736B746F705C323032315C323032312D315CC4B8BDBAC5E6B5F0C0DAC0CE325C4E75766F746F6E5C4D323335315F4253505F76332E30302E3030345C4D323335315365726965735F4253505F434D5349535F56332E30302E3030345C4D7950726F6A6563745C50756C73654D6F6E69746F72696E675C4E6F6E5365637572655C576946695C776966692E630000000006776966692E6300000000FFDC7800FFFFFFFFA3433A5C55736572735C73687732365C4F6E6544726976655C4465736B746F705C323032315C323032312D315CC4B8BDBAC5E6B5F0C0DAC0CE325C4E75766F746F6E5C4D323335315F4253505F76332E30302E3030345C4D323335315365726965735F4253505F434D5349535F56332E30302E3030345C4D7950726F6A6563745C50756C73654D6F6E69746F72696E675C4E6F6E5365637572655C6D61696E5F6E732E6300000000096D61696E5F6E732E6300000000BECEA100FFFFFFFFAA433A5C55736572735C73687732365C4F6E6544726976655C4465736B746F705C323032315C323032312D315CC4B8BDBAC5E6B5F0C0DAC0CE325C4E75766F746F6E5C4D323335315F4253505F76332E30302E3030345C4D323335315365726965735F4253505F434D5349535F56332E30302E3030345C4D7950726F6A6563745C50756C73654D6F6E69746F72696E675C5365637572655C4D415833303130325C4D415833303130322E68000000000A4D415833303130322E6800000000F0A0A100FFFFFFFF9C433A5C55736572735C73687732365C4F6E6544726976655C4465736B746F705C323032315C323032312D315CC4B8BDBAC5E6B5F0C0DAC0CE325C4E75766F746F6E5C4D323335315F4253505F76332E30302E3030345C4D323335315365726965735F4253505F434D5349535F56332E30302E3030345C4D7950726F6A6563745C50756C73654D6F6E69746F72696E675C5365637572655C6E73632E6300000000056E73632E6300000000BCA8E100FFFFFFFF9C433A5C55736572735C73687732365C4F6E6544726976655C4465736B746F705C323032315C323032312D315CC4B8BDBAC5E6B5F0C0DAC0CE325C4E75766F746F6E5C4D323335315F4253505F76332E30302E3030345C4D323335315365726965735F4253505F434D5349535F56332E30302E3030345C4D7950726F6A6563745C50756C73654D6F6E69746F72696E675C5365637572655C6E73632E6800000000056E73632E68000000009CC1B600FFFFFFFF0100000010000000C5D4F200FFDC7800BECEA100F0A0A100BCA8E1009CC1B600F7B88600D9ADC200A5C2D700B3A6BE00EAD6A300F6FA7D00B5E99D005FC3CF00C1838300CACAD500010000000000000002000000450100006E000000FF04000099040000</Data>
</MDITabState>
</MDIClientArea>
<ViewEx>
<ViewType>0</ViewType>
<ViewName>Build</ViewName>
<Window>
<RegID>-1</RegID>
<PaneID>-1</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>440100004F000000B0030000B3000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>4401000066000000B0030000CA000000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1005</RegID>
<PaneID>1005</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>03000000660000003D01000061040000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>3C0400009202000083050000C9060000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>109</RegID>
<PaneID>109</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>03000000660000003D01000061040000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>4001000057010000BC02000068040000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1465</RegID>
<PaneID>1465</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>2B000000460100002C030000FF020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1466</RegID>
<PaneID>1466</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1467</RegID>
<PaneID>1467</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>2B000000460100002C030000FF020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1468</RegID>
<PaneID>1468</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>2B000000460100002C030000FF020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1506</RegID>
<PaneID>1506</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>16384</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1913</RegID>
<PaneID>1913</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1935</RegID>
<PaneID>1935</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1936</RegID>
<PaneID>1936</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1937</RegID>
<PaneID>1937</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>2B000000460100002C030000FF020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1939</RegID>
<PaneID>1939</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1940</RegID>
<PaneID>1940</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1941</RegID>
<PaneID>1941</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>1942</RegID>
<PaneID>1942</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>2B000000460100002C030000FF020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>195</RegID>
<PaneID>195</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>03000000660000003D01000061040000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>3C0400009202000083050000C9060000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>196</RegID>
<PaneID>196</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>03000000660000003D01000061040000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000EC01000099030000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>197</RegID>
<PaneID>197</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0000000092040000FE04000045050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>198</RegID>
<PaneID>198</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>1</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>32768</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>00000000EB02000070070000C3030000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>1DFBFFFF8F020000D5FEFFFF53030000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>199</RegID>
<PaneID>199</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0300000095040000FD0900002C050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>203</RegID>
<PaneID>203</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>8192</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>204</RegID>
<PaneID>204</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D010000DE04000001020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>221</RegID>
<PaneID>221</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>00000000000000000000000000000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>0A0000000A0000006E0000006E000000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>2506</RegID>
<PaneID>2506</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>2507</RegID>
<PaneID>2507</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>343</RegID>
<PaneID>343</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>346</RegID>
<PaneID>346</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35141</RegID>
<PaneID>35141</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>0</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35824</RegID>
<PaneID>35824</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35885</RegID>
<PaneID>35885</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35886</RegID>
<PaneID>35886</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35887</RegID>
<PaneID>35887</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35888</RegID>
<PaneID>35888</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35889</RegID>
<PaneID>35889</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35890</RegID>
<PaneID>35890</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35891</RegID>
<PaneID>35891</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35892</RegID>
<PaneID>35892</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35893</RegID>
<PaneID>0</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>0</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>A40A00005E000000E40B000071010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35894</RegID>
<PaneID>35894</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35895</RegID>
<PaneID>35895</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35896</RegID>
<PaneID>35896</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35897</RegID>
<PaneID>35897</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35898</RegID>
<PaneID>35898</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>4001000057010000800200006A020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35899</RegID>
<PaneID>0</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>0</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>A40A00005E000000E40B000071010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35900</RegID>
<PaneID>35900</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35901</RegID>
<PaneID>35901</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35902</RegID>
<PaneID>35902</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35903</RegID>
<PaneID>35903</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35904</RegID>
<PaneID>35904</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>35905</RegID>
<PaneID>35905</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>38003</RegID>
<PaneID>38003</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>03000000660000003D0100006A040000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>3C0400009202000083050000C9060000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>38007</RegID>
<PaneID>38007</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0300000095040000FD0900002C050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>4001000057010000F80400001B020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>436</RegID>
<PaneID>436</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0300000095040000FD0900002C050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000EC01000099030000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>437</RegID>
<PaneID>437</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>440</RegID>
<PaneID>440</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>463</RegID>
<PaneID>463</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0300000095040000FD0900002C050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000EC01000099030000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>466</RegID>
<PaneID>466</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0300000095040000FD0900002C050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>BE0A0000780000004A0B00002A040000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>470</RegID>
<PaneID>470</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>4701000066000000AD0300009A000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000280400004B010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50000</RegID>
<PaneID>50000</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50001</RegID>
<PaneID>50001</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>4001000057010000800200006A020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50002</RegID>
<PaneID>50002</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50003</RegID>
<PaneID>50003</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50004</RegID>
<PaneID>50004</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>A40A00005E000000E40B000071010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50005</RegID>
<PaneID>50005</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>3C000000530000007C01000066010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50006</RegID>
<PaneID>50006</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50007</RegID>
<PaneID>50007</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50008</RegID>
<PaneID>50008</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50009</RegID>
<PaneID>50009</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50010</RegID>
<PaneID>50010</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50011</RegID>
<PaneID>50011</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50012</RegID>
<PaneID>50012</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>A40A00005E000000E40B000071010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50013</RegID>
<PaneID>50013</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50014</RegID>
<PaneID>0</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>0</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>3C000000530000007C01000066010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50015</RegID>
<PaneID>50015</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50016</RegID>
<PaneID>50016</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50017</RegID>
<PaneID>50017</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50018</RegID>
<PaneID>50018</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>50019</RegID>
<PaneID>50019</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>0</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>7302000066000000AD03000026010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>7000000087000000B00100009A010000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>59392</RegID>
<PaneID>59392</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>966</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>8192</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0000000000000000D10300001C000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>0A0000000A0000006E0000006E000000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>59393</RegID>
<PaneID>0</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>0000000045050000FE04000058050000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>0A0000000A0000006E0000006E000000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>59399</RegID>
<PaneID>59399</PaneID>
<IsVisible>1</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>151</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>8192</RecentFrameAlignment>
<RecentRowIndex>1</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>070000001C000000EE01000038000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>58FCFFFF3B020000F7FCFFFFE7020000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>59400</RegID>
<PaneID>59400</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>38</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>8192</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>00000000000000006F0200001C000000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>0A0000000A0000006E0000006E000000</Data>
</RectRecentFloat>
</Window>
<Window>
<RegID>824</RegID>
<PaneID>824</PaneID>
<IsVisible>0</IsVisible>
<IsFloating>0</IsFloating>
<IsTabbed>0</IsTabbed>
<IsActivated>0</IsActivated>
<MRUWidth>32767</MRUWidth>
<PinState>0</PinState>
<RecentFrameAlignment>4096</RecentFrameAlignment>
<RecentRowIndex>0</RecentRowIndex>
<RectRecentDocked>
<Len>16</Len>
<Data>FB04000090FDFFFFFB04000023010000</Data>
</RectRecentDocked>
<RectRecentFloat>
<Len>16</Len>
<Data>260100003D0100006602000050020000</Data>
</RectRecentFloat>
</Window>
<DockMan>
<Len>3390</Len>
<Data>000000000A000000000000000020000000000000FFFFFFFFFFFFFFFF44010000B3000000B0030000B7000000000000000100000004000000010000000000000000000000FFFFFFFF08000000CB00000057010000CC000000F08B00005A01000079070000D601000045890000FFFF02000B004354616262656450616E6500200000000000004401000066000000B0030000CA000000440100004F000000B0030000B30000000000000040280046080000000B446973617373656D626C7900000000CB00000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A6572000000005701000001000000FFFFFFFFFFFFFFFF14506572666F726D616E636520416E616C797A657200000000CC00000001000000FFFFFFFFFFFFFFFF0E4C6F67696320416E616C797A657200000000F08B000001000000FFFFFFFFFFFFFFFF0D436F646520436F766572616765000000005A01000001000000FFFFFFFFFFFFFFFF11496E737472756374696F6E205472616365000000007907000001000000FFFFFFFFFFFFFFFF0F53797374656D20416E616C797A657200000000D601000001000000FFFFFFFFFFFFFFFF104576656E742053746174697374696373000000004589000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFCB00000001000000FFFFFFFFCB000000000000000040000000000000FFFFFFFFFFFFFFFF6C0200004F000000700200003F010000000000000200000004000000010000000000000000000000FFFFFFFF2B000000E2050000CA0900002D8C00002E8C00002F8C0000308C0000318C0000328C0000338C0000348C0000358C0000368C0000378C0000388C0000398C00003A8C00003B8C00003C8C00003D8C00003E8C00003F8C0000408C0000418C000050C3000051C3000052C3000053C3000054C3000055C3000056C3000057C3000058C3000059C300005AC300005BC300005CC300005DC300005EC300005FC3000060C3000061C3000062C3000063C30000018000400000000000007002000066000000B003000056010000700200004F000000B00300003F01000000000000404100462B0000000753796D626F6C7300000000E205000001000000FFFFFFFFFFFFFFFF0A5472616365204461746100000000CA09000001000000FFFFFFFFFFFFFFFF00000000002D8C000001000000FFFFFFFFFFFFFFFF00000000002E8C000001000000FFFFFFFFFFFFFFFF00000000002F8C000001000000FFFFFFFFFFFFFFFF0000000000308C000001000000FFFFFFFFFFFFFFFF0000000000318C000001000000FFFFFFFFFFFFFFFF0000000000328C000001000000FFFFFFFFFFFFFFFF0000000000338C000001000000FFFFFFFFFFFFFFFF0000000000348C000001000000FFFFFFFFFFFFFFFF0000000000358C000001000000FFFFFFFFFFFFFFFF0000000000368C000001000000FFFFFFFFFFFFFFFF0000000000378C000001000000FFFFFFFFFFFFFFFF0000000000388C000001000000FFFFFFFFFFFFFFFF0000000000398C000001000000FFFFFFFFFFFFFFFF00000000003A8C000001000000FFFFFFFFFFFFFFFF00000000003B8C000001000000FFFFFFFFFFFFFFFF00000000003C8C000001000000FFFFFFFFFFFFFFFF00000000003D8C000001000000FFFFFFFFFFFFFFFF00000000003E8C000001000000FFFFFFFFFFFFFFFF00000000003F8C000001000000FFFFFFFFFFFFFFFF0000000000408C000001000000FFFFFFFFFFFFFFFF0000000000418C000001000000FFFFFFFFFFFFFFFF000000000050C3000001000000FFFFFFFFFFFFFFFF000000000051C3000001000000FFFFFFFFFFFFFFFF000000000052C3000001000000FFFFFFFFFFFFFFFF000000000053C3000001000000FFFFFFFFFFFFFFFF000000000054C3000001000000FFFFFFFFFFFFFFFF000000000055C3000001000000FFFFFFFFFFFFFFFF000000000056C3000001000000FFFFFFFFFFFFFFFF000000000057C3000001000000FFFFFFFFFFFFFFFF000000000058C3000001000000FFFFFFFFFFFFFFFF000000000059C3000001000000FFFFFFFFFFFFFFFF00000000005AC3000001000000FFFFFFFFFFFFFFFF00000000005BC3000001000000FFFFFFFFFFFFFFFF00000000005CC3000001000000FFFFFFFFFFFFFFFF00000000005DC3000001000000FFFFFFFFFFFFFFFF00000000005EC3000001000000FFFFFFFFFFFFFFFF00000000005FC3000001000000FFFFFFFFFFFFFFFF000000000060C3000001000000FFFFFFFFFFFFFFFF000000000061C3000001000000FFFFFFFFFFFFFFFF000000000062C3000001000000FFFFFFFFFFFFFFFF000000000063C3000001000000FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000001000000FFFFFFFFE205000001000000FFFFFFFFE2050000000000000010000001000000FFFFFFFFFFFFFFFF400100004F000000440100007A040000010000000200001004000000010000000000000000000000FFFFFFFF05000000ED0300006D000000C3000000C400000073940000018000100000010000000000000066000000400100009A040000000000004F000000400100007A0400000000000040410056050000000750726F6A65637401000000ED03000001000000FFFFFFFFFFFFFFFF05426F6F6B73010000006D00000001000000FFFFFFFFFFFFFFFF0946756E6374696F6E7301000000C300000001000000FFFFFFFFFFFFFFFF0954656D706C6174657301000000C400000001000000FFFFFFFFFFFFFFFF09526567697374657273000000007394000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFED03000001000000FFFFFFFFED030000000000000080000000000000FFFFFFFFFFFFFFFF0000000037010000B00300003B0100000000000001000000040000000100000000000000000000000000000000000000000000000100000000000000FFFFFFFF0F0000008F070000930700009407000095070000960700009007000091070000B5010000B801000038030000B9050000BA050000BB050000BC050000CB090000018000800000000000004401000066000000700700002A010000F804000079FDFFFFF80400003C01000000000000404100460F0000001343616C6C20537461636B202B204C6F63616C73000000008F07000001000000FFFFFFFFFFFFFFFF0755415254202331000000009307000001000000FFFFFFFFFFFFFFFF0755415254202332000000009407000001000000FFFFFFFFFFFFFFFF0755415254202333000000009507000001000000FFFFFFFFFFFFFFFF15446562756720287072696E74662920566965776572000000009607000001000000FFFFFFFFFFFFFFFF0757617463682031000000009007000001000000FFFFFFFFFFFFFFFF0757617463682032000000009107000001000000FFFFFFFFFFFFFFFF10547261636520457863657074696F6E7300000000B501000001000000FFFFFFFFFFFFFFFF0E4576656E7420436F756E7465727300000000B801000001000000FFFFFFFFFFFFFFFF09554C494E4B706C7573000000003803000001000000FFFFFFFFFFFFFFFF084D656D6F7279203100000000B905000001000000FFFFFFFFFFFFFFFF084D656D6F7279203200000000BA05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203300000000BB05000001000000FFFFFFFFFFFFFFFF084D656D6F7279203400000000BC05000001000000FFFFFFFFFFFFFFFF105472616365204E617669676174696F6E00000000CB09000001000000FFFFFFFFFFFFFFFFFFFFFFFF0000000001000000000000000000000001000000FFFFFFFFD80100003B010000DC010000A701000000000000020000000400000000000000000000000000000000000000000000000000000001000000FFFFFFFF8F07000001000000FFFFFFFF8F070000000000000080000001000000FFFFFFFFFFFFFFFF000000007A040000FE0400007E04000001000000010000100400000001000000AEFBFFFFA2000000FFFFFFFF06000000C5000000C7000000B4010000D2010000CF0100007794000001800080000001000000000000009E040000000A000065050000000000007E040000FE040000450500000000000040820056060000000C4275696C64204F757470757401000000C500000001000000FFFFFFFFFFFFFFFF0D46696E6420496E2046696C657300000000C700000001000000FFFFFFFFFFFFFFFF0A4572726F72204C69737400000000B401000001000000FFFFFFFFFFFFFFFF0E536F757263652042726F7773657200000000D201000001000000FFFFFFFFFFFFFFFF0E416C6C205265666572656E63657300000000CF01000001000000FFFFFFFFFFFFFFFF0742726F77736572000000007794000001000000FFFFFFFFFFFFFFFF00000000000000000000000000000000000000000000000001000000FFFFFFFFC500000001000000FFFFFFFFC500000001000000FFFF02001400434D756C746950616E654672616D65576E644578000100841DFBFFFF8F020000D5FEFFFF5303000000000000000000000200000000000000C60000000000000000000000000000000000000001000000C60000000000000000000000</Data>
</DockMan>
<ToolBar>
<RegID>59392</RegID>
<Name>File</Name>
<Buttons>
<Len>2980</Len>
<Data>00200000010000002800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000040004000000000000000000000000000000000100000001000000018022E100000000040005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000004000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000004000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000004000C0000000000000000000000000000000001000000010000000180F4B00000000004000D000000000000000000000000000000000100000001000000018036B10000000004000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF88000000000400460000000000000000000000000000000001000000010000000180FE880000000004004500000000000000000000000000000000010000000100000001800B810000000004001300000000000000000000000000000000010000000100000001800C810000000004001400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F0880000020000000F000000000000000000000000000000000100000001000000FFFF0100120043555646696E64436F6D626F427574746F6EE80300000000000000000000000000000000000000000000000100000001000000960000000200205000000000144154436F6D6D616E645F43574D4F44455F5345549600000000000000140010574946495F5265636569766544617461036165736730323161356332633865653966656235633462396137353362376234373662376664363432326566316633646436373437363166613939643661633237633861396131393762323732383232663663643537613535616134663530616533313762313335343566056279746573144154436F6D6D616E645F43574D4F44455F534554154154436F6D6D616E645F43574D4F44455F534554330867656E65726174650367656E12636970686572656453657373696F6E4B657903636263104145535F4B45595F53495A455F313238094145535F537461727409657370383236362E680753484148617368134543435F5665726966795369676E61747572650C464D435F526561645F4F5450094765744D696C6C69730E6D696C6C69735F636F756E7465720F435250545F49525148616E646C65720D4D424544544C535F4E45545F430000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000018024E10000000000001100000000000000000000000000000000010000000100000001800A810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E2280000002000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B46350000000000000000000000000100000001000000000000000000000001000000020021802280000000000000150000002153746172742F53746F70202644656275672053657373696F6E094374726C2B4635000000000000000000000000010000000100000000000000000000000100000000002180E0010000000000007500000021456E65726779204D6561737572656D656E742026776974686F75742044656275670000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000160000000000000000000000000000000001000000010000000180C988000000000400180000000000000000000000000000000001000000010000000180C788000000000000190000000000000000000000000000000001000000010000002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000003002180C8880000000000001700000027264B696C6C20416C6C20427265616B706F696E747320696E2043757272656E7420546172676574000000000000000000000000010000000100000000000000000000000100000000002180E50100000000000078000000264B696C6C20416C6C20427265616B706F696E747320696E204163746976652050726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180E601000000000000790000002F4B696C6C20416C6C20427265616B706F696E747320696E204D756C74692D50726F6A65637420576F726B73706163650000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000021804C010000020001001A0000000F2650726F6A6563742057696E646F77000000000000000000000000010000000100000000000000000000000100000008002180DD880000000000001A0000000750726F6A656374000000000000000000000000010000000100000000000000000000000100000000002180DC8B0000000000003A00000005426F6F6B73000000000000000000000000010000000100000000000000000000000100000000002180E18B0000000000003B0000000946756E6374696F6E73000000000000000000000000010000000100000000000000000000000100000000002180E28B000000000000400000000954656D706C6174657300000000000000000000000001000000010000000000000000000000010000000000218018890000000000003D0000000E536F757263652042726F777365720000000000000000000000000100000001000000000000000000000001000000000021800000000000000400FFFFFFFF00000000000000000001000000000000000100000000000000000000000100000000002180D988000000000000390000000C4275696C64204F7574707574000000000000000000000000010000000100000000000000000000000100000000002180E38B000000000000410000000B46696E64204F75747075740000000000000000000000000100000001000000000000000000000001000000000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001B000000000000000000000000000000000100000001000000000000000446696C65C6030000</Data>
</Buttons>
<OriginalItems>
<Len>1423</Len>
<Data>2800FFFF01001100434D4643546F6F6C426172427574746F6E00E1000000000000FFFFFFFF000100000000000000010000000000000001000000018001E1000000000000FFFFFFFF000100000000000000010000000000000001000000018003E1000000000000FFFFFFFF0001000000000000000100000000000000010000000180CD7F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF000000000000000000010000000000000001000000018023E1000000000000FFFFFFFF000100000000000000010000000000000001000000018022E1000000000000FFFFFFFF000100000000000000010000000000000001000000018025E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802BE1000000000000FFFFFFFF00010000000000000001000000000000000100000001802CE1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001807A8A000000000000FFFFFFFF00010000000000000001000000000000000100000001807B8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180D3B0000000000000FFFFFFFF000100000000000000010000000000000001000000018015B1000000000000FFFFFFFF0001000000000000000100000000000000010000000180F4B0000000000000FFFFFFFF000100000000000000010000000000000001000000018036B1000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FF88000000000000FFFFFFFF0001000000000000000100000000000000010000000180FE88000000000000FFFFFFFF00010000000000000001000000000000000100000001800B81000000000000FFFFFFFF00010000000000000001000000000000000100000001800C81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180F088000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE7F000000000000FFFFFFFF000100000000000000010000000000000001000000018024E1000000000000FFFFFFFF00010000000000000001000000000000000100000001800A81000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001802280000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C488000000000000FFFFFFFF0001000000000000000100000000000000010000000180C988000000000000FFFFFFFF0001000000000000000100000000000000010000000180C788000000000000FFFFFFFF0001000000000000000100000000000000010000000180C888000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180DD88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180FB7F000000000000FFFFFFFF000100000000000000010000000000000001000000</Data>
</OriginalItems>
<OrigResetItems>
<Len>1423</Len>
<Data>2800FFFF01001100434D4643546F6F6C426172427574746F6E00E100000000000000000000000000000000000000000000000100000001000000018001E100000000000001000000000000000000000000000000000100000001000000018003E1000000000000020000000000000000000000000000000001000000010000000180CD7F0000000000000300000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018023E100000000000004000000000000000000000000000000000100000001000000018022E100000000000005000000000000000000000000000000000100000001000000018025E10000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001802BE10000000000000700000000000000000000000000000000010000000100000001802CE10000000000000800000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001807A8A0000000000000900000000000000000000000000000000010000000100000001807B8A0000000000000A00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180D3B00000000000000B000000000000000000000000000000000100000001000000018015B10000000000000C0000000000000000000000000000000001000000010000000180F4B00000000000000D000000000000000000000000000000000100000001000000018036B10000000000000E00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FF880000000000000F0000000000000000000000000000000001000000010000000180FE880000000000001000000000000000000000000000000000010000000100000001800B810000000000001100000000000000000000000000000000010000000100000001800C810000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180F088000000000000130000000000000000000000000000000001000000010000000180EE7F00000000000014000000000000000000000000000000000100000001000000018024E10000000000001500000000000000000000000000000000010000000100000001800A810000000000001600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018022800000000000001700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C488000000000000180000000000000000000000000000000001000000010000000180C988000000000000190000000000000000000000000000000001000000010000000180C7880000000000001A0000000000000000000000000000000001000000010000000180C8880000000000001B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180DD880000000000001C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180FB7F0000000000001D000000000000000000000000000000000100000001000000</Data>
</OrigResetItems>
</ToolBar>
<ToolBar>
<RegID>59399</RegID>
<Name>Build</Name>
<Buttons>
<Len>978</Len>
<Data>00200000010000001000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F0000000000001C0000000000000000000000000000000001000000010000000180D07F0000000000001D000000000000000000000000000000000100000001000000018030800000000000001E000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6EC7040000000000006A0000000C4261746368204275696C2664000000000000000000000000010000000100000000000000000000000100000004000580C7040000000000006A0000000C4261746368204275696C266400000000000000000000000001000000010000000000000000000000010000000000058046070000000000006B0000000D42617463682052656275696C640000000000000000000000000100000001000000000000000000000001000000000005804707000000000000FFFFFFFF0B426174636820436C65616E0100000000000000010000000000000001000000000000000000000001000000000005809E8A0000000000001F0000000F4261746326682053657475702E2E2E000000000000000000000000010000000100000000000000000000000100000000000180D17F0000000004002000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000002100000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000FFFF01001900434D4643546F6F6C426172436F6D626F426F78427574746F6EBA0000000000000000000000000000000000000000000000000100000001000000960000000300205000000000094E6F6E53656375726596000000000000000100094E6F6E536563757265000000000180EB880000000000002200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000230000000000000000000000000000000001000000010000000180B08A000000000000240000000000000000000000000000000001000000010000000180A8010000000000004E00000000000000000000000000000000010000000100000001807202000000000000530000000000000000000000000000000001000000010000000180BE010000000000005000000000000000000000000000000000010000000100000000000000054275696C6497000000</Data>
</Buttons>
<OriginalItems>
<Len>583</Len>
<Data>1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000FFFFFFFF0001000000000000000100000000000000010000000180D07F000000000000FFFFFFFF00010000000000000001000000000000000100000001803080000000000000FFFFFFFF00010000000000000001000000000000000100000001809E8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D17F000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001804C8A000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001806680000000000000FFFFFFFF0001000000000000000100000000000000010000000180EB88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180C07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180B08A000000000000FFFFFFFF0001000000000000000100000000000000010000000180A801000000000000FFFFFFFF00010000000000000001000000000000000100000001807202000000000000FFFFFFFF0001000000000000000100000000000000010000000180BE01000000000000FFFFFFFF000100000000000000010000000000000001000000</Data>
</OriginalItems>
<OrigResetItems>
<Len>583</Len>
<Data>1000FFFF01001100434D4643546F6F6C426172427574746F6ECF7F000000000000000000000000000000000000000000000001000000010000000180D07F00000000000001000000000000000000000000000000000100000001000000018030800000000000000200000000000000000000000000000000010000000100000001809E8A000000000000030000000000000000000000000000000001000000010000000180D17F0000000000000400000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001804C8A0000000000000500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001806680000000000000060000000000000000000000000000000001000000010000000180EB880000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180C07F000000000000080000000000000000000000000000000001000000010000000180B08A000000000000090000000000000000000000000000000001000000010000000180A8010000000000000A000000000000000000000000000000000100000001000000018072020000000000000B0000000000000000000000000000000001000000010000000180BE010000000000000C000000000000000000000000000000000100000001000000</Data>
</OrigResetItems>
</ToolBar>
<ToolBar>
<RegID>59400</RegID>
<Name>Debug</Name>
<Buttons>
<Len>2373</Len>
<Data>00200000000000001900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000002500000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000002600000000000000000000000000000000010000000100000001801D800000000000002700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000002800000000000000000000000000000000010000000100000001801B80000000000000290000000000000000000000000000000001000000010000000180E57F0000000000002A00000000000000000000000000000000010000000100000001801C800000000000002B00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000002C00000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B0000000000002D0000000000000000000000000000000001000000010000000180F07F0000000000002E0000000000000000000000000000000001000000010000000180E8880000000000003700000000000000000000000000000000010000000100000001803B010000000000002F0000000000000000000000000000000001000000010000000180BB8A00000000000030000000000000000000000000000000000100000001000000FFFF01001500434D4643546F6F6C4261724D656E75427574746F6E0E01000000000000310000000D57617463682057696E646F7773000000000000000000000000010000000100000000000000000000000100000003001380D88B00000000000031000000085761746368202631000000000000000000000000010000000100000000000000000000000100000000001380D98B00000000000031000000085761746368202632000000000000000000000000010000000100000000000000000000000100000000001380CE01000000000000FFFFFFFF0C576174636820416E63686F720100000000000000010000000000000001000000000000000000000001000000000013800F01000000000000320000000E4D656D6F72792057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380D28B00000000000032000000094D656D6F7279202631000000000000000000000000010000000100000000000000000000000100000000001380D38B00000000000032000000094D656D6F7279202632000000000000000000000000010000000100000000000000000000000100000000001380D48B00000000000032000000094D656D6F7279202633000000000000000000000000010000000100000000000000000000000100000000001380D58B00000000000032000000094D656D6F72792026340000000000000000000000000100000001000000000000000000000001000000000013801001000000000000330000000E53657269616C2057696E646F77730000000000000000000000000100000001000000000000000000000001000000040013809307000000000000330000000855415254202326310000000000000000000000000100000001000000000000000000000001000000000013809407000000000000330000000855415254202326320000000000000000000000000100000001000000000000000000000001000000000013809507000000000000330000000855415254202326330000000000000000000000000100000001000000000000000000000001000000000013809607000000000000330000001626446562756720287072696E746629205669657765720000000000000000000000000100000001000000000000000000000001000000000013803C010000000000007200000010416E616C797369732057696E646F7773000000000000000000000000010000000100000000000000000000000100000004001380658A000000000000340000000F264C6F67696320416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380DC7F0000000000003E0000001526506572666F726D616E636520416E616C797A6572000000000000000000000000010000000100000000000000000000000100000000001380E788000000000000380000000E26436F646520436F766572616765000000000000000000000000010000000100000000000000000000000100000000001380CD01000000000000FFFFFFFF0F416E616C7973697320416E63686F7201000000000000000100000000000000010000000000000000000000010000000000138053010000000000003F0000000D54726163652057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013805401000000000000FFFFFFFF115472616365204D656E7520416E63686F720100000000000000010000000000000001000000000000000000000001000000000013802901000000000000350000001553797374656D205669657765722057696E646F77730000000000000000000000000100000001000000000000000000000001000000010013804B01000000000000FFFFFFFF1453797374656D2056696577657220416E63686F720100000000000000010000000000000001000000000000000000000001000000000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000013800189000000000000360000000F26546F6F6C626F782057696E646F7700000000000000000000000001000000010000000000000000000000010000000300138044C5000000000000FFFFFFFF0E5570646174652057696E646F77730100000000000000010000000000000001000000000000000000000001000000000013800000000000000400FFFFFFFF000000000000000000010000000000000001000000000000000000000001000000000013805B01000000000000FFFFFFFF12546F6F6C626F78204D656E75416E63686F72010000000000000001000000000000000100000000000000000000000100000000000000000005446562756726000000</Data>
</Buttons>
<OriginalItems>
<Len>898</Len>
<Data>1900FFFF01001100434D4643546F6F6C426172427574746F6ECC88000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801780000000000000FFFFFFFF00010000000000000001000000000000000100000001801D80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001801A80000000000000FFFFFFFF00010000000000000001000000000000000100000001801B80000000000000FFFFFFFF0001000000000000000100000000000000010000000180E57F000000000000FFFFFFFF00010000000000000001000000000000000100000001801C80000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800089000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF0000000000000000000100000000000000010000000180E48B000000000000FFFFFFFF0001000000000000000100000000000000010000000180F07F000000000000FFFFFFFF0001000000000000000100000000000000010000000180E888000000000000FFFFFFFF00010000000000000001000000000000000100000001803B01000000000000FFFFFFFF0001000000000000000100000000000000010000000180BB8A000000000000FFFFFFFF0001000000000000000100000000000000010000000180D88B000000000000FFFFFFFF0001000000000000000100000000000000010000000180D28B000000000000FFFFFFFF00010000000000000001000000000000000100000001809307000000000000FFFFFFFF0001000000000000000100000000000000010000000180658A000000000000FFFFFFFF0001000000000000000100000000000000010000000180C18A000000000000FFFFFFFF0001000000000000000100000000000000010000000180EE8B000000000000FFFFFFFF00010000000000000001000000000000000100000001800000000000000000FFFFFFFF00000000000000000001000000000000000100000001800189000000000000FFFFFFFF000100000000000000010000000000000001000000</Data>
</OriginalItems>
<OrigResetItems>
<Len>898</Len>
<Data>1900FFFF01001100434D4643546F6F6C426172427574746F6ECC880000000000000000000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018017800000000000000100000000000000000000000000000000010000000100000001801D800000000000000200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF00000000000000000000000000010000000100000001801A800000000000000300000000000000000000000000000000010000000100000001801B80000000000000040000000000000000000000000000000001000000010000000180E57F0000000000000500000000000000000000000000000000010000000100000001801C800000000000000600000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF000000000000000000000000000100000001000000018000890000000000000700000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180E48B000000000000080000000000000000000000000000000001000000010000000180F07F000000000000090000000000000000000000000000000001000000010000000180E8880000000000000A00000000000000000000000000000000010000000100000001803B010000000000000B0000000000000000000000000000000001000000010000000180BB8A0000000000000C0000000000000000000000000000000001000000010000000180D88B0000000000000D0000000000000000000000000000000001000000010000000180D28B0000000000000E000000000000000000000000000000000100000001000000018093070000000000000F0000000000000000000000000000000001000000010000000180658A000000000000100000000000000000000000000000000001000000010000000180C18A000000000000110000000000000000000000000000000001000000010000000180EE8B0000000000001200000000000000000000000000000000010000000100000001800000000001000000FFFFFFFF0000000000000000000000000001000000010000000180018900000000000013000000000000000000000000000000000100000001000000</Data>
</OrigResetItems>
</ToolBar>
<ControlBarsSummary>
<Bars>0</Bars>
<ScreenCX>2560</ScreenCX>
<ScreenCY>1440</ScreenCY>
</ControlBarsSummary>
</ViewEx>
</WinLayoutEx>
<MDIGroups>
<Orientation>1</Orientation>
<ActiveMDIGroup>0</ActiveMDIGroup>
<MDIGroup>
<Size>100</Size>
<ActiveTab>2</ActiveTab>
<Doc>
<Name>&lt;1&gt;.\MAX30102\MAX30102.c</Name>
<ColumnNumber>18</ColumnNumber>
<TopLine>225</TopLine>
<CurrentLine>284</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>&lt;2&gt;.\WiFi\wifi.c</Name>
<ColumnNumber>53</ColumnNumber>
<TopLine>200</TopLine>
<CurrentLine>229</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>&lt;2&gt;.\main_ns.c</Name>
<ColumnNumber>54</ColumnNumber>
<TopLine>84</TopLine>
<CurrentLine>110</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>&lt;1&gt;.\MAX30102\MAX30102.h</Name>
<ColumnNumber>0</ColumnNumber>
<TopLine>1</TopLine>
<CurrentLine>1</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>&lt;1&gt;.\nsc.c</Name>
<ColumnNumber>1</ColumnNumber>
<TopLine>7</TopLine>
<CurrentLine>28</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
<Doc>
<Name>&lt;1&gt;.\nsc.h</Name>
<ColumnNumber>19</ColumnNumber>
<TopLine>37</TopLine>
<CurrentLine>69</CurrentLine>
<Folding>1</Folding>
<ContractedFolders></ContractedFolders>
<PaneID>0</PaneID>
</Doc>
</MDIGroup>
</MDIGroups>
</ProjectGui>
/**********************************************************
*
* @file : M2351_crypto.h
* @author : HaewonSeo
*
* @note : M2351 Cryptographic Accelerator
**********************************************************/
#include "M2351_crypto.h"
#include "nsc.h"
uint32_t sessionKey[8] =
{
0x30303030, 0x30303030, 0x30303030, 0x30303030,
0x30303030, 0x30303030, 0x30303030, 0x30303030
};
uint32_t sessionIV[4] =
{
0x30303030, 0x30303030, 0x30303030, 0x30303030
};
char priKey[49] = {0};
char pubKey1[49] = {0}, pubKey2[49] = {0};
char R[49] = {0}, S[49] = {0};
#define KEY_LENGTH 192 /* Select ECC P-192 curve, 192-bits key length */
static char hex_char_tbl[] = "0123456789abcdef";
static char get_Nth_nibble_char(uint32_t val32, uint32_t idx)
{
return hex_char_tbl[(val32 >> (idx * 4U)) & 0xfU ];
}
static void Reg2Hex(int32_t count, uint32_t volatile reg[], char output[])
{
int32_t idx, ri;
uint32_t i;
output[count] = 0U;
idx = count - 1;
for(ri = 0; idx >= 0; ri++)
{
for(i = 0UL; (i < 8UL) && (idx >= 0); i++)
{
output[idx] = get_Nth_nibble_char(reg[ri], i);
idx--;
}
}
}
static void DumpBuffHex(uint8_t *pucBuff, int nBytes)
{
int32_t i32Idx, i;
i32Idx = 0;
while(nBytes > 0)
{
printf("0x%04X ", i32Idx);
for(i = 0; i < 16; i++)
printf("%02x ", pucBuff[i32Idx + i]);
printf(" ");
for(i = 0; i < 16; i++)
{
if((pucBuff[i32Idx + i] >= 0x20) && (pucBuff[i32Idx + i] < 127))
printf("%c", pucBuff[i32Idx + i]);
else
printf(".");
nBytes--;
}
i32Idx += 16;
printf("\n");
}
printf("\n");
}
void CRPT_IRQHandler()
{
if(AES_GET_INT_FLAG(CRPT))
{
g_AES_done = 1;
AES_CLR_INT_FLAG(CRPT);
}
ECC_DriverISR(CRPT);
}
void M2351_Crypto_Init(uint8_t channel, uint8_t modeAES)
{
if(modeAES != ENCRYPT && modeAES != DECRYPT)
printf("Error mode , mode must be ENCRYPT or DECRYPT value\n");
NVIC_EnableIRQ(CRPT_IRQn);
AES_ENABLE_INT(CRPT);
AES_Open(CRPT, channel, modeAES, AES_MODE_CBC, AES_KEY_SIZE_128, AES_IN_OUT_SWAP);
}
void M2351_Crypto_UseMasterKey()
{
CRPT_T *crpt = CRPT;
uint32_t u32Channel = 1;
/* Load Key */
uint32_t key_reg_addr;
// 0x3CUL : channel size
key_reg_addr = (uint32_t)&crpt->AES0_KEY[0] + (u32Channel * 0x3CUL);
/* Enable FMC ISP function */
FMC_Open();
outpw(key_reg_addr, FMC_ReadUID(0));
outpw(key_reg_addr+4UL, FMC_ReadUID(1));
outpw(key_reg_addr+8UL, FMC_ReadUID(2));
outpw(key_reg_addr+12UL, FMC_ReadUID(0));
//printf("\nmasterKey = %08x%08x%08x%08x\n",FMC_ReadUID(0),FMC_ReadUID(1),FMC_ReadUID(2),FMC_ReadUID(0));
/* Disable FMC ISP function */
FMC_Close();
//outpw(key_reg_addr, 0x2b7e1516);
//outpw(key_reg_addr+4UL, 0x28aed2a6);
//outpw(key_reg_addr+8UL, 0xabf71588);
//outpw(key_reg_addr+12UL, 0x09cf4f3c);
/* Load IV */
uint32_t iv_reg_addr;
iv_reg_addr = (uint32_t)&crpt->AES0_IV[0] + (u32Channel * 0x3CUL);
outpw(iv_reg_addr, 0x00000000);
outpw(iv_reg_addr+4UL, 0x00000000);
outpw(iv_reg_addr+8UL, 0x00000000);
outpw(iv_reg_addr+12UL, 0x00000000);
}
void M2351_Crypto_UseSessionKey(uint8_t channel)
{
if (DEMO)
printf("| Secure is running ... Use sessionKey |\n");
uint32_t tmp_sk[4];
uint32_t tmp_si[4];
for (uint8_t z = 0; z < 4; z++)
{
tmp_sk[z] = sessionKey[z];
tmp_si[z] = sessionIV[z];
}
AES_SetKey(CRPT, channel, tmp_sk, AES_KEY_SIZE_128);
AES_SetInitVect(CRPT, channel, tmp_si);
}
/* Function M2351_encrypt_data is same as Nuvoton_M2351_decrypt_data */
void M2351_Encrypt_Data(uint8_t channel, uint8_t InputData[], uint8_t OutputData[], uint32_t bytes)
{
//printf("AES ECB encrypt start.\n");
//printf("&inputData = %p\n",InputData);
//printf("&outputData = %p\n",OutputData);
AES_SetDMATransfer(CRPT, channel, (uint32_t)InputData, (uint32_t)OutputData, bytes);
/*
printf("before start AES : \n"
"CRPT->AES0_CNT : %d\n"
"CRPT->AES0_DADDR : %d\n"
"CRPT->AES0_IV : %d\n"
"CRPT->AES0_KEY : %d\n"
"CRPT->AES0_SADDR : %d\n", CRPT->AES0_CNT,CRPT->AES0_DADDR,CRPT->AES0_IV, CRPT->AES0_KEY, CRPT->AES0_SADDR);
*/
g_AES_done = 0;
/* Start AES encrypt */
AES_Start(CRPT, channel, CRYPTO_DMA_ONE_SHOT);
/* Waiting for AES calculation */
while(!g_AES_done);
//printf("AES encrypt done.\n\n");
//DumpBuffHex((uint8_t*)OutputData, sizeof((uint8_t*)InputData));
}
/* Function M2351_decrypt_data is same as Nuvoton_M2351_encrypt_data */
void M2351_Decrypt_Data(uint8_t channel, uint8_t InputData[], uint8_t OutputData[], uint32_t bytes)
{
//printf("AES ECB decrypt start.\n");
/*
printf("&inputData = %p\n",InputData);
printf("&outputData = %p\n",OutputData);
*/
AES_SetDMATransfer(CRPT, channel, (uint32_t)InputData, (uint32_t)OutputData, bytes);
/*
printf("before start AES : \n"
"CRPT->AES0_CNT : %d\n"
"CRPT->AES0_DADDR : %d\n"
"CRPT->AES0_IV : %d\n"
"CRPT->AES0_KEY : %d\n"
"CRPT->AES0_SADDR : %d\n", CRPT->AES0_CNT,CRPT->AES0_DADDR,CRPT->AES0_IV, CRPT->AES0_KEY, CRPT->AES0_SADDR);
*/
g_AES_done = 0;
/* Start AES decrypt */
AES_Start(CRPT, channel, CRYPTO_DMA_ONE_SHOT);
/* Waiting for AES calculation */
while(!g_AES_done);
//printf("AES decrypt done.\n\n");
//DumpBuffHex((uint8_t*)OutputData, sizeof((uint8_t*)InputData));
}
// OTPn : 64 bit
void M2351_FMC_Read_Key(uint32_t num, uint32_t len, char *priKey)
{
uint32_t u32OtpHw, u32OtpLw;
uint32_t i;
uint32_t otpPrivateKey[6]= {0};
printf("+---------------------------------------------+\n");
printf("| FMC Read OTP Private Key |\n");
printf("+---------------------------------------------+\n");
if(num >= FMC_OTP_ENTRY_CNT)
{
printf("Invalid OTP number.\n");
return ;
}
SYS_UnlockReg(); /* Unlock protected registers */
FMC_Open(); /* Enable FMC ISP function */
for (num = 0; num < len; num++)
{
if(FMC_Read_OTP(num, &u32OtpLw, &u32OtpHw) != 0)
{
printf("Read OTP%d failed!\n", num);
goto lexit;
}
otpPrivateKey[2*num + 0] = u32OtpLw;
otpPrivateKey[2*num + 1] = u32OtpHw;
}
for (num = 0; num < len; num++)
printf("Read OTP%d : 0x%08x-0x%08x.\n", num, otpPrivateKey[2*num + 0], otpPrivateKey[2*num + 1]);
Reg2Hex(48, otpPrivateKey, priKey);
lexit:
FMC_Close(); /* Disable FMC ISP function */
SYS_LockReg(); /* Lock protected registers */
}
void M2351_FMC_Write_Key()
{
uint32_t u32i, u32OtpHw, u32OtpLw;
SYS_UnlockReg(); /* Unlock protected registers */
FMC_Open(); /* Enable FMC ISP function */
for(u32i = 0; u32i < FMC_OTP_ENTRY_CNT; u32i++)
{
if(FMC_Read_OTP(u32i, &u32OtpLw, &u32OtpHw) != 0)
{
printf("Read OTP%d failed!\n", u32i);
goto lexit;
}
if((u32OtpLw == 0xFFFFFFFF) && (u32OtpHw == 0xFFFFFFFF))
{
printf("OTP%d is 0xFFFFFFFF-0xFFFFFFFF. It should be a free entry.\n", u32i);
break;
}
}
if(u32i == FMC_OTP_ENTRY_CNT)
{
printf("All OTP entries are used.\n");
goto lexit;
}
printf("Program OTP%d with 0x%x-0x%x...\n", u32i, 0x5A5A0000 | u32i, 0x00005A5A | u32i);
if(FMC_Write_OTP(u32i, 0x5A5A0000 | u32i, 0x00005A5A | u32i) != 0)
{
printf("Failed to program OTP%d!\n", u32i);
goto lexit;
}
if(FMC_Read_OTP(u32i, &u32OtpLw, &u32OtpHw) != 0)
{
printf("Read OTP%d failed after programmed!\n", u32i);
goto lexit;
}
printf("Read back OTP%d: 0x%x-0x%x.\n", u32i, u32OtpLw, u32OtpHw);
if((u32OtpLw != (0x5A5A0000 | u32i)) || (u32OtpHw != (0x00005A5A | u32i)))
{
printf("OTP%d value is not matched with programmed value!\n", u32i);
goto lexit;
}
printf("Lock OTP%d...\n", u32i);
if(FMC_Lock_OTP(u32i) != 0)
{
printf("Failed to lock OTP%d!\n", u32i);
goto lexit;
}
if(FMC_Read_OTP(u32i, &u32OtpLw, &u32OtpHw) != 0)
{
printf("Read OTP%d failed after programmed!\n", u32i);
goto lexit;
}
printf("Read OTP%d after locked: 0x%x-0x%x.\n", u32i, u32OtpLw, u32OtpHw);
if((u32OtpLw != (0x5A5A0000 | u32i)) || (u32OtpHw != (0x00005A5A | u32i)))
{
printf("OTP%d value is incorrect after locked!\n", u32i);
goto lexit;
}
printf("OTP Write done.\n");
lexit:
FMC_Close(); /* Disable FMC ISP function */
SYS_LockReg(); /* Lock protected registers */
}
void M2351_ECC_GenerateKey(char *priKey, char *gKey1, char *gKey2)
{
//char gKey1[168], gKey2[168]; /* temporary buffer used to keep output public keys */
char Qx[] = "1da18eaaa64fdd781bf699feb935744f18f1fa0efac1b255"; /* expected answer: public key 1 */
char Qy[] = "0bbeb7ba3ba9d4e6b8aa5738ddef4cd15ce400611094d319"; /* expected answer: public key 2 */
int32_t i;
//SYS_UnlockReg();
printf("+---------------------------------------------+\n");
printf("| Crypto ECC Public Key Generation |\n");
printf("+---------------------------------------------+\n");
/* Enable ECC interrupt */
NVIC_EnableIRQ(CRPT_IRQn);
ECC_ENABLE_INT(CRPT);
/* Generate public key from private key d */
if(ECC_GeneratePublicKey(CRPT, CURVE_P_192, priKey, gKey1, gKey2) < 0)
{
printf("ECC key generation failed!!\n");
while(1);
}
/* Verify public key 1 */
/*
if(memcmp(Qx, gKey1, KEY_LENGTH / 8))
{
printf("Public key 1 [%s] is not matched with expected [%s]!\n", gKey1, Qx);
if(memcmp(Qx, gKey1, KEY_LENGTH / 8) == 0)
printf("PASS.\n");
else
printf("Error !!\n");
for(i = 0; i < KEY_LENGTH / 8; i++)
{
if(Qx[i] != gKey1[i])
printf("\n%d - 0x%x 0x%x\n", i, Qx[i], gKey1[i]);
}
while(1);
}
*/
printf("ECC key generated OK.\n");
//printf("pubKey1 : %s\npubKey2 : %s\n", gKey1, gKey2);
}
static int32_t SHAHash(uint32_t u32Mode, uint32_t *pu32Addr, int32_t size, uint32_t digest[])
{
int32_t i;
int32_t n;
/* Enable CRYPTO */
CLK->AHBCLK |= CLK_AHBCLK_CRPTCKEN_Msk;
/* Init SHA */
CRPT->HMAC_CTL = (u32Mode << CRPT_HMAC_CTL_OPMODE_Pos) | CRPT_HMAC_CTL_INSWAP_Msk;
CRPT->HMAC_DMACNT = size;
/* Calculate SHA */
while(size > 0)
{
if(size <= 4)
{
CRPT->HMAC_CTL |= CRPT_HMAC_CTL_DMALAST_Msk;
}
/* Trigger to start SHA processing */
CRPT->HMAC_CTL |= CRPT_HMAC_CTL_START_Msk;
/* Waiting for SHA data input ready */
while((CRPT->HMAC_STS & CRPT_HMAC_STS_DATINREQ_Msk) == 0);
/* Input new SHA date */
CRPT->HMAC_DATIN = *pu32Addr;
pu32Addr++;
size -= 4;
}
/* Waiting for calculation done */
while(CRPT->HMAC_STS & CRPT_HMAC_STS_BUSY_Msk);
/* return SHA results */
if(u32Mode == SHA_MODE_SHA1)
n = 5;
else if(u32Mode == SHA_MODE_SHA224)
n = 7;
else if(u32Mode == SHA_MODE_SHA256)
n = 8;
else if(u32Mode == SHA_MODE_SHA384)
n = 12;
for(i = 0; i < n; i++)
digest[i] = CRPT->HMAC_DGST[i];
return 0;
}
void M2351_SHA_Hash(uint8_t *msg, uint8_t *hash_msg)
{
int32_t i;
uint32_t u32_hash[5];
printf("+---------------------------------------------+\n");
printf("| M2351 Crypto SHA-1 Hash |\n");
printf("+---------------------------------------------+\n");
NVIC_EnableIRQ(CRPT_IRQn);
printf("Input data:\n");
for(i=0;i<16;i++)
{
printf("%02x", msg[i]);
}
printf("\n");
SHAHash(SHA_MODE_SHA1, (uint32_t *)msg, 16, u32_hash);
//printf("\nOutput SHA1 Hash:\n");
//for(i=0; i<5; i++)
// printf("%08x", u32_hash[i]);
/*
printf("\n");
SHAHash(SHA_MODE_SHA224, (uint32_t *)g_au8Test, 32, hash);
printf("\nOutput SHA224 Hash:\n");
for(i=0;i<7;i++)
printf("%08x",hash[i]);
printf("\n");
SHAHash(SHA_MODE_SHA256, (uint32_t *)g_au8Test, 32, hash);
printf("\nOutput SHA256 Hash:\n");
for(i=0;i<8;i++)
printf("%08x",hash[i]);
printf("\n");
SHAHash(SHA_MODE_SHA384, (uint32_t *)g_au8Test, 32, hash);
printf("\nOutput SHA384 Hash:\n");
for(i=0;i<12;i++)
printf("%08x",hash[i]);
*/
Reg2Hex(40, u32_hash, (char *)hash_msg);
printf("\nOutput SHA1 Hash:\n%s\n", hash_msg);
//while(1);
}
void M2351_ECDSA_GenerateSignature(uint8_t *msg, char *priKey, char* R, char *S)
{
//char g_SHA_msg[] = "608079423f12421de616b7493ebe551cf4d65b92"; /* SHA-1 hash */
char hash_msg[41] = {0};
//char gD[] = "e14f37b3d1374ff8b03f41b9b3fdd2f0ebccf275d660d7f3"; /* private key */
char gK[] = "cb0abc7043a10783684556fb12c4154d57bc31a289685f25"; /* random integer k form [1, n-1] */
//char gR1[] = "6994d962bdd0d793ffddf855ec5bf2f91a9698b46258a63e"; /* Expected answer: R of (R,S) digital signature */
//char gS1[] = "9cbd7f157288b914a844d941bcdf46ae2355f993d040fbed"; /* Expected answer: S of (R,S) digital signature */
//char gR[168], gS[168]; /* temporary buffer used to keep digital signature (R,S) pair */
NVIC_EnableIRQ(CRPT_IRQn);
ECC_ENABLE_INT(CRPT);
printf("\n");
printf("+---------------------------------------------+\n");
printf("| Crypto ECDSA Singnature Generation |\n");
printf("+---------------------------------------------+\n");
M2351_SHA_Hash(msg, (uint8_t *)hash_msg);
/* Calculate ECC signature */
if(ECC_GenerateSignature(CRPT, CURVE_P_192, hash_msg, priKey, gK, R, S) < 0)
{
printf("ECC signature generation failed!!\n");
while(1);
}
/* Verify the signature (R,S) */
/*
if(memcmp(gR, gR1, sizeof(gR)))
{
printf("Signature R [%s] is not matched with expected [%s]!\n", gR, gR1);
while(1);
}
if(memcmp(gS, gS1, sizeof(gS)))
{
printf("Signature S [%s] is not matched with expected [%s]!\n", gS, gS1);
while(1);
}
*/
printf("\nECC digital signature generated OK.\n");
printf("Signature R : %s\nSignature S : %s\n", R, S);
}
void M2351_ECDSA_VerificationSignature(char *hash_msg, char *pubKey1, char* pubKey2, char* R, char *S)
{
//char sha_msg[] = "f621926efff296c8b7b5041577237d09d994b481"; /* SHA-1 hash */
//char Qx[] = "1da18eaaa64fdd781bf699feb935744f18f1fa0efac1b255"; /* expected answer: public key 1 */
//char Qy[] = "0bbeb7ba3ba9d4e6b8aa5738ddef4cd15ce400611094d319"; /* expected answer: public key 2 */
//char R[] = "6994d962bdd0d793ffddf855ec5bf2f91a9698b46258a63e"; /* Expected answer: R of (R,S) digital signature */
//char S[] = "ba2de074a517000325d5dbebef8acfb3943eab222ae56f46"; /* Expected answer: S of (R,S) digital signature */
/* Enable crypto interrupt */
NVIC_EnableIRQ(CRPT_IRQn);
ECC_ENABLE_INT(CRPT);
printf("+---------------------------------------------+\n");
printf("| Crypto ECDSA Singnature Verification |\n");
printf("+---------------------------------------------+\n");
/* Verify the signature */
if(ECC_VerifySignature(CRPT, CURVE_P_192, hash_msg, pubKey1, pubKey2, R, S) < 0)
{
printf("ECC signature verification failed!!\n");
while(1);
}
printf("ECC digital signature verification OK.\n");
}
/**********************************************************
*
* @file : M2351_crypto.h
* @author : HaewonSeo
*
* @note : M2351 Cryptographic Accelerator
**********************************************************/
#include <stdio.h>
#include <string.h>
#include "NuMicro.h"
#ifndef M2351_CRYPTO_H_
#define M2351_CRYPTO_H_
#define ENCRYPT 1
#define DECRYPT 0
static volatile int32_t g_AES_done;
void CRPT_IRQHandler(void);
void M2351_Crypto_Init(uint8_t, uint8_t);
void M2351_Crypto_UseSessionKey(uint8_t );
void M2351_Crypto_UseMasterKey(void);
void M2351_Encrypt_Data(uint8_t, uint8_t *, uint8_t *, uint32_t);
void M2351_Decrypt_Data(uint8_t, uint8_t *, uint8_t *, uint32_t);
void M2351_FMC_Read_Key(uint32_t num, uint32_t len, char *priKey);
void M2351_FMC_Write_Key(void);
void M2351_ECC_GenerateKey(char *priKey, char *gKey1, char *gKey2);
void M2351_SHA_Hash(uint8_t *msg, uint8_t *hash_msg);
void M2351_ECDSA_GenerateSignature(uint8_t *msg, char *priKey, char* R, char *S);
void M2351_ECDSA_VerificationSignature(char *hash_msg, char *pubKey1, char* pubKey2, char* R, char *S);
#endif /* M2351_CRYPTO_H_ */
#include "crypto_aes.h"
#include "nsc.h"
uint8_t cipheredSessionKey[16];
uint8_t sessionIv[16];
void CRPT_IRQHandler()
{
if(AES_GET_INT_FLAG(CRPT))
{
g_AES_done = 1;
AES_CLR_INT_FLAG(CRPT);
}
}
void M2351_Crypto_Init(uint8_t channel, uint8_t modeAES)
{
if(modeAES != ENCRYPT && modeAES != DECRYPT)
printf("Error mode , mode must be ENCRYPT or DECRYPT value\n");
NVIC_EnableIRQ(CRPT_IRQn);
AES_ENABLE_INT(CRPT);
AES_Open(CRPT, channel, modeAES, AES_MODE_CBC, AES_KEY_SIZE_128, AES_IN_OUT_SWAP);
}
void M2351_Crypto_UseMasterKey()
{
CRPT_T *crpt = CRPT;
uint32_t u32Channel = 1;
/* Load Key */
uint32_t key_reg_addr;
// 0x3CUL : channel size
key_reg_addr = (uint32_t)&crpt->AES0_KEY[0] + (u32Channel * 0x3CUL);
/* Enable FMC ISP function */
FMC_Open();
outpw(key_reg_addr, FMC_ReadUID(0));
outpw(key_reg_addr+4UL, FMC_ReadUID(1));
outpw(key_reg_addr+8UL, FMC_ReadUID(2));
outpw(key_reg_addr+12UL, FMC_ReadUID(0));
//printf("\nmasterKey = %08x%08x%08x%08x\n",FMC_ReadUID(0),FMC_ReadUID(1),FMC_ReadUID(2),FMC_ReadUID(0));
/* Disable FMC ISP function */
FMC_Close();
//outpw(key_reg_addr, 0x2b7e1516);
//outpw(key_reg_addr+4UL, 0x28aed2a6);
//outpw(key_reg_addr+8UL, 0xabf71588);
//outpw(key_reg_addr+12UL, 0x09cf4f3c);
/* Load IV */
uint32_t iv_reg_addr;
iv_reg_addr = (uint32_t)&crpt->AES0_IV[0] + (u32Channel * 0x3CUL);
outpw(iv_reg_addr, 0x00000000);
outpw(iv_reg_addr+4UL, 0x00000000);
outpw(iv_reg_addr+8UL, 0x00000000);
outpw(iv_reg_addr+12UL, 0x00000000);
}
void M2351_Crypto_UseSessionKey(uint8_t channel)
{
uint8_t sessionKey[16] = {0};
//printf("&cipheredSessionKey = %p\n", cipheredSessionKey);
//printBlock(cipheredSessionKey);
//M2351_Crypto_Init(1, DECRYPT);
//M2351_Crypto_UseMasterKey();
//if (DEMO)
// printf("| Secure is running ... decrypt sessionKey |\n");
//M2351_Decrypt_Data(1, cipheredSessionKey, sessionKey);
//printf("&sessionKey = %p\n", sessionKey);
//printBlock(sessionKey);
if (DEMO)
printf("| Secure is running ... Use sessionKey |\n");
uint32_t tmp_sk[4];
uint32_t tmp_si[4];
for (uint8_t z = 0; z < 4; z++)
{
tmp_sk[z] = (sessionKey[0+(4*z)] << 24) | (sessionKey[1+(4*z)] << 16) | (sessionKey[2+(4*z)] << 8) | sessionKey[3+(4*z)];
tmp_si[z] = (sessionIv[0+(4*z)] << 24) | (sessionIv[1+(4*z)] << 16) | (sessionIv[2+(4*z)] << 8) | sessionIv[3+(4*z)];
}
AES_SetKey(CRPT, channel, tmp_sk, AES_KEY_SIZE_128);
AES_SetInitVect(CRPT, channel, tmp_si);
/* Reset memory */
for (uint8_t z = 0; z < 16; z++) sessionKey[z] = 0;
for (uint8_t z = 0; z < 4; z++) {
tmp_sk[z] = 0;
tmp_si[z] = 0;
}
}
/* Function M2351_encrypt_data is same as Nuvoton_M2351_decrypt_data */
void M2351_Encrypt_Data(uint8_t channel, uint8_t InputData[], uint8_t OutputData[])
{
//printf("AES ECB encrypt start.\n");
//printf("&inputData = %p\n",InputData);
//printf("&outputData = %p\n",OutputData);
AES_SetDMATransfer(CRPT, channel, (uint32_t)InputData, (uint32_t)OutputData, 16);
/*
printf("before start AES : \n"
"CRPT->AES0_CNT : %d\n"
"CRPT->AES0_DADDR : %d\n"
"CRPT->AES0_IV : %d\n"
"CRPT->AES0_KEY : %d\n"
"CRPT->AES0_SADDR : %d\n", CRPT->AES0_CNT,CRPT->AES0_DADDR,CRPT->AES0_IV, CRPT->AES0_KEY, CRPT->AES0_SADDR);
*/
g_AES_done = 0;
/* Start AES encrypt */
AES_Start(CRPT, channel, CRYPTO_DMA_ONE_SHOT);
/* Waiting for AES calculation */
while(!g_AES_done);
//printf("AES CBC encrypt done.\n");
}
/* Function M2351_decrypt_data is same as Nuvoton_M2351_encrypt_data */
void M2351_Decrypt_Data(uint8_t channel, uint8_t InputData[], uint8_t OutputData[])
{
//printf("AES ECB decrypt start.\n");
/*
printf("&inputData = %p\n",InputData);
printf("&outputData = %p\n",OutputData);
*/
AES_SetDMATransfer(CRPT, channel, (uint32_t)InputData, (uint32_t)OutputData, 16);
/*
printf("before start AES : \n"
"CRPT->AES0_CNT : %d\n"
"CRPT->AES0_DADDR : %d\n"
"CRPT->AES0_IV : %d\n"
"CRPT->AES0_KEY : %d\n"
"CRPT->AES0_SADDR : %d\n", CRPT->AES0_CNT,CRPT->AES0_DADDR,CRPT->AES0_IV, CRPT->AES0_KEY, CRPT->AES0_SADDR);
*/
g_AES_done = 0;
/* Start AES decrypt */
AES_Start(CRPT, channel, CRYPTO_DMA_ONE_SHOT);
/* Waiting for AES calculation */
while(!g_AES_done);
//printf("AES CBC decrypt done.\n");
}
#include <stdio.h>
#include <string.h>
#include "NuMicro.h"
#ifndef CRYPTO_AES_H_
#define CRYPTO_AES_H_
#define ENCRYPT 1
#define DECRYPT 0
static volatile int32_t g_AES_done;
void CRPT_IRQHandler(void);
void M2351_Crypto_Init(uint8_t, uint8_t);
void M2351_Crypto_UseSessionKey(uint8_t );
void M2351_Crypto_UseMasterKey(void);
void M2351_Encrypt_Data(uint8_t, uint8_t *, uint8_t *);
void M2351_Decrypt_Data(uint8_t, uint8_t *, uint8_t *);
#endif /* CRYPTO_AES_H_ */
<?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>
///*************************************************************************
// * @file MAX30102.c
// * @brief
// * MAX30102 driver header file
// *
// * @note
// ********************************************************************** **/
/*
Optical Heart Rate Detection (PBA Algorithm)
By: Nathan Seidle
SparkFun Electronics
Date: October 2nd, 2016
Given a series of IR samples from the MAX30105 we discern when a heart beat is occurring
Let's have a brief chat about what this code does. We're going to try to detect
heart-rate optically. This is tricky and prone to give false readings. We really don't
want to get anyone hurt so use this code only as an example of how to process optical
data. Build fun stuff with our MAX30105 breakout board but don't use it for actual
medical diagnosis.
Excellent background on optical heart rate detection:
http://www.ti.com/lit/an/slaa655/slaa655.pdf
Good reading:
http://www.techforfuture.nl/fjc_documents/mitrabaratchi-measuringheartratewithopticalsensor.pdf
https://fruct.org/publications/fruct13/files/Lau.pdf
This is an implementation of Maxim's PBA (Penpheral Beat Amplitude) algorithm. It's been
converted to work within the Arduino framework.
*/
/* Copyright (C) 2016 Maxim Integrated Products, Inc., All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
* OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Except as contained in this notice, the name of Maxim Integrated
* Products, Inc. shall not be used except as stated in the Maxim Integrated
* Products, Inc. Branding Policy.
*
* The mere transfer of this software does not imply any licenses
* of trade secrets, proprietary technology, copyrights, patents,
* trademarks, maskwork rights, or any other form of intellectual
* property whatsoever. Maxim Integrated Products, Inc. retains all
* ownership rights.
*
*/
#include "NuMicro.h"
#include "MAX30102.h"
// Data buffer
uint8_t au8RDataBuf[6];
// Raw HR & SPo2 data from MAX30102 DATA FIFO
volatile int32_t hr_val;
volatile int32_t spo2_val;
extern volatile uint32_t millis_counter;
//extern uint32_t GetMillis();
extern uint32_t OLED_printTime;
int16_t IR_AC_Max = 20;
int16_t IR_AC_Min = -20;
int16_t IR_AC_Signal_Current = 0;
int16_t IR_AC_Signal_Previous;
int16_t IR_AC_Signal_min = 0;
int16_t IR_AC_Signal_max = 0;
int16_t IR_Average_Estimated;
int16_t positiveEdge = 0;
int16_t negativeEdge = 0;
int32_t ir_avg_reg = 0;
int16_t cbuf[32];
uint8_t offset = 0;
static const uint16_t FIRCoeffs[12] = {172, 321, 579, 927, 1360, 1858, 2390, 2916, 3391, 3768, 4012, 4096};
const int32_t RATE_SIZE = 4; //Increase this for more averaging. 4 is good.
int32_t rates[RATE_SIZE]; //Array of heart rates
int32_t rateSpot = 0;
long lastBeat = 0; //Time at which the last beat occurred
float beatsPerMinute;
int beatAvg;
/*
Configuration MAX30102 by write data to a MAX30102 and check return value
*/
void MAX30102_Config()
{
uint8_t ret = 2;
printf("+---------------------------------------------+\n");
printf("| Configuration MAX30102 in SECURE |\n");
printf("+---------------------------------------------+\n");
/* FIFO Config
Sample_AVG 4, FIFO_ROLLOVER_EN
1*/
ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX30102_FIFO_CONFIG, 0x50);
printf("| [1] MAX30102_FIFO_CONFIG ..... |\n");
/* Mode Config
Mode conrtol, Active LED Channels : Multi-LED Mode
*/
ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX30102_MODE_CONFIG, 0x07);
printf("| [2] MAX30102_MODE_CONFIG ..... |\n");
/* SpO2 Config
SPO2 ADC range control(4096), SPO2 sample rate 400/1s,
LED pulse width = 411, ADC Resolution = 18bit
0b00101111
*/
ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX30102_SPO2_CONFIG, 0x2F);
printf("| [3] MAX30102_SPO2_CONFIG ..... |\n");
/* LED Pulse Amplitude
Typical LED1(RED) current : 2.0mA
Typical LED2(IR) current : 6.2mA
*/
ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX30102_LED1_AMP, 0x0A);
printf("| [4] MAX30102_LED1_AMP ..... |\n");
ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX30102_LED2_AMP, 0x1F);
printf("| [5] MAX30102_LED2_AMP ..... |\n");
/* Multi-LED Mode Control Registers
Slot1 : LED1(RED), Slot2 : LED2(IR)
*/
ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX31012_MLED_CTRL1, 0x21);
printf("| [6] MAX31012_MLED_CTRL1 ..... |\n");
//ret = I2C_WriteByteOneReg(I2C0, MAX30102_ADDR, MAX31012_MLED_CTRL2, 0x00);
//printf("| [5]MAX31012_MLED_CTRL2 --- ret %d |\n", ret);
if (ret)
printf("| MAX31012 Configuration Error! |\n");
printf("+---------------------------------------------+\n");
}
// Heart Rate Monitor functions takes a sample value and the sample number
// Returns true if a beat is detected
// A running average of four samples is recommended for display on the screen.
int checkForBeat(int32_t sample)
{
int beatDetected = 0;
// Save current state
IR_AC_Signal_Previous = IR_AC_Signal_Current;
//This is good to view for debugging
//Serial.print("Signal_Current: ");
//Serial.println(IR_AC_Signal_Current);
// Process next data sample
IR_Average_Estimated = averageDCEstimator(&ir_avg_reg, sample);
IR_AC_Signal_Current = lowPassFIRFilter(sample - IR_Average_Estimated);
//printf("\n\t\t\t\t\t\t IR_AC_Signal_Previous(%d), IR_AC_Signal_Current(%d)\n", IR_AC_Signal_Previous , IR_AC_Signal_Current);
// Detect positive zero crossing (rising edge)
if ((IR_AC_Signal_Previous < 0) & (IR_AC_Signal_Current >= 0))
{
IR_AC_Max = IR_AC_Signal_max; //Adjust our AC max and min
IR_AC_Min = IR_AC_Signal_min;
positiveEdge = 1;
negativeEdge = 0;
IR_AC_Signal_max = 0;
//printf("\n\t\t\t\t\t\tIR_AC_Max(%d) - IR_AC_Min(%d) : %d --------------------------------------------------------\n", IR_AC_Max, IR_AC_Max, IR_AC_Min - IR_AC_Min);
//if ((IR_AC_Max - IR_AC_Min) > 20 & (IR_AC_Max - IR_AC_Min) < 1000)
if ((IR_AC_Max - IR_AC_Min) > 20 & (IR_AC_Max - IR_AC_Min) < 1000)
{
//Heart beat!!!
beatDetected = 1;
}
}
// Detect negative zero crossing (falling edge)
if ((IR_AC_Signal_Previous > 0) & (IR_AC_Signal_Current <= 0))
{
positiveEdge = 0;
negativeEdge = 1;
IR_AC_Signal_min = 0;
}
// Find Maximum value in positive cycle
if (positiveEdge & (IR_AC_Signal_Current > IR_AC_Signal_Previous))
{
IR_AC_Signal_max = IR_AC_Signal_Current;
}
// Find Minimum value in negative cycle
if (negativeEdge & (IR_AC_Signal_Current < IR_AC_Signal_Previous))
{
IR_AC_Signal_min = IR_AC_Signal_Current;
}
return(beatDetected);
}
// Average DC Estimator
int16_t averageDCEstimator(int32_t *p, uint16_t x)
{
*p += ((((long) x << 15) - *p) >> 4);
return (*p >> 15);
}
// Low Pass FIR Filter
int16_t lowPassFIRFilter(int16_t din)
{
cbuf[offset] = din;
int32_t z = mul16(FIRCoeffs[11], cbuf[(offset - 11) & 0x1F]);
for (uint8_t i = 0 ; i < 11 ; i++)
{
z += mul16(FIRCoeffs[i], cbuf[(offset - i) & 0x1F] + cbuf[(offset - 22 + i) & 0x1F]);
}
offset++;
offset %= 32; //Wrap condition
return(z >> 15);
}
// Integer multiplier
int32_t mul16(int16_t x, int16_t y)
{
return((long)x * (long)y);
}
/* Get FIFO from MAX30102 */
void MAX30102_GetFIFO()
{
I2C_ReadMultiBytesOneReg(I2C0, MAX30102_ADDR, MAX30102_FIFO_DATA, au8RDataBuf, 6);
hr_val = (au8RDataBuf[0]<<16)|(au8RDataBuf[1]<<8)|au8RDataBuf[2]; //RED LED
spo2_val = (au8RDataBuf[3]<<16)|(au8RDataBuf[4]<<8)|au8RDataBuf[5]; //IR LED(pulse oximetry)
//printf("\n+---------------------------------------------+\n");
//printf("HR_val : %#08x(%d)\t \n", hr_val, hr_val);
//printf("HR_val : %#08x(%d),\t Spo2_val : %#08x(%d) \r\n", hr_val, hr_val, spo2_val, spo2_val);
//printf("+---------------------------------------------+\n");
//CLK_SysTickDelay(300000); //300000us = 300ms = 0.3s
}
uint32_t MAX30102_ComputeBPM()
{
int i;
long irValue;
long delta;
MAX30102_GetFIFO();
irValue = (long)spo2_val;
if (checkForBeat(irValue) == 1)
{
//printf("\nWe sensed a beat!\n");
//printf("\nmillis = %d\t delta = %ld\n", millis_counter, delta);
delta = (millis_counter - lastBeat) - OLED_printTime;
lastBeat = millis_counter;
beatsPerMinute = 60 / (delta / 1000.0);
if (beatsPerMinute < 150 && beatsPerMinute > 20)
{
rates[rateSpot++] = (int)beatsPerMinute; //Store this reading in the array
rateSpot %= RATE_SIZE; //Wrap variable
//Take average of readings
beatAvg = 0;
for (i = 0 ; i < RATE_SIZE ; i++)
beatAvg += rates[i];
beatAvg /= RATE_SIZE;
}
}
printf("\nIR = %ld\t", irValue);
printf("BPM = %f\t", beatsPerMinute);
printf("Avg BPM = %d\t", beatAvg);
if (irValue < 50000)
{
printf("[No Finger]");
return 0;
}
return 1;
}
/**********************************************************
*
* @file : MAX30102.h
* @author : HaewonSeo
*
* @note : MAX30102-Heart-Rate Sensor
**********************************************************/
#ifndef __I2C_MAX30102_H__
#define __I2C_MAX30102_H__
#include <stdio.h>
#include "M2351.h"
/* MAX30102 I2C-ADDRESS */
#define MAX30102_ADDR 0x57 // 8bit address converted to 7bit
/* MAX30102 Register Map */
#define MAX30102_INT_STATUS1 0x00 // Which interrupts are tripped
#define MAX30102_INT_STATUS2 0x01 // Which interrupts are tripped
#define MAX30102_INT_ENABLE1 0x02 // Which interrupts are active
#define MAX30102_INT_ENABLE2 0x03 // Which interrupts are active
#define MAX30102_FIFO_WR_PTR 0x04 // Where data is being written
#define MAX30102_OVRFLOW_CTR 0x05 // Number of lost samples
#define MAX30102_FIFO_RD_PTR 0x06 // Where to read from
#define MAX30102_FIFO_DATA 0x07 // Ouput data buffer
#define MAX30102_FIFO_CONFIG 0x08
#define MAX30102_MODE_CONFIG 0x09 // Control register
#define MAX30102_SPO2_CONFIG 0x0A // Oximetry settings
#define MAX30102_LED1_AMP 0x0C
#define MAX30102_LED2_AMP 0x0D
#define MAX30102_PILOT 0x10
#define MAX31012_MLED_CTRL1 0x11
#define MAX31012_MLED_CTRL2 0x12
#define MAX30102_TEMP_INTG 0x1F // Temperature value, whole number
#define MAX30102_TEMP_FRAC 0x20 // Temperature value, fraction
#define MAX30102_DIE_TEMP 0x21
#define MAX30102_PROX_INT_TRESH 0x30
#define MAX30102_REV_ID 0xFE // Part revision
#define MAX30102_PART_ID 0xFF // Part ID, normally 0x11
//void Get_Data_From_MAX30102();
void MAX30102_Config();
int checkForBeat(int32_t sample);
int16_t averageDCEstimator(int32_t *p, uint16_t x);
int16_t lowPassFIRFilter(int16_t din);
int32_t mul16(int16_t x, int16_t y);
void MAX30102_GetFIFO();
uint32_t MAX30102_ComputeBPM();
//extern void I2C1_Init(void);
//extern int32_t I2C0_Read_Write_SLAVE(uint8_t u8SlvAddr);
//extern int32_t I2C0_Read(uint8_t u8SlvAddr, uint8_t u8Reg, uint8_t u8Byte);
#endif //__I2C_MAX30102_H__
/*** (C) COPYRIGHT 2019 Nuvoton Technology Corp. ***/
[Version]
Nu_LinkVersion=V5.15
[Process]
ProcessID=0x000079c8
ProcessCreationTime_L=0xab44af4b
ProcessCreationTime_H=0x01d75ed7
NuLinkID=0x180016bb
NuLinkIDs_Count=0x00000001
NuLinkID0=0x180016bb
[ChipSelect]
;ChipName=<NUC1xx|NUC2xx|M05x|N571|N572|Nano100|N512|Mini51|NUC505|General>
ChipName=M2351
[NUC505]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=NUC505_SPIFLASH.FLM
[NUC4xx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=NUC400_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x014fb180
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[NUC2xx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC200_AP_128.FLM
[NUC1311]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC1311_AP_64.FLM
[NUC126]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=NUC126_AP_256.FLM
[NUC121]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC121_AP_32.FLM
[NUC1xx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NUC100_AP_128.FLM
[NUC029]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NUC029_AP_16.FLM
[NM1820]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1820_AP_17_5.FLM
[NM1810]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1810_AP_29_5.FLM
[NM1500]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1500_AP_128.FLM
[NM1330]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1330_AP_64.FLM
[NM1320]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1320_AP_32.FLM
[NM1240]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1240_AP_64.FLM
[NM1230]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=NM1230_AP_64.FLM
[NM1200]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1200_AP_8.FLM
[NM1120]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NM1120_AP_29_5.FLM
[TF5100]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=TF5100_AP_64.FLM
[NDA102]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=NDA102_AP_29_5.FLM
[Nano103]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=Nano103_AP_64.FLM
[Nano100]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=Nano100_AP_64.FLM
[N576]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N576_AP_145.FLM
[N575]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N575_AP_145.FLM
[N572]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=N572Fxxx.FLM
[N571]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=N571E000.FLM
[N570]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N570_AP_64.FLM
[N569]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N569_AP_64.FLM
[N512]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=N512_AP_64.FLM
[Mini57]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=Mini57_AP_29_5.FLM
[Mini51]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=Mini51_AP_16.FLM
[M481]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M481_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M480LD]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M480LD_AP_256.FLM
[M479]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M479_AP_256.FLM
[M451]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M451_AP_256.FLM
[M471]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Bank=0
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M471_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M251]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=M251_AP_192.FLM
[M2351]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM with IAP
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x00004000
ProgramAlgorithm=M2351_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
CheckDPM=0
DisableTimeoutDetect=0
[M261]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M261_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[MR63]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=MR63_AP_512.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M2354]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Bank=0
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
CheckDPM=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=M2354_AP_1M.FLM
TraceConf0=0x00000002
TraceConf1=0x00b71b00
TraceConf2=0x00000800
TraceConf3=0x00000000
TraceConf4=0x00000001
TraceConf5=0x00000000
[M071]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=M071_AP_128.FLM
[M0564]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x2000
ProgramAlgorithm=M0564_AP_256.FLM
[M0519]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=M0519_AP_128.FLM
[M0518]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=M0518_AP_64.FLM
[M05x]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=1
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M0516_AP_64.FLM
[M0A21]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M0A21_AP_32.FLM
[M030G]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
DisableTimeoutDetect=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M030G_AP_64.FLM
[M031]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Bank=0
Erase=1
Program=1
Verify=1
ResetAndRun=1
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x800
ProgramAlgorithm=M031_AP_128.FLM
[NPCX]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=NPCX_AP_512.FLM
[I96000]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=2
Program=0
Verify=0
ResetAndRun=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x8000
ProgramAlgorithm=
[I94000]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=I94000_AP_512.FLM
[ISD9300]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=ISD9300_AP_145.FLM
[I9200]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=I9200_AP_128.FLM
[ISD9xxx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=ISD9100_AP_145.FLM
[ISD9000]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=ISD9000_AP_64.FLM
[AU9xxx]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
FlashSelect=APROM
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableFlashBreakpoint=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x1000
ProgramAlgorithm=AU9100_AP_145.FLM
[Autodetect]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=
[General]
Connect=0
Reset=Autodetect
MaxClock=1MHz
MemoryVerify=0
IOVoltage=3300
Erase=1
Program=1
Verify=1
ResetAndRun=0
EnableLog=0
MemAccessWhileRun=0
RAMForAlgorithmStart=0x20000000
RAMForAlgorithmSize=0x4000
ProgramAlgorithm=
/*
* Copyright (c) 2013-2018 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Revision: V5.1.0
*
* Project: CMSIS-RTOS RTX
* Title: RTX Configuration
*
* -----------------------------------------------------------------------------
*/
#include "cmsis_compiler.h"
#include "rtx_os.h"
// OS Idle Thread
__WEAK __NO_RETURN void osRtxIdleThread (void *argument) {
(void)argument;
for (;;) {}
}
// OS Error Callback function
__WEAK uint32_t osRtxErrorNotify (uint32_t code, void *object_id) {
(void)object_id;
switch (code) {
case osRtxErrorStackUnderflow:
// Stack overflow detected for thread (thread_id=object_id)
break;
case osRtxErrorISRQueueOverflow:
// ISR Queue overflow detected when inserting object (object_id)
break;
case osRtxErrorTimerQueueOverflow:
// User Timer Callback Queue overflow detected for timer (timer_id=object_id)
break;
case osRtxErrorClibSpace:
// Standard C/C++ library libspace not available: increase OS_THREAD_LIBSPACE_NUM
break;
case osRtxErrorClibMutex:
// Standard C/C++ library mutex initialization failed
break;
default:
// Reserved
break;
}
for (;;) {}
//return 0U;
}
/*
* Copyright (c) 2013-2020 Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* -----------------------------------------------------------------------------
*
* $Revision: V5.5.1
*
* Project: CMSIS-RTOS RTX
* Title: RTX Configuration definitions
*
* -----------------------------------------------------------------------------
*/
#ifndef RTX_CONFIG_H_
#define RTX_CONFIG_H_
#ifdef _RTE_
#include "RTE_Components.h"
#ifdef RTE_RTX_CONFIG_H
#include RTE_RTX_CONFIG_H
#endif
#endif
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>System Configuration
// =======================
// <o>Global Dynamic Memory size [bytes] <0-1073741824:8>
// <i> Defines the combined global dynamic memory size.
// <i> Default: 32768
#ifndef OS_DYNAMIC_MEM_SIZE
#define OS_DYNAMIC_MEM_SIZE 32768
#endif
// <o>Kernel Tick Frequency [Hz] <1-1000000>
// <i> Defines base time unit for delays and timeouts.
// <i> Default: 1000 (1ms tick)
#ifndef OS_TICK_FREQ
#define OS_TICK_FREQ 1000
#endif
// <e>Round-Robin Thread switching
// <i> Enables Round-Robin Thread switching.
#ifndef OS_ROBIN_ENABLE
#define OS_ROBIN_ENABLE 1
#endif
// <o>Round-Robin Timeout <1-1000>
// <i> Defines how many ticks a thread will execute before a thread switch.
// <i> Default: 5
#ifndef OS_ROBIN_TIMEOUT
#define OS_ROBIN_TIMEOUT 5
#endif
// </e>
// <o>ISR FIFO Queue
// <4=> 4 entries <8=> 8 entries <12=> 12 entries <16=> 16 entries
// <24=> 24 entries <32=> 32 entries <48=> 48 entries <64=> 64 entries
// <96=> 96 entries <128=> 128 entries <196=> 196 entries <256=> 256 entries
// <i> RTOS Functions called from ISR store requests to this buffer.
// <i> Default: 16 entries
#ifndef OS_ISR_FIFO_QUEUE
#define OS_ISR_FIFO_QUEUE 16
#endif
// <q>Object Memory usage counters
// <i> Enables object memory usage counters (requires RTX source variant).
#ifndef OS_OBJ_MEM_USAGE
#define OS_OBJ_MEM_USAGE 0
#endif
// </h>
// <h>Thread Configuration
// =======================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_THREAD_OBJ_MEM
#define OS_THREAD_OBJ_MEM 0
#endif
// <o>Number of user Threads <1-1000>
// <i> Defines maximum number of user threads that can be active at the same time.
// <i> Applies to user threads with system provided memory for control blocks.
#ifndef OS_THREAD_NUM
#define OS_THREAD_NUM 1
#endif
// <o>Number of user Threads with default Stack size <0-1000>
// <i> Defines maximum number of user threads with default stack size.
// <i> Applies to user threads with zero stack size specified.
#ifndef OS_THREAD_DEF_STACK_NUM
#define OS_THREAD_DEF_STACK_NUM 0
#endif
// <o>Total Stack size [bytes] for user Threads with user-provided Stack size <0-1073741824:8>
// <i> Defines the combined stack size for user threads with user-provided stack size.
// <i> Applies to user threads with user-provided stack size and system provided memory for stack.
// <i> Default: 0
#ifndef OS_THREAD_USER_STACK_SIZE
#define OS_THREAD_USER_STACK_SIZE 0
#endif
// </e>
// <o>Default Thread Stack size [bytes] <96-1073741824:8>
// <i> Defines stack size for threads with zero stack size specified.
// <i> Default: 3072
#ifndef OS_STACK_SIZE
#define OS_STACK_SIZE 3072
#endif
// <o>Idle Thread Stack size [bytes] <72-1073741824:8>
// <i> Defines stack size for Idle thread.
// <i> Default: 512
#ifndef OS_IDLE_THREAD_STACK_SIZE
#define OS_IDLE_THREAD_STACK_SIZE 512
#endif
// <o>Idle Thread TrustZone Module Identifier
// <i> Defines TrustZone Thread Context Management Identifier.
// <i> Applies only to cores with TrustZone technology.
// <i> Default: 0 (not used)
#ifndef OS_IDLE_THREAD_TZ_MOD_ID
#define OS_IDLE_THREAD_TZ_MOD_ID 0
#endif
// <q>Stack overrun checking
// <i> Enables stack overrun check at thread switch.
// <i> Enabling this option increases slightly the execution time of a thread switch.
#ifndef OS_STACK_CHECK
#define OS_STACK_CHECK 1
#endif
// <q>Stack usage watermark
// <i> Initializes thread stack with watermark pattern for analyzing stack usage.
// <i> Enabling this option increases significantly the execution time of thread creation.
#ifndef OS_STACK_WATERMARK
#define OS_STACK_WATERMARK 0
#endif
// <o>Processor mode for Thread execution
// <0=> Unprivileged mode
// <1=> Privileged mode
// <i> Default: Privileged mode
#ifndef OS_PRIVILEGE_MODE
#define OS_PRIVILEGE_MODE 1
#endif
// </h>
// <h>Timer Configuration
// ======================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_TIMER_OBJ_MEM
#define OS_TIMER_OBJ_MEM 0
#endif
// <o>Number of Timer objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_TIMER_NUM
#define OS_TIMER_NUM 1
#endif
// </e>
// <o>Timer Thread Priority
// <8=> Low
// <16=> Below Normal <24=> Normal <32=> Above Normal
// <40=> High
// <48=> Realtime
// <i> Defines priority for timer thread
// <i> Default: High
#ifndef OS_TIMER_THREAD_PRIO
#define OS_TIMER_THREAD_PRIO 40
#endif
// <o>Timer Thread Stack size [bytes] <0-1073741824:8>
// <i> Defines stack size for Timer thread.
// <i> May be set to 0 when timers are not used.
// <i> Default: 512
#ifndef OS_TIMER_THREAD_STACK_SIZE
#define OS_TIMER_THREAD_STACK_SIZE 512
#endif
// <o>Timer Thread TrustZone Module Identifier
// <i> Defines TrustZone Thread Context Management Identifier.
// <i> Applies only to cores with TrustZone technology.
// <i> Default: 0 (not used)
#ifndef OS_TIMER_THREAD_TZ_MOD_ID
#define OS_TIMER_THREAD_TZ_MOD_ID 0
#endif
// <o>Timer Callback Queue entries <0-256>
// <i> Number of concurrent active timer callback functions.
// <i> May be set to 0 when timers are not used.
// <i> Default: 4
#ifndef OS_TIMER_CB_QUEUE
#define OS_TIMER_CB_QUEUE 4
#endif
// </h>
// <h>Event Flags Configuration
// ============================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_EVFLAGS_OBJ_MEM
#define OS_EVFLAGS_OBJ_MEM 0
#endif
// <o>Number of Event Flags objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_EVFLAGS_NUM
#define OS_EVFLAGS_NUM 1
#endif
// </e>
// </h>
// <h>Mutex Configuration
// ======================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_MUTEX_OBJ_MEM
#define OS_MUTEX_OBJ_MEM 0
#endif
// <o>Number of Mutex objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_MUTEX_NUM
#define OS_MUTEX_NUM 1
#endif
// </e>
// </h>
// <h>Semaphore Configuration
// ==========================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_SEMAPHORE_OBJ_MEM
#define OS_SEMAPHORE_OBJ_MEM 0
#endif
// <o>Number of Semaphore objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_SEMAPHORE_NUM
#define OS_SEMAPHORE_NUM 1
#endif
// </e>
// </h>
// <h>Memory Pool Configuration
// ============================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_MEMPOOL_OBJ_MEM
#define OS_MEMPOOL_OBJ_MEM 0
#endif
// <o>Number of Memory Pool objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_MEMPOOL_NUM
#define OS_MEMPOOL_NUM 1
#endif
// <o>Data Storage Memory size [bytes] <0-1073741824:8>
// <i> Defines the combined data storage memory size.
// <i> Applies to objects with system provided memory for data storage.
// <i> Default: 0
#ifndef OS_MEMPOOL_DATA_SIZE
#define OS_MEMPOOL_DATA_SIZE 0
#endif
// </e>
// </h>
// <h>Message Queue Configuration
// ==============================
// <e>Object specific Memory allocation
// <i> Enables object specific memory allocation.
#ifndef OS_MSGQUEUE_OBJ_MEM
#define OS_MSGQUEUE_OBJ_MEM 0
#endif
// <o>Number of Message Queue objects <1-1000>
// <i> Defines maximum number of objects that can be active at the same time.
// <i> Applies to objects with system provided memory for control blocks.
#ifndef OS_MSGQUEUE_NUM
#define OS_MSGQUEUE_NUM 1
#endif
// <o>Data Storage Memory size [bytes] <0-1073741824:8>
// <i> Defines the combined data storage memory size.
// <i> Applies to objects with system provided memory for data storage.
// <i> Default: 0
#ifndef OS_MSGQUEUE_DATA_SIZE
#define OS_MSGQUEUE_DATA_SIZE 0
#endif
// </e>
// </h>
// <h>Event Recorder Configuration
// ===============================
// <e>Global Initialization
// <i> Initialize Event Recorder during 'osKernelInitialize'.
#ifndef OS_EVR_INIT
#define OS_EVR_INIT 0
#endif
// <q>Start recording
// <i> Start event recording after initialization.
#ifndef OS_EVR_START
#define OS_EVR_START 1
#endif
// <h>Global Event Filter Setup
// <i> Initial recording level applied to all components.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_LEVEL
#define OS_EVR_LEVEL 0x00U
#endif
// <h>RTOS Event Filter Setup
// <i> Recording levels for RTX components.
// <i> Only applicable if events for the respective component are generated.
// <h>Memory Management
// <i> Recording level for Memory Management events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MEMORY_LEVEL
#define OS_EVR_MEMORY_LEVEL 0x01U
#endif
// <h>Kernel
// <i> Recording level for Kernel events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_KERNEL_LEVEL
#define OS_EVR_KERNEL_LEVEL 0x01U
#endif
// <h>Thread
// <i> Recording level for Thread events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_THREAD_LEVEL
#define OS_EVR_THREAD_LEVEL 0x05U
#endif
// <h>Generic Wait
// <i> Recording level for Generic Wait events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_WAIT_LEVEL
#define OS_EVR_WAIT_LEVEL 0x01U
#endif
// <h>Thread Flags
// <i> Recording level for Thread Flags events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_THFLAGS_LEVEL
#define OS_EVR_THFLAGS_LEVEL 0x01U
#endif
// <h>Event Flags
// <i> Recording level for Event Flags events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_EVFLAGS_LEVEL
#define OS_EVR_EVFLAGS_LEVEL 0x01U
#endif
// <h>Timer
// <i> Recording level for Timer events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_TIMER_LEVEL
#define OS_EVR_TIMER_LEVEL 0x01U
#endif
// <h>Mutex
// <i> Recording level for Mutex events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MUTEX_LEVEL
#define OS_EVR_MUTEX_LEVEL 0x01U
#endif
// <h>Semaphore
// <i> Recording level for Semaphore events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_SEMAPHORE_LEVEL
#define OS_EVR_SEMAPHORE_LEVEL 0x01U
#endif
// <h>Memory Pool
// <i> Recording level for Memory Pool events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MEMPOOL_LEVEL
#define OS_EVR_MEMPOOL_LEVEL 0x01U
#endif
// <h>Message Queue
// <i> Recording level for Message Queue events.
// <o.0>Error events
// <o.1>API function call events
// <o.2>Operation events
// <o.3>Detailed operation events
// </h>
#ifndef OS_EVR_MSGQUEUE_LEVEL
#define OS_EVR_MSGQUEUE_LEVEL 0x01U
#endif
// </h>
// </e>
// <h>RTOS Event Generation
// <i> Enables event generation for RTX components (requires RTX source variant).
// <q>Memory Management
// <i> Enables Memory Management event generation.
#ifndef OS_EVR_MEMORY
#define OS_EVR_MEMORY 1
#endif
// <q>Kernel
// <i> Enables Kernel event generation.
#ifndef OS_EVR_KERNEL
#define OS_EVR_KERNEL 1
#endif
// <q>Thread
// <i> Enables Thread event generation.
#ifndef OS_EVR_THREAD
#define OS_EVR_THREAD 1
#endif
// <q>Generic Wait
// <i> Enables Generic Wait event generation.
#ifndef OS_EVR_WAIT
#define OS_EVR_WAIT 1
#endif
// <q>Thread Flags
// <i> Enables Thread Flags event generation.
#ifndef OS_EVR_THFLAGS
#define OS_EVR_THFLAGS 1
#endif
// <q>Event Flags
// <i> Enables Event Flags event generation.
#ifndef OS_EVR_EVFLAGS
#define OS_EVR_EVFLAGS 1
#endif
// <q>Timer
// <i> Enables Timer event generation.
#ifndef OS_EVR_TIMER
#define OS_EVR_TIMER 1
#endif
// <q>Mutex
// <i> Enables Mutex event generation.
#ifndef OS_EVR_MUTEX
#define OS_EVR_MUTEX 1
#endif
// <q>Semaphore
// <i> Enables Semaphore event generation.
#ifndef OS_EVR_SEMAPHORE
#define OS_EVR_SEMAPHORE 1
#endif
// <q>Memory Pool
// <i> Enables Memory Pool event generation.
#ifndef OS_EVR_MEMPOOL
#define OS_EVR_MEMPOOL 1
#endif
// <q>Message Queue
// <i> Enables Message Queue event generation.
#ifndef OS_EVR_MSGQUEUE
#define OS_EVR_MSGQUEUE 1
#endif
// </h>
// </h>
// Number of Threads which use standard C/C++ library libspace
// (when thread specific memory allocation is not used).
#if (OS_THREAD_OBJ_MEM == 0)
#ifndef OS_THREAD_LIBSPACE_NUM
#define OS_THREAD_LIBSPACE_NUM 4
#endif
#else
#define OS_THREAD_LIBSPACE_NUM OS_THREAD_NUM
#endif
//------------- <<< end of configuration section >>> ---------------------------
#endif // RTX_CONFIG_H_
/* -----------------------------------------------------------------------------
* Copyright (c) 2019 Arm Limited (or its affiliates). All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* $Date: 12. November 2019
* $Revision: V1.0
*
* Project: ESP8266 WiFi Driver
* -------------------------------------------------------------------------- */
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>ESP8266 WiFi Driver Configuration
// <o> WiFi Driver Number (Driver_WiFi#) <0-255>
// <i> Defines exported WiFi driver control block number (Driver_WiFi#)
// <i> Default: 0
#define WIFI_ESP8266_DRIVER_NUMBER 0
// <o>Connect to hardware via Driver_USART# <0-255>
// <i>Defines the serial driver control block number (Driver_USART#)
// <i> Default: 0
#define WIFI_ESP8266_SERIAL_DRIVER 0
// <o> Serial interface baudrate <115200=>115200
// <230400=>230400
// <460800=>460800
// <921600=>921600
// <i> Defines the serial interface baudrate.
// <i> Default: 115200
#define WIFI_ESP8266_SERIAL_BAUDRATE 115200
// <o> WiFi thread priority <0=>osPriorityLow
// <1=>osPriorityBelowNormal
// <2=>osPriorityNormal
// <3=>osPriorityAboveNormal
// <4=>osPriorityHigh
// <5=>osPriorityRealtime
// <i> Defines the WiFi driver thread priority.
// <i> The priority of the WiFi thread should be higher as application thread priority.
// <i> Default: 3
#define WIFI_ESP8266_THREAD_PRIORITY 3
// <o> WiFi thread stack size [bytes] <96-1073741824:8>
// <i> Defines stack size for the WiFi Thread.
// <i> Default: 512
#define WIFI_ESP8266_THREAD_STACK_SIZE 512
// <o> Socket buffer block size <128-16384:128>
// <i> Defines the size of one memory block used for socket data buffering.
// <i> Socket buffering consists of multiple blocks which are distributed across multiple sockets.
// <i> Default: 512
#define WIFI_ESP8266_SOCKET_BLOCK_SIZE 512
// <o> Socket buffer block count <5-256>
// <i> Defines the total number of memory blocks used for socket data buffering.
// <i> Socket buffering consists of multiple blocks which are distributed across multiple sockets.
// <i> Default: 8
#define WIFI_ESP8266_SOCKET_BLOCK_COUNT 8
// <o> Serial parser buffer block size
// <i> Defines the size of one memory block in serial parser buffer.
// <i> The total size of serial parser buffer is defined by memory block size and number of blocks.
// <i> Default: 256
#define WIFI_ESP8266_PARSER_BLOCK_SIZE 256
// <o> Serial parser buffer block count
// <i> Defines the number of memory blocks in serial parser buffer.
// <i> The total size of serial parser buffer is defined by memory block size and number of blocks.
// <i> Default: 8
#define WIFI_ESP8266_PARSER_BLOCK_COUNT 8
// </h>
//------------- <<< end of configuration section >>> -------------------------
/**************************************************************************//**
* @file retarget.c
* @version V3.00
* @brief Debug Port and Semihost Setting Source File
*
* @note
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/
#include <stdio.h>
#include "NuMicro.h"
#if defined (__ICCARM__)
# pragma diag_suppress=Pm150
#endif
#if defined ( __CC_ARM )
#if (__ARMCC_VERSION < 400000)
#else
/* Insist on keeping widthprec, to avoid X propagation by benign code in C-lib */
#pragma import _printf_widthprec
#endif
#endif
/*---------------------------------------------------------------------------------------------------------*/
/* Global variables */
/*---------------------------------------------------------------------------------------------------------*/
#if !(defined(__ICCARM__) && (__VER__ >= 6010000))
# if (__ARMCC_VERSION < 6040000)
struct __FILE
{
int handle; /* Add whatever you need here */
};
# endif
#elif(__VER__ >= 8000000)
struct __FILE
{
int handle; /* Add whatever you need here */
};
#endif
FILE __stdout;
FILE __stdin;
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION > 6040000)
# if !defined(__MICROLIB)
__asm(".global __ARM_use_no_argv\n\t" "__ARM_use_no_argv:\n\t");
# endif
#endif
#if (defined(__ARMCC_VERSION) || defined(__ICCARM__))
extern int32_t SH_DoCommand(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0);
#if defined( __ICCARM__ )
__WEAK
#else
__attribute__((weak))
#endif
uint32_t ProcessHardFault(uint32_t lr, uint32_t msp, uint32_t psp);
#endif
#pragma pack(push)
#pragma pack(1)
typedef struct {
char *name;
uint32_t u32Addr;
uint8_t u8NSIdx;
} IP_T;
#pragma pack(pop)
#ifndef DEBUG_ENABLE_SEMIHOST
static IP_T s_IpTbl[] = {
{"SYS",SYS_BASE,0},
{"CLK",CLK_BASE,0},
{"INT",INT_BASE,0},
{"GPIOA",GPIOA_BASE,224+0},
{"GPIOB",GPIOB_BASE,224+1},
{"GPIOC",GPIOC_BASE,224+2},
{"GPIOD",GPIOD_BASE,224+3},
{"GPIOE",GPIOE_BASE,224+4},
{"GPIOF",GPIOF_BASE,224+5},
{"GPIOG",GPIOG_BASE,224+6},
{"GPIOH",GPIOH_BASE,224+7},
{"GPIO_DBCTL",GPIO_DBCTL_BASE,0},
{"PA",GPIO_PIN_DATA_BASE ,224+0},
{"PB",GPIO_PIN_DATA_BASE+16*4 ,224+0},
{"PC",GPIO_PIN_DATA_BASE+2*16*4,224+0},
{"PD",GPIO_PIN_DATA_BASE+3*16*4,224+0},
{"PE",GPIO_PIN_DATA_BASE+4*16*4,224+0},
{"PF",GPIO_PIN_DATA_BASE+5*16*4,224+0},
{"PG",GPIO_PIN_DATA_BASE+6*16*4,224+0},
{"PH",GPIO_PIN_DATA_BASE+7*16*4,224+0},
{"PDMA0",PDMA0_BASE,0},
{"PDMA1",PDMA1_BASE,PDMA1_Attr},
{"USBH",USBH_BASE,USBH_Attr},
{"FMC",FMC_BASE,0},
{"SDH0",SDH0_BASE,SDH0_Attr},
{"EBI",EBI_BASE,EBI_Attr},
{"SCU",SCU_BASE,0},
{"CRC",CRC_BASE,CRC_Attr},
{"CRPT",CRPT_BASE,CRPT_Attr},
{"WDT",WDT_BASE,0},
{"WWDT",WWDT_BASE,0},
{"RTC",RTC_BASE,RTC_Attr},
{"EADC",EADC_BASE,EADC_Attr},
{"ACMP01",ACMP01_BASE,ACMP01_Attr},
{"DAC0",DAC0_BASE,DAC_Attr},
{"DAC1",DAC1_BASE,DAC_Attr},
{"I2S0",I2S0_BASE,I2S0_Attr},
{"OTG",OTG_BASE,OTG_Attr},
{"TMR01",TMR01_BASE,0},
{"TMR23",TMR23_BASE,TMR23_Attr},
{"EPWM0",EPWM0_BASE,EPWM0_Attr},
{"EPWM1",EPWM1_BASE,EPWM1_Attr},
{"BPWM0",BPWM0_BASE,BPWM0_Attr},
{"BPWM1",BPWM1_BASE,BPWM1_Attr},
{"QSPI0",QSPI0_BASE,QSPI0_Attr},
{"SPI0",SPI0_BASE,SPI0_Attr},
{"SPI1",SPI1_BASE,SPI1_Attr},
{"SPI2",SPI2_BASE,SPI2_Attr},
{"SPI3",SPI3_BASE,SPI3_Attr},
{"UART0",UART0_BASE,UART0_Attr},
{"UART1",UART1_BASE,UART1_Attr},
{"UART2",UART2_BASE,UART2_Attr},
{"UART3",UART3_BASE,UART3_Attr},
{"UART4",UART4_BASE,UART4_Attr},
{"UART5",UART5_BASE,UART5_Attr},
{"I2C0",I2C0_BASE,I2C0_Attr},
{"I2C1",I2C1_BASE,I2C1_Attr},
{"I2C2",I2C2_BASE,I2C2_Attr},
{"SC0",SC0_BASE,SC0_Attr},
{"SC1",SC1_BASE,SC1_Attr},
{"SC2",SC2_BASE,SC2_Attr},
{"CAN0",CAN0_BASE,CAN0_Attr},
{"QEI0",QEI0_BASE,QEI0_Attr},
{"QEI1",QEI1_BASE,QEI1_Attr},
{"ECAP0",ECAP0_BASE,ECAP0_Attr},
{"ECAP1",ECAP1_BASE,ECAP1_Attr},
{"TRNG",TRNG_BASE,TRNG_Attr},
{"USBD",USBD_BASE,USBD_Attr},
{"USCI0",USCI0_BASE, USCI0_Attr},
{"USCI1",USCI1_BASE, USCI1_Attr},
{0,USCI1_BASE+4096, 0},
};
#endif
int kbhit(void);
int IsDebugFifoEmpty(void);
void _ttywrch(int ch);
int fputc(int ch, FILE *stream);
#if (defined(__ARMCC_VERSION) || defined(__ICCARM__))
int fgetc(FILE *stream);
int ferror(FILE *stream);
#endif
char GetChar(void);
void SendChar_ToUART(int ch);
void SendChar(int ch);
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0);
void _sys_exit(int return_code)__attribute__((noreturn));
#if (defined(DEBUG_ENABLE_SEMIHOST) || defined(OS_USE_SEMIHOSTING))
#if (defined(__ARMCC_VERSION) || defined(__ICCARM__) || defined(__GNUC__))
/* The static buffer is used to speed up the semihost */
static char g_buf[16];
static char g_buf_len = 0;
static volatile int32_t g_ICE_Conneced = 1;
/**
* @brief This function is called by Hardfault handler.
* @param None
* @returns None
* @details This function is called by Hardfault handler and check if it is caused by __BKPT or not.
*
*/
uint32_t ProcessHardFault(uint32_t lr, uint32_t msp, uint32_t psp)
{
uint32_t *sp = 0;
uint32_t inst;
/* Check the used stack */
if(lr & 0x40)
{
/* Secure stack used */
if(lr & 4)
sp = (uint32_t *)psp;
else
sp = (uint32_t *)msp;
}
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
else
{
/* Non-secure stack used */
if(lr & 4)
sp = (uint32_t *)__TZ_get_PSP_NS();
else
sp = (uint32_t *)__TZ_get_MSP_NS();
}
#endif
if (sp != 0)
{
/* Get the instruction caused the hardfault */
inst = M16(sp[6]);
if(inst == 0xBEAB)
{
/*
If the instruction is 0xBEAB, it means it is caused by BKPT without ICE connected.
We still return for output/input message to UART.
*/
g_ICE_Conneced = 0; // Set a flag for ICE offline
sp[6] += 2; // return to next instruction
return lr; // Keep lr in R0
}
}
/* It is casued by hardfault (Not semihost). Just process the hard fault here. */
/* TODO: Implement your hardfault handle code here */
/*
printf(" HardFault!\n\n");
printf("r0 = 0x%x\n", sp[0]);
printf("r1 = 0x%x\n", sp[1]);
printf("r2 = 0x%x\n", sp[2]);
printf("r3 = 0x%x\n", sp[3]);
printf("r12 = 0x%x\n", sp[4]);
printf("lr = 0x%x\n", sp[5]);
printf("pc = 0x%x\n", sp[6]);
printf("psr = 0x%x\n", sp[7]);
*/
while(1){}
}
/**
*
* @brief The function to process semihosted command
* @param[in] n32In_R0 : semihost register 0
* @param[in] n32In_R1 : semihost register 1
* @param[out] pn32Out_R0: semihost register 0
* @retval 0: No ICE debug
* @retval 1: ICE debug
*
*/
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0)
{
(void)n32In_R1;
if(g_ICE_Conneced)
{
if(pn32Out_R0)
*pn32Out_R0 = n32In_R0;
return 1;
}
return 0;
}
#endif
#else // defined(DEBUG_ENABLE_SEMIHOST)
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0);
#if defined( __ICCARM__ )
__WEAK
#else
__attribute__((weak))
#endif
uint32_t ProcessHardFault(uint32_t lr, uint32_t msp, uint32_t psp)
{
extern void SCU_IRQHandler(void);
uint32_t *sp = 0ul;
uint32_t i;
uint32_t inst, addr,taddr = 0ul,tdata;
int32_t secure;
uint32_t rm,rn,rt, imm5, imm8;
int32_t eFlag;
uint8_t idx, bit;
int32_t s;
/* Check the used stack */
secure = (lr & 0x40ul)?1ul:0ul;
if(secure)
{
/* Secure stack used */
if(lr & 4UL)
{
sp = (uint32_t *)psp;
}
else
{
sp = (uint32_t *)msp;
}
}
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)
else
{
/* Non-secure stack used */
if(lr & 4)
sp = (uint32_t *)(uint32_t)__TZ_get_PSP_NS();
else
sp = (uint32_t *)(uint32_t)__TZ_get_MSP_NS();
}
#endif
/*
r0 = sp[0]
r1 = sp[1]
r2 = sp[2]
r3 = sp[3]
r12 = sp[4]
lr = sp[5]
pc = sp[6]
psr = sp[7]
*/
printf("!!---------------------------------------------------------------!!\n");
printf(" <<< HardFault >>>\n");
/* Get the instruction caused the hardfault */
addr = sp[6];
inst = M16(addr);
eFlag = 0;
if((!secure) && ((addr & NS_OFFSET) == 0) )
{
printf(" Non-secure CPU try to fetch secure code in 0x%x\n", addr);
printf(" Try to check NSC region or SAU settings.\n");
eFlag = 1;
}else if(inst == 0xBEAB)
{
printf(" Execute BKPT without ICE connected\n");
eFlag = 2;
}
else if((inst >> 12) == 5)
{
eFlag = 3;
/* 0101xx Load/store (register offset) on page C2-327 of armv8m ref */
rm = (inst >> 6) & 0x7;
rn = (inst >> 3) & 0x7;
rt = inst & 0x7;
taddr = sp[rn] + sp[rm];
tdata = sp[rt];
if(rn == rt)
{
printf(" [0x%08x] 0x%04x %s R%d [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",rt, taddr);
}
else
{
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
}
else if((inst >> 13) == 3)
{
eFlag = 3;
/* 011xxx Load/store word/byte (immediate offset) on page C2-327 of armv8m ref */
imm5 = (inst >> 6) & 0x1f;
rn = (inst >> 3) & 0x7;
rt = inst & 0x7;
taddr = sp[rn] + imm5;
tdata = sp[rt];
if(rt == rn)
{
printf(" [0x%08x] 0x%04x %s R%d [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",rt, taddr);
}
else
{
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
}
else if((inst >> 12) == 8)
{
eFlag = 3;
/* 1000xx Load/store halfword (immediate offset) on page C2-328 */
imm5 = (inst >> 6) & 0x1f;
rn = (inst >> 3) & 0x7;
rt = inst & 0x7;
taddr = sp[rn] + imm5;
tdata = sp[rt];
if(rt == rn)
{
printf(" [0x%08x] 0x%04x %s R%d [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",rt, taddr);
}
else
{
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
}
else if((inst >> 12) == 9)
{
eFlag = 3;
/* 1001xx Load/store (SP-relative) on page C2-328 */
imm8 = inst & 0xff;
rt = (inst >> 8) & 0x7;
taddr = sp[6] + imm8;
tdata = sp[rt];
printf(" [0x%08x] 0x%04x %s 0x%x [0x%x]\n",addr, inst,
(inst&BIT11)?"LDR":"STR",tdata, taddr);
}
else
{
eFlag = 4;
printf(" Unexpected instruction: 0x%04x \n", inst);
}
if(eFlag == 3)
{
/* It is LDR/STR hardfault */
if(!secure)
{
/* It is happened in Nonsecure code */
for(i=0;i< (uint32_t)(sizeof(s_IpTbl)/sizeof(IP_T)-1);i++)
{
/* Case 1: Nonsecure code try to access secure IP. It also causes SCU violation */
if((taddr >= s_IpTbl[i].u32Addr) && (taddr < (s_IpTbl[i+1].u32Addr)))
{
idx = s_IpTbl[i].u8NSIdx;
bit = idx & 0x1f;
idx = idx >> 5;
s = (SCU->PNSSET[idx] >> bit) & 1ul;
printf(" Illegal access to %s %s in Nonsecure code.\n",(s)?"Nonsecure":"Secure", s_IpTbl[i].name);
break;
}
/* Case 2: Nonsecure code try to access Nonsecure IP but the IP is secure IP */
if((taddr >= (s_IpTbl[i].u32Addr+NS_OFFSET)) && (taddr < (s_IpTbl[i+1].u32Addr+NS_OFFSET)))
{
idx = s_IpTbl[i].u8NSIdx;
bit = idx & 0x1f;
idx = idx >> 5;
s = (SCU->PNSSET[idx] >> bit) & 1ul;
printf(" Illegal access to %s %s in Nonsecure code.\nIt may be set as secure IP here.\n",(s)?"Nonsecure":"Secure", s_IpTbl[i].name);
break;
}
}
}
else
{
/* It is happened in secure code */
if(taddr > NS_OFFSET)
{
/* Case 3: Secure try to access secure IP through Nonsecure address. It also causes SCU violation */
for(i=0;i< (uint32_t)(sizeof(s_IpTbl)/sizeof(IP_T)-1);i++)
{
if((taddr >= (s_IpTbl[i].u32Addr+NS_OFFSET)) && (taddr < (s_IpTbl[i+1].u32Addr+NS_OFFSET)))
{
idx = s_IpTbl[i].u8NSIdx;
bit = idx & 0x1f;
idx = idx >> 5;
s = (SCU->PNSSET[idx] >> bit) & 1ul;
printf(" Illegal to use Nonsecure address to access %s %s in Secure code\n",(s)?"Nonsecure":"Secure", s_IpTbl[i].name);
break;
}
}
}
}
}
SCU_IRQHandler();
printf("!!---------------------------------------------------------------!!\n");
/* Or *sp to remove compiler warning */
while(1U|*sp){}
return lr;
}
int32_t SH_Return(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0)
{
(void)n32In_R0;
(void)n32In_R1;
(void)pn32Out_R0;
return 0;
}
#endif /* defined(DEBUG_ENABLE_SEMIHOST) */
/**
* @brief Routine to send a char
*
* @param[in] ch A character data writes to debug port
*
* @returns Send value from UART debug port
*
* @details Send a target char to UART debug port .
*/
#ifndef NONBLOCK_PRINTF
void SendChar_ToUART(int ch)
{
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk){}
if((char)ch == '\n')
{
DEBUG_PORT->DAT = '\r';
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk){}
}
DEBUG_PORT->DAT = (uint32_t)ch;
}
#else
/* Non-block implement of send char */
# define BUF_SIZE 512
void SendChar_ToUART(int ch)
{
static uint8_t u8Buf[BUF_SIZE] = {0};
static int32_t i32Head = 0;
static int32_t i32Tail = 0;
int32_t i32Tmp;
/* Only flush the data in buffer to UART when ch == 0 */
if(ch)
{
// Push char
if(ch == '\n')
{
i32Tmp = i32Head+1;
if(i32Tmp > BUF_SIZE) i32Tmp = 0;
if(i32Tmp != i32Tail)
{
u8Buf[i32Head] = '\r';
i32Head = i32Tmp;
}
}
i32Tmp = i32Head+1;
if(i32Tmp > BUF_SIZE) i32Tmp = 0;
if(i32Tmp != i32Tail)
{
u8Buf[i32Head] = ch;
i32Head = i32Tmp;
}
}
else
{
if(i32Tail == i32Head)
return;
}
// pop char
do
{
i32Tmp = i32Tail + 1;
if(i32Tmp > BUF_SIZE) i32Tmp = 0;
if((DEBUG_PORT->FSR & UART_FSR_TX_FULL_Msk) == 0)
{
DEBUG_PORT->DATA = u8Buf[i32Tail];
i32Tail = i32Tmp;
}
else
break; // FIFO full
}while(i32Tail != i32Head);
}
#endif
/**
* @brief Routine to send a char
*
* @param[in] ch A character data writes to debug port
*
* @returns Send value from UART debug port or semihost
*
* @details Send a target char to UART debug port or semihost.
*/
void SendChar(int ch)
{
#if defined(DEBUG_ENABLE_SEMIHOST)
g_buf[(uint8_t)g_buf_len++] = (char)ch;
g_buf[(uint8_t)g_buf_len] = '\0';
if(g_buf_len + 1 >= sizeof(g_buf) || ch == '\n' || ch == '\0')
{
/* Send the char */
if(g_ICE_Conneced)
{
if(SH_DoCommand(0x04, (int)g_buf, NULL) != 0)
{
g_buf_len = 0;
return;
}
}
else
{
# if (DEBUG_ENABLE_SEMIHOST == 2) // Re-direct to UART Debug Port only when DEBUG_ENABLE_SEMIHOST=2
int i;
for(i = 0; i < g_buf_len; i++)
SendChar_ToUART(g_buf[i]);
g_buf_len = 0;
# endif
}
}
#else
SendChar_ToUART(ch);
#endif
}
/**
* @brief Routine to get a char
*
* @param None
*
* @returns Get value from UART debug port or semihost
*
* @details Wait UART debug port or semihost to input a char.
*/
char GetChar(void)
{
#ifdef DEBUG_ENABLE_SEMIHOST
# if defined (__ICCARM__)
int nRet;
while(SH_DoCommand(0x7, 0, &nRet) != 0)
{
if(nRet != 0)
return (char)nRet;
}
# else
int nRet;
while(SH_DoCommand(0x101, 0, &nRet) != 0)
{
if(nRet != 0)
{
SH_DoCommand(0x07, 0, &nRet);
return (char)nRet;
}
}
# if (DEBUG_ENABLE_SEMIHOST == 2) // Re-direct to UART Debug Port only when DEBUG_ENABLE_SEMIHOST=2
/* Use debug port when ICE is not connected at semihost mode */
while(!g_ICE_Conneced)
{
if((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0)
{
return (DEBUG_PORT->DAT);
}
}
# endif
# endif
return (0);
#else
while(1)
{
if((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0U)
{
return ((char)DEBUG_PORT->DAT);
}
}
#endif
}
/**
* @brief Check any char input from UART
*
* @param None
*
* @retval 1: No any char input
* @retval 0: Have some char input
*
* @details Check UART RSR RX EMPTY or not to determine if any char input from UART
*/
int kbhit(void)
{
return !((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) == 0U);
}
/**
* @brief Check if debug message finished
*
* @param None
*
* @retval 1: Message is finished
* @retval 0: Message is transmitting.
*
* @details Check if message finished (FIFO empty of debug port)
*/
int IsDebugFifoEmpty(void)
{
return ((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXEMPTYF_Msk) != 0U);
}
/**
* @brief C library retargetting
*
* @param[in] ch Write a character data
*
* @returns None
*
* @details Check if message finished (FIFO empty of debug port)
*/
void _ttywrch(int ch)
{
SendChar(ch);
return;
}
/**
* @brief Write character to stream
*
* @param[in] ch Character to be written. The character is passed as its int promotion.
* @param[in] stream Pointer to a FILE object that identifies the stream where the character is to be written.
*
* @returns If there are no errors, the same character that has been written is returned.
* If an error occurs, EOF is returned and the error indicator is set (see ferror).
*
* @details Writes a character to the stream and advances the position indicator.\n
* The character is written at the current position of the stream as indicated \n
* by the internal position indicator, which is then advanced one character.
*
* @note The above descriptions are copied from http://www.cplusplus.com/reference/clibrary/cstdio/fputc/.
*
*
*/
int fputc(int ch, FILE *stream)
{
(void)stream;
SendChar(ch);
return ch;
}
#if (defined(__GNUC__) && !defined(__ARMCC_VERSION))
#if !defined(OS_USE_SEMIHOSTING)
int _write (int fd, char *ptr, int len)
{
int i = len;
while(i--) {
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk);
if(*ptr == '\n') {
DEBUG_PORT->DAT = '\r';
while(DEBUG_PORT->FIFOSTS & UART_FIFOSTS_TXFULL_Msk);
}
DEBUG_PORT->DAT = *ptr++;
}
return len;
}
int _read (int fd, char *ptr, int len)
{
while((DEBUG_PORT->FIFOSTS & UART_FIFOSTS_RXEMPTY_Msk) != 0);
*ptr = DEBUG_PORT->DAT;
return 1;
}
#endif
#else
/**
* @brief Get character from UART debug port or semihosting input
*
* @param[in] stream Pointer to a FILE object that identifies the stream on which the operation is to be performed.
*
* @returns The character read from UART debug port or semihosting
*
* @details For get message from debug port or semihosting.
*
*/
int fgetc(FILE *stream)
{
(void)stream;
return ((int)GetChar());
}
/**
* @brief Check error indicator
*
* @param[in] stream Pointer to a FILE object that identifies the stream.
*
* @returns If the error indicator associated with the stream was set, the function returns a nonzero value.
* Otherwise, it returns a zero value.
*
* @details Checks if the error indicator associated with stream is set, returning a value different
* from zero if it is. This indicator is generally set by a previous operation on the stream that failed.
*
* @note The above descriptions are copied from http://www.cplusplus.com/reference/clibrary/cstdio/ferror/.
*
*/
int ferror(FILE *stream)
{
(void)stream;
return EOF;
}
#endif
#ifdef DEBUG_ENABLE_SEMIHOST
# ifdef __ICCARM__
void __exit(int return_code)
{
/* Check if link with ICE */
if(SH_DoCommand(0x18, 0x20026, NULL) == 0)
{
/* Make sure all message is print out */
while(IsDebugFifoEmpty() == 0);
}
label:
goto label; /* endless loop */
}
# else
void _sys_exit(int return_code)
{
(void)return_code;
/* Check if link with ICE */
if(SH_DoCommand(0x18, 0x20026, NULL) == 0)
{
/* Make sure all message is print out */
while(IsDebugFifoEmpty() == 0);
}
label:
goto label; /* endless loop */
}
# endif
#endif
/*** (C) COPYRIGHT 2016-2020 Nuvoton Technology Corp. ***/
;/**************************************************************************//**
; * @file startup_M2351.s
; * @version V2.00
; * $Revision: 9 $
; * $Date: 16/08/27 12:33p $
; * @brief Startup Source File
; *
; * @note
; * SPDX-License-Identifier: Apache-2.0
; * Copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
; *
; ******************************************************************************/
;/*
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
;*/
; <h> Stack Configuration
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
IF :LNOT: :DEF: Stack_Size
Stack_Size EQU 0x00001000
ENDIF
AREA STACK, NOINIT, READWRITE, ALIGN=3
Stack_Mem SPACE Stack_Size
__initial_sp
; <h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
; </h>
IF :LNOT: :DEF: Heap_Size
Heap_Size EQU 0x00002800
ENDIF
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
IMPORT SCU_IRQHandler
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; NMI Handler
DCD HardFault_Handler ; Hard Fault Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD SVC_Handler ; SVCall Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD PendSV_Handler ; PendSV Handler
DCD SysTick_Handler ; SysTick Handler
; External Interrupts
; maximum of 32 External Interrupts are possible
DCD BOD_IRQHandler ; 0
DCD IRC_IRQHandler ; 1
DCD PWRWU_IRQHandler ; 2
DCD SRAM_IRQHandler ; 3
DCD CLKFAIL_IRQHandler ; 4
DCD DEFAULT_IRQHandler ; 5
DCD RTC_IRQHandler ; 6
DCD TAMPER_IRQHandler ; 7
DCD WDT_IRQHandler ; 8
DCD WWDT_IRQHandler ; 9
DCD EINT0_IRQHandler ; 10
DCD EINT1_IRQHandler ; 11
DCD EINT2_IRQHandler ; 12
DCD EINT3_IRQHandler ; 13
DCD EINT4_IRQHandler ; 14
DCD EINT5_IRQHandler ; 15
DCD GPA_IRQHandler ; 16
DCD GPB_IRQHandler ; 17
DCD GPC_IRQHandler ; 18
DCD GPD_IRQHandler ; 19
DCD GPE_IRQHandler ; 20
DCD GPF_IRQHandler ; 21
DCD QSPI0_IRQHandler ; 22
DCD SPI0_IRQHandler ; 23
DCD BRAKE0_IRQHandler ; 24
DCD EPWM0_P0_IRQHandler ; 25
DCD EPWM0_P1_IRQHandler ; 26
DCD EPWM0_P2_IRQHandler ; 27
DCD BRAKE1_IRQHandler ; 28
DCD EPWM1_P0_IRQHandler ; 29
DCD EPWM1_P1_IRQHandler ; 30
DCD EPWM1_P2_IRQHandler ; 31
DCD TMR0_IRQHandler ; 32
DCD TMR1_IRQHandler ; 33
DCD TMR2_IRQHandler ; 34
DCD TMR3_IRQHandler ; 35
DCD UART0_IRQHandler ; 36
DCD UART1_IRQHandler ; 37
DCD I2C0_IRQHandler ; 38
DCD I2C1_IRQHandler ; 39
DCD PDMA0_IRQHandler ; 40
DCD DAC_IRQHandler ; 41
DCD EADC0_IRQHandler ; 42
DCD EADC1_IRQHandler ; 43
DCD ACMP01_IRQHandler ; 44
DCD DEFAULT_IRQHandler ; 45
DCD EADC2_IRQHandler ; 46
DCD EADC3_IRQHandler ; 47
DCD UART2_IRQHandler ; 48
DCD UART3_IRQHandler ; 49
DCD DEFAULT_IRQHandler ; 50
DCD SPI1_IRQHandler ; 51
DCD SPI2_IRQHandler ; 52
DCD USBD_IRQHandler ; 53
DCD USBH_IRQHandler ; 54
DCD USBOTG_IRQHandler ; 55
DCD CAN0_IRQHandler ; 56
DCD DEFAULT_IRQHandler ; 57
DCD SC0_IRQHandler ; 58
DCD SC1_IRQHandler ; 59
DCD SC2_IRQHandler ; 60
DCD DEFAULT_IRQHandler ; 61
DCD SPI3_IRQHandler ; 62
DCD DEFAULT_IRQHandler ; 63
DCD SDH0_IRQHandler ; 64
DCD DEFAULT_IRQHandler ; 65
DCD DEFAULT_IRQHandler ; 66
DCD DEFAULT_IRQHandler ; 67
DCD I2S0_IRQHandler ; 68
DCD DEFAULT_IRQHandler ; 69
DCD OPA0_IRQHandler ; 70
DCD CRPT_IRQHandler ; 71
DCD GPG_IRQHandler ; 72
DCD EINT6_IRQHandler ; 73
DCD UART4_IRQHandler ; 74
DCD UART5_IRQHandler ; 75
DCD USCI0_IRQHandler ; 76
DCD USCI1_IRQHandler ; 77
DCD BPWM0_IRQHandler ; 78
DCD BPWM1_IRQHandler ; 79
DCD DEFAULT_IRQHandler ; 80
DCD DEFAULT_IRQHandler ; 81
DCD I2C2_IRQHandler ; 82
DCD DEFAULT_IRQHandler ; 83
DCD QEI0_IRQHandler ; 84
DCD QEI1_IRQHandler ; 85
DCD ECAP0_IRQHandler ; 86
DCD ECAP1_IRQHandler ; 87
DCD GPH_IRQHandler ; 88
DCD EINT7_IRQHandler ; 89
DCD DEFAULT_IRQHandler ; 90
DCD DEFAULT_IRQHandler ; 91
DCD DEFAULT_IRQHandler ; 92
DCD DEFAULT_IRQHandler ; 93
DCD DEFAULT_IRQHandler ; 94
DCD DEFAULT_IRQHandler ; 95
DCD DEFAULT_IRQHandler ; 96
DCD DEFAULT_IRQHandler ; 97
DCD PDMA1_IRQHandler ; 98
DCD SCU_IRQHandler ; 99
DCD DEFAULT_IRQHandler ; 100
DCD TRNG_IRQHandler ; 101
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT SystemInit
IMPORT __main
LDR R0, =SystemInit
BLX R0
LDR R0, =__main
BX R0
ENDP
; Dummy Exception Handlers (infinite loops which can be modified)
NMI_Handler PROC
EXPORT NMI_Handler [WEAK]
B .
ENDP
HardFault_Handler\
PROC
IMPORT ProcessHardFault
EXPORT HardFault_Handler [WEAK]
MOV R0, LR
MRS R1, MSP
MRS R2, PSP
LDR R3, =ProcessHardFault
BLX R3
BX R0
ENDP
SVC_Handler PROC
EXPORT SVC_Handler [WEAK]
B .
ENDP
PendSV_Handler PROC
EXPORT PendSV_Handler [WEAK]
B .
ENDP
SysTick_Handler PROC
EXPORT SysTick_Handler [WEAK]
B .
ENDP
Default_Handler PROC
EXPORT BOD_IRQHandler [WEAK] ; 0
EXPORT IRC_IRQHandler [WEAK] ; 1
EXPORT PWRWU_IRQHandler [WEAK] ; 2
EXPORT SRAM_IRQHandler [WEAK] ; 3
EXPORT CLKFAIL_IRQHandler [WEAK] ; 4
;EXPORT 0 [WEAK] ; 5
EXPORT RTC_IRQHandler [WEAK] ; 6
EXPORT TAMPER_IRQHandler [WEAK] ; 7
EXPORT WDT_IRQHandler [WEAK] ; 8
EXPORT WWDT_IRQHandler [WEAK] ; 9
EXPORT EINT0_IRQHandler [WEAK] ; 10
EXPORT EINT1_IRQHandler [WEAK] ; 11
EXPORT EINT2_IRQHandler [WEAK] ; 12
EXPORT EINT3_IRQHandler [WEAK] ; 13
EXPORT EINT4_IRQHandler [WEAK] ; 14
EXPORT EINT5_IRQHandler [WEAK] ; 15
EXPORT GPA_IRQHandler [WEAK] ; 16
EXPORT GPB_IRQHandler [WEAK] ; 17
EXPORT GPC_IRQHandler [WEAK] ; 18
EXPORT GPD_IRQHandler [WEAK] ; 19
EXPORT GPE_IRQHandler [WEAK] ; 20
EXPORT GPF_IRQHandler [WEAK] ; 21
EXPORT QSPI0_IRQHandler [WEAK] ; 22
EXPORT SPI0_IRQHandler [WEAK] ; 23
EXPORT BRAKE0_IRQHandler [WEAK] ; 24
EXPORT EPWM0_P0_IRQHandler [WEAK] ; 25
EXPORT EPWM0_P1_IRQHandler [WEAK] ; 26
EXPORT EPWM0_P2_IRQHandler [WEAK] ; 27
EXPORT BRAKE1_IRQHandler [WEAK] ; 28
EXPORT EPWM1_P0_IRQHandler [WEAK] ; 29
EXPORT EPWM1_P1_IRQHandler [WEAK] ; 30
EXPORT EPWM1_P2_IRQHandler [WEAK] ; 31
EXPORT TMR0_IRQHandler [WEAK] ; 32
EXPORT TMR1_IRQHandler [WEAK] ; 33
EXPORT TMR2_IRQHandler [WEAK] ; 34
EXPORT TMR3_IRQHandler [WEAK] ; 35
EXPORT UART0_IRQHandler [WEAK] ; 36
EXPORT UART1_IRQHandler [WEAK] ; 37
EXPORT I2C0_IRQHandler [WEAK] ; 38
EXPORT I2C1_IRQHandler [WEAK] ; 39
EXPORT PDMA0_IRQHandler [WEAK] ; 40
EXPORT DAC_IRQHandler [WEAK] ; 41
EXPORT EADC0_IRQHandler [WEAK] ; 42
EXPORT EADC1_IRQHandler [WEAK] ; 43
EXPORT ACMP01_IRQHandler [WEAK] ; 44
;EXPORT 0 [WEAK] ; 45
EXPORT EADC2_IRQHandler [WEAK] ; 46
EXPORT EADC3_IRQHandler [WEAK] ; 47
EXPORT UART2_IRQHandler [WEAK] ; 48
EXPORT UART3_IRQHandler [WEAK] ; 49
;EXPORT 0 [WEAK] ; 50
EXPORT SPI1_IRQHandler [WEAK] ; 51
EXPORT SPI2_IRQHandler [WEAK] ; 52
EXPORT USBD_IRQHandler [WEAK] ; 53
EXPORT USBH_IRQHandler [WEAK] ; 54
EXPORT USBOTG_IRQHandler [WEAK] ; 55
EXPORT CAN0_IRQHandler [WEAK] ; 56
EXPORT CAN1_IRQHandler [WEAK] ; 57
EXPORT SC0_IRQHandler [WEAK] ; 58
EXPORT SC1_IRQHandler [WEAK] ; 59
EXPORT SC2_IRQHandler [WEAK] ; 60
EXPORT SC3_IRQHandler [WEAK] ; 61
EXPORT SPI3_IRQHandler [WEAK] ; 62
;EXPORT 0 [WEAK] ; 63
EXPORT SDH0_IRQHandler [WEAK] ; 64
;EXPORT 0 [WEAK] ; 65
;EXPORT 0 [WEAK] ; 66
;EXPORT 0 [WEAK] ; 67
EXPORT I2S0_IRQHandler [WEAK] ; 68
;EXPORT 0 [WEAK] ; 69
EXPORT OPA0_IRQHandler [WEAK] ; 70
EXPORT CRPT_IRQHandler [WEAK] ; 71
EXPORT GPG_IRQHandler [WEAK] ; 72
EXPORT EINT6_IRQHandler [WEAK] ; 73
EXPORT UART4_IRQHandler [WEAK] ; 74
EXPORT UART5_IRQHandler [WEAK] ; 75
EXPORT USCI0_IRQHandler [WEAK] ; 76
EXPORT USCI1_IRQHandler [WEAK] ; 77
EXPORT BPWM0_IRQHandler [WEAK] ; 78
EXPORT BPWM1_IRQHandler [WEAK] ; 79
;EXPORT 0 [WEAK] ; 80
;EXPORT 0 [WEAK] ; 81
EXPORT I2C2_IRQHandler [WEAK] ; 82
;EXPORT 0 [WEAK] ; 83
EXPORT QEI0_IRQHandler [WEAK] ; 84
EXPORT QEI1_IRQHandler [WEAK] ; 85
EXPORT ECAP0_IRQHandler [WEAK] ; 86
EXPORT ECAP1_IRQHandler [WEAK] ; 87
EXPORT GPH_IRQHandler [WEAK] ; 88
EXPORT EINT7_IRQHandler [WEAK] ; 89
EXPORT SDH1_IRQHandler [WEAK] ; 90
;EXPORT 0 [WEAK] ; 91
;EXPORT USBH_IRQHandler [WEAK] ; 92
;EXPORT 0 [WEAK] ; 93
;EXPORT 0 [WEAK] ; 94
;EXPORT 0 [WEAK] ; 95
;EXPORT 0 [WEAK] ; 96
;EXPORT 0 [WEAK] ; 97
EXPORT PDMA1_IRQHandler [WEAK] ; 98
;EXPORT SCU_IRQHandler [WEAK] ; 99
;EXPORT 0 [WEAK] ; 100
EXPORT TRNG_IRQHandler [WEAK] ; 101
EXPORT DEFAULT_IRQHandler [WEAK]
BOD_IRQHandler ; 0
IRC_IRQHandler ; 1
PWRWU_IRQHandler ; 2
SRAM_IRQHandler ; 3
CLKFAIL_IRQHandler ; 4
;0 ; 5
RTC_IRQHandler ; 6
TAMPER_IRQHandler ; 7
WDT_IRQHandler ; 8
WWDT_IRQHandler ; 9
EINT0_IRQHandler ; 10
EINT1_IRQHandler ; 11
EINT2_IRQHandler ; 12
EINT3_IRQHandler ; 13
EINT4_IRQHandler ; 14
EINT5_IRQHandler ; 15
GPA_IRQHandler ; 16
GPB_IRQHandler ; 17
GPC_IRQHandler ; 18
GPD_IRQHandler ; 19
GPE_IRQHandler ; 20
GPF_IRQHandler ; 21
QSPI0_IRQHandler ; 22
SPI0_IRQHandler ; 23
BRAKE0_IRQHandler ; 24
EPWM0_P0_IRQHandler ; 25
EPWM0_P1_IRQHandler ; 26
EPWM0_P2_IRQHandler ; 27
BRAKE1_IRQHandler ; 28
EPWM1_P0_IRQHandler ; 29
EPWM1_P1_IRQHandler ; 30
EPWM1_P2_IRQHandler ; 31
TMR0_IRQHandler ; 32
TMR1_IRQHandler ; 33
TMR2_IRQHandler ; 34
TMR3_IRQHandler ; 35
UART0_IRQHandler ; 36
UART1_IRQHandler ; 37
I2C0_IRQHandler ; 38
I2C1_IRQHandler ; 39
PDMA0_IRQHandler ; 40
DAC_IRQHandler ; 41
EADC0_IRQHandler ; 42
EADC1_IRQHandler ; 43
ACMP01_IRQHandler ; 44
;0 ; 45
EADC2_IRQHandler ; 46
EADC3_IRQHandler ; 47
UART2_IRQHandler ; 48
UART3_IRQHandler ; 49
;0 ; 50
SPI1_IRQHandler ; 51
SPI2_IRQHandler ; 52
USBD_IRQHandler ; 53
USBH_IRQHandler ; 54
USBOTG_IRQHandler ; 55
CAN0_IRQHandler ; 56
CAN1_IRQHandler ; 57
SC0_IRQHandler ; 58
SC1_IRQHandler ; 59
SC2_IRQHandler ; 60
SC3_IRQHandler ; 61
SPI3_IRQHandler ; 62
;0 ; 63
SDH0_IRQHandler ; 64
;0 ; 65
;0 ; 66
;0 ; 67
I2S0_IRQHandler ; 68
;0 ; 69
OPA0_IRQHandler ; 70
CRPT_IRQHandler ; 71
GPG_IRQHandler ; 72
EINT6_IRQHandler ; 73
UART4_IRQHandler ; 74
UART5_IRQHandler ; 75
USCI0_IRQHandler ; 76
USCI1_IRQHandler ; 77
BPWM0_IRQHandler ; 78
BPWM1_IRQHandler ; 79
;0 ; 80
;0 ; 81
I2C2_IRQHandler ; 82
;0 ; 83
QEI0_IRQHandler ; 84
QEI1_IRQHandler ; 85
ECAP0_IRQHandler ; 86
ECAP1_IRQHandler ; 87
GPH_IRQHandler ; 88
EINT7_IRQHandler ; 89
SDH1_IRQHandler ; 90
;0 ; 91
;USBH_IRQHandler ; 92
;0 ; 93
;0 ; 94
;0 ; 95
;0 ; 96
;0 ; 97
PDMA1_IRQHandler ; 98
;SCU_IRQHandler ; 99
;0 ; 100
TRNG_IRQHandler ; 101
DEFAULT_IRQHandler
B .
ENDP
ALIGN
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap PROC
LDR R0, = Heap_Mem
LDR R1, = (Stack_Mem + Stack_Size)
LDR R2, = (Heap_Mem + Heap_Size)
LDR R3, = Stack_Mem
BX LR
ENDP
ALIGN
ENDIF
;int32_t SH_DoCommand(int32_t n32In_R0, int32_t n32In_R1, int32_t *pn32Out_R0)
SH_DoCommand PROC
EXPORT SH_DoCommand
IMPORT SH_Return
BKPT 0xAB ; Wait ICE or HardFault
LDR R3, =SH_Return
MOV R4, lr
BLX R3 ; Call SH_Return. The return value is in R0
BX R4 ; Return value = R0
ENDP
__PC PROC
EXPORT __PC
MOV r0, lr
BLX lr
ALIGN
ENDP
END
/**************************************************************************//**
* @file system_M2351.c
* @version V2.00
* @brief System Setting Source File
*
* @note
* SPDX-License-Identifier: Apache-2.0
* Copyright (C) 2016-2020 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/
#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) /* ARM Compiler 6 */
#include <arm_cmse.h>
#endif
#include <stdio.h>
#include <stdint.h>
#include "NuMicro.h"
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
#include "partition_M2351.h"
extern void SCU_IRQHandler(void);
void TZ_SAU_Setup(void);
#else
extern void SCU_IRQHandler(void)__attribute__((noreturn));
#endif
extern void *__Vectors; /* see startup file */
/*----------------------------------------------------------------------------
Clock Variable definitions
*----------------------------------------------------------------------------*/
uint32_t SystemCoreClock = __HSI; /*!< System Clock Frequency (Core Clock) */
uint32_t CyclesPerUs = (__HSI / 1000000UL);/*!< Cycles per micro second */
uint32_t PllClock = __HSI; /*!< PLL Output Clock Frequency */
//const uint32_t gau32ClkSrcTbl[] = {__HXT, __LXT, 0UL, __LIRC, 0UL, __HIRC48, 0UL, __HIRC};
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3U)
void FMC_NSBA_Setup(void);
void SCU_Setup(void);
void NSC_Init(void);
/**
* @brief Setup Non-secure boundary
*
* @param None
*
* @return None
*
* @details This function is used to set Non-secure boundary according to
* the configuration of partition header file
*/
void FMC_NSBA_Setup(void)
{
/* Skip NSBA Setupt according config */
if(FMC_INIT_NSBA == 0)
return;
/* Check if NSBA value with current active NSBA */
if(SCU->FNSADDR != FMC_SECURE_ROM_SIZE)
{
/* Unlock Protected Register */
SYS_UnlockReg();
/* Enable ISP and config update */
FMC->ISPCTL = FMC_ISPCTL_ISPEN_Msk | FMC_ISPCTL_CFGUEN_Msk;
/* Config Base of NSBA */
FMC->ISPADDR = FMC_NSCBA_BASE ;
/* Read Non-secure base address config */
FMC->ISPCMD = FMC_ISPCMD_READ;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while(FMC->ISPTRG);
/* Setting NSBA when it is empty */
if(FMC->ISPDAT == 0xfffffffful)
{
/* Set new base */
FMC->ISPDAT = FMC_SECURE_ROM_SIZE;
FMC->ISPCMD = FMC_ISPCMD_PROGRAM;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while(FMC->ISPTRG);
/* Verify new base */
FMC->ISPDAT = 0;
FMC->ISPCMD = FMC_ISPCMD_READ;
FMC->ISPTRG = FMC_ISPTRG_ISPGO_Msk;
while(FMC->ISPTRG);
if(FMC->ISPDAT == FMC_SECURE_ROM_SIZE)
{
/* Force Chip Reset to valid new setting */
SYS->IPRST0 = SYS_IPRST0_CHIPRST_Msk;
}
}
}
}
/**
\brief Setup SCU Configuration Unit
\details
*/
void SCU_Setup(void)
{
int32_t i;
SCU->PNSSET[0] = SCU_INIT_PNSSET0_VAL;
SCU->PNSSET[1] = SCU_INIT_PNSSET1_VAL;
SCU->PNSSET[2] = SCU_INIT_PNSSET2_VAL;
SCU->PNSSET[3] = SCU_INIT_PNSSET3_VAL;
SCU->PNSSET[4] = SCU_INIT_PNSSET4_VAL;
SCU->PNSSET[5] = SCU_INIT_PNSSET5_VAL;
SCU->PNSSET[6] = SCU_INIT_PNSSET6_VAL;
SCU->IONSSET = SCU_INIT_IONSSET_VAL;
/* Set Non-secure SRAM */
for(i = 11; i >= SCU_SECURE_SRAM_SIZE / 8192; i--)
{
SCU->SRAMNSSET |= (1U << i);
}
/* Set interrupt to non-secure according to PNNSET settings */
if(SCU_INIT_PNSSET0_VAL & BIT9 ) NVIC->ITNS[1] |= BIT22; /* Int of USBH_INT */
if(SCU_INIT_PNSSET0_VAL & BIT13) NVIC->ITNS[2] |= BIT0 ; /* Int of SDHOST0_INT */
if(SCU_INIT_PNSSET0_VAL & BIT24) NVIC->ITNS[3] |= BIT2 ; /* Int of PDMA1_INT */
if(SCU_INIT_PNSSET1_VAL & BIT18) NVIC->ITNS[2] |= BIT7 ; /* Int of CRYPTO */
if(SCU_INIT_PNSSET2_VAL & BIT2 ) NVIC->ITNS[3] |= BIT15; /* Int of EWDT_INT */
if(SCU_INIT_PNSSET2_VAL & BIT2 ) NVIC->ITNS[3] |= BIT16; /* Int of EWWDT_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT10; /* Int of EADC0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT11; /* Int of EADC1_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT14; /* Int of EADC2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT3 ) NVIC->ITNS[1] |= BIT15; /* Int of EADC3_INT */
if(SCU_INIT_PNSSET2_VAL & BIT5 ) NVIC->ITNS[1] |= BIT12; /* Int of ACMP01_INT */
if(SCU_INIT_PNSSET2_VAL & BIT7 ) NVIC->ITNS[1] |= BIT9 ; /* Int of DAC_INT */
if(SCU_INIT_PNSSET2_VAL & BIT8 ) NVIC->ITNS[2] |= BIT4 ; /* Int of I2S0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT13) NVIC->ITNS[1] |= BIT23; /* Int of USBOTG_INT */
if(SCU_INIT_PNSSET2_VAL & BIT17) NVIC->ITNS[1] |= BIT2 ; /* Int of TMR2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT17) NVIC->ITNS[1] |= BIT3 ; /* Int of TMR3_INT */
if(SCU_INIT_PNSSET2_VAL & BIT24) NVIC->ITNS[0] |= BIT25; /* Int of EPWM0_P0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT24) NVIC->ITNS[0] |= BIT26; /* Int of EPWM0_P1_INT */
if(SCU_INIT_PNSSET2_VAL & BIT24) NVIC->ITNS[0] |= BIT27; /* Int of EPWM0_P2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT25) NVIC->ITNS[0] |= BIT29; /* Int of EPWM1_P0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT25) NVIC->ITNS[0] |= BIT30; /* Int of EPWM1_P1_INT */
if(SCU_INIT_PNSSET2_VAL & BIT25) NVIC->ITNS[0] |= BIT31; /* Int of EPWM1_P2_INT */
if(SCU_INIT_PNSSET2_VAL & BIT26) NVIC->ITNS[2] |= BIT14; /* Int of BPWM0_INT */
if(SCU_INIT_PNSSET2_VAL & BIT27) NVIC->ITNS[2] |= BIT15; /* Int of BPWM1_INT */
if(SCU_INIT_PNSSET3_VAL & BIT0 ) NVIC->ITNS[0] |= BIT22; /* Int of QSPI0_INT */
if(SCU_INIT_PNSSET3_VAL & BIT1 ) NVIC->ITNS[0] |= BIT23; /* Int of SPI0_INT */
if(SCU_INIT_PNSSET3_VAL & BIT2 ) NVIC->ITNS[1] |= BIT19; /* Int of SPI1_INT */
if(SCU_INIT_PNSSET3_VAL & BIT3 ) NVIC->ITNS[1] |= BIT20; /* Int of SPI2_INT */
if(SCU_INIT_PNSSET3_VAL & BIT4 ) NVIC->ITNS[1] |= BIT30; /* Int of SPI3_INT */
if(SCU_INIT_PNSSET3_VAL & BIT16) NVIC->ITNS[1] |= BIT4 ; /* Int of UART0_INT */
if(SCU_INIT_PNSSET3_VAL & BIT17) NVIC->ITNS[1] |= BIT5 ; /* Int of UART1_INT */
if(SCU_INIT_PNSSET3_VAL & BIT18) NVIC->ITNS[1] |= BIT16; /* Int of UART2_INT */
if(SCU_INIT_PNSSET3_VAL & BIT19) NVIC->ITNS[1] |= BIT17; /* Int of UART3_INT */
if(SCU_INIT_PNSSET3_VAL & BIT20) NVIC->ITNS[2] |= BIT10; /* Int of UART4_INT */
if(SCU_INIT_PNSSET3_VAL & BIT21) NVIC->ITNS[2] |= BIT11; /* Int of UART5_INT */
if(SCU_INIT_PNSSET4_VAL & BIT0 ) NVIC->ITNS[1] |= BIT6 ; /* Int of I2C0_INT */
if(SCU_INIT_PNSSET4_VAL & BIT1 ) NVIC->ITNS[1] |= BIT7 ; /* Int of I2C1_INT */
if(SCU_INIT_PNSSET4_VAL & BIT2 ) NVIC->ITNS[2] |= BIT18; /* Int of I2C2_INT */
if(SCU_INIT_PNSSET4_VAL & BIT16) NVIC->ITNS[1] |= BIT26; /* Int of SC0_INT */
if(SCU_INIT_PNSSET4_VAL & BIT17) NVIC->ITNS[1] |= BIT27; /* Int of SC1_INT */
if(SCU_INIT_PNSSET4_VAL & BIT18) NVIC->ITNS[1] |= BIT28; /* Int of SC2_INT */
if(SCU_INIT_PNSSET5_VAL & BIT0 ) NVIC->ITNS[1] |= BIT24; /* Int of CAN0_INT */
if(SCU_INIT_PNSSET5_VAL & BIT16) NVIC->ITNS[2] |= BIT20; /* Int of QEI0_INT */
if(SCU_INIT_PNSSET5_VAL & BIT17) NVIC->ITNS[2] |= BIT21; /* Int of QEI1_INT */
if(SCU_INIT_PNSSET5_VAL & BIT20) NVIC->ITNS[2] |= BIT22; /* Int of ECAP0_INT */
if(SCU_INIT_PNSSET5_VAL & BIT21) NVIC->ITNS[2] |= BIT23; /* Int of ECAP1_INT */
if(SCU_INIT_PNSSET5_VAL & BIT25) NVIC->ITNS[3] |= BIT5 ; /* Int of TRNG_INT */
if(SCU_INIT_PNSSET5_VAL & BIT27) NVIC->ITNS[3] |= BIT4 ; /* Int of LCD_INT */
if(SCU_INIT_PNSSET5_VAL & BIT29) NVIC->ITNS[3] |= BIT14; /* Int of TAMPER_INT */
if(SCU_INIT_PNSSET6_VAL & BIT0 ) NVIC->ITNS[1] |= BIT21; /* Int of USBD_INT */
if(SCU_INIT_PNSSET6_VAL & BIT16) NVIC->ITNS[2] |= BIT12; /* Int of USCI0_INT */
if(SCU_INIT_PNSSET6_VAL & BIT17) NVIC->ITNS[2] |= BIT13; /* Int of USCI1_INT */
if(SCU_INIT_IONSSET_VAL & BIT0 ) NVIC->ITNS[0] |= BIT16; /* Int of PA */
if(SCU_INIT_IONSSET_VAL & BIT1 ) NVIC->ITNS[0] |= BIT17; /* Int of PB */
if(SCU_INIT_IONSSET_VAL & BIT2 ) NVIC->ITNS[0] |= BIT18; /* Int of PC */
if(SCU_INIT_IONSSET_VAL & BIT3 ) NVIC->ITNS[0] |= BIT19; /* Int of PD */
if(SCU_INIT_IONSSET_VAL & BIT4 ) NVIC->ITNS[0] |= BIT20; /* Int of PE */
if(SCU_INIT_IONSSET_VAL & BIT5 ) NVIC->ITNS[0] |= BIT21; /* Int of PF */
if(SCU_INIT_IONSSET_VAL & BIT6 ) NVIC->ITNS[2] |= BIT8 ; /* Int of PG */
if(SCU_INIT_IONSSET_VAL & BIT7 ) NVIC->ITNS[2] |= BIT24; /* Int of PH */
/* Enable SCU Int status */
SCU->SVIOIEN = (uint32_t)-1;
NVIC_EnableIRQ(SCU_IRQn);
}
#if defined( __ICCARM__ )
__WEAK
#else
__attribute__((weak))
#endif
void SCU_IRQHandler(void)
{
char const *master[] = {"CPU", 0, 0, "PDMA0", "SDH0", "CRPT", "USBH", 0,0,0,0,"PDMA1"};
char const *ipname[] = {"APB0","APB1",0,0,"GPIO","EBI","USBH","CRC","SDH0",0,"PDMA0","PDMA1"
,"SRAM0","SRAM1","FMC","FLASH","SCU","SYS","CRPT"};
const uint8_t info[] = {0x34,0x3C,0,0, 0x44,0x4C,0x54,0x5C,0x64,0,0x74,0x7C,0x84,0x8C,0x94,0x9C,0xA4,0xAC,0xB4};
uint32_t u32Reg, u32Addr;
uint32_t i;
/* TrustZone access policy */
u32Reg = SCU->SVINTSTS;
if(u32Reg)
{
/* Get violation address and source */
for(i=0;i< sizeof(ipname);i++)
{
if(u32Reg & (1 << i))
{
u32Addr = M32(SCU_BASE+info[i]+4);
printf(" %s(0x%08x) Alarm! illegal access by %s\n",ipname[i], u32Addr,master[M32(SCU_BASE+info[i])]);
SCU->SVINTSTS = (1 << i);
break;
}
}
}
}
/**
\brief Setup a Nonsecure callable Region
\details The base and limit of Nonsecure callable region is dependent on the
application code size.
*/
void NSC_Init(void)
{
uint32_t u32Region;
uint32_t u32Base, u32Limit;
#if defined (__ICCARM__)
# pragma section = "NSC"
u32Base = (uint32_t)__section_begin("NSC");
u32Limit = (uint32_t)__section_end("NSC");
#elif defined(__ARMCC_VERSION)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
extern uint32_t Image$$NSC_ROM$$XO$$Base[];
extern uint32_t Image$$NSC_ROM$$XO$$Limit[];
u32Base = (uint32_t)Image$$NSC_ROM$$XO$$Base;
u32Limit = (uint32_t)Image$$NSC_ROM$$XO$$Limit;
#pragma clang diagnostic pop
#else
extern uint32_t __start_NSC[];
extern uint32_t __end_NSC[];
u32Base = (uint32_t)__start_NSC;
u32Limit = (uint32_t)__end_NSC;
#endif
/* SAU region 3 is dedicated for NSC */
u32Region = 3;
SAU->RNR = (u32Region & SAU_RNR_REGION_Msk);
SAU->RBAR = (u32Base & SAU_RBAR_BADDR_Msk);
SAU->RLAR = ((u32Limit-1) & SAU_RLAR_LADDR_Msk) |
((1ul << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1ul;
}
/**
\brief Setup a SAU Region
\details Writes the region information contained in SAU_Region to the
registers SAU_RNR, SAU_RBAR, and SAU_RLAR
*/
void TZ_SAU_Setup(void)
{
#if defined (__SAU_PRESENT) && (__SAU_PRESENT == 1U)
#if defined (SAU_INIT_REGION0) && (SAU_INIT_REGION0 == 1U)
SAU_INIT_REGION(0);
#endif
#if defined (SAU_INIT_REGION1) && (SAU_INIT_REGION1 == 1U)
SAU_INIT_REGION(1);
#endif
#if defined (SAU_INIT_REGION2) && (SAU_INIT_REGION2 == 1U)
SAU_INIT_REGION(2);
#endif
#if defined (SAU_INIT_REGION3) && (SAU_INIT_REGION3 == 1U)
SAU_INIT_REGION(3);
#endif
#if defined (SAU_INIT_REGION4) && (SAU_INIT_REGION4 == 1U)
SAU_INIT_REGION(4);
#endif
#if defined (SAU_INIT_REGION5) && (SAU_INIT_REGION5 == 1U)
SAU_INIT_REGION(5);
#endif
#if defined (SAU_INIT_REGION6) && (SAU_INIT_REGION6 == 1U)
SAU_INIT_REGION(6);
#endif
#if defined (SAU_INIT_REGION7) && (SAU_INIT_REGION7 == 1U)
SAU_INIT_REGION(7);
#endif
/* repeat this for all possible SAU regions */
#if defined (SAU_INIT_CTRL) && (SAU_INIT_CTRL == 1U)
SAU->CTRL = ((SAU_INIT_CTRL_ENABLE << SAU_CTRL_ENABLE_Pos) & SAU_CTRL_ENABLE_Msk) |
((SAU_INIT_CTRL_ALLNS << SAU_CTRL_ALLNS_Pos) & SAU_CTRL_ALLNS_Msk) ;
#endif
#endif /* defined (__SAU_PRESENT) && (__SAU_PRESENT == 1U) */
#if defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U)
SCB->SCR = (SCB->SCR & ~(SCB_SCR_SLEEPDEEPS_Msk)) |
((SCB_CSR_DEEPSLEEPS_VAL << SCB_SCR_SLEEPDEEPS_Pos) & SCB_SCR_SLEEPDEEPS_Msk);
SCB->AIRCR = (0x05FA << 16) |
((SCB_AIRCR_SYSRESETREQS_VAL << SCB_AIRCR_SYSRESETREQS_Pos) & SCB_AIRCR_SYSRESETREQS_Msk) |
((SCB_AIRCR_BFHFNMINS_VAL << SCB_AIRCR_BFHFNMINS_Pos) & SCB_AIRCR_BFHFNMINS_Msk) |
((SCB_AIRCR_PRIS_VAL << SCB_AIRCR_PRIS_Pos) & SCB_AIRCR_PRIS_Msk);
#endif /* defined (SCB_CSR_AIRCR_INIT) && (SCB_CSR_AIRCR_INIT == 1U) */
#if defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U)
SCB->ICSR = (SCB->ICSR & ~(SCB_ICSR_STTNS_Msk)) |
((SCB_ICSR_STTNS_VAL << SCB_ICSR_STTNS_Pos) & SCB_ICSR_STTNS_Msk);
#endif /* defined (SCB_ICSR_INIT) && (SCB_ICSR_INIT == 1U) */
/* repeat this for all possible ITNS elements */
/* Initial Nonsecure callable region */
NSC_Init();
}
#else
void SCU_IRQHandler(void)
{
while(1);
}
#endif
/**
* @brief Update the Variable SystemCoreClock
*
* @param None
*
* @return None
*
* @details This function is used to update the variable SystemCoreClock
* and must be called whenever the core clock is changed.
*/
void SystemCoreClockUpdate(void)
{
/* Update PLL Clock */
PllClock = CLK_GetPLLClockFreq();
/* Update System Core Clock */
SystemCoreClock = CLK_GetCPUFreq();
/* Update Cycles per micro second */
CyclesPerUs = (SystemCoreClock + 500000UL) / 1000000UL;
}
/**
* @brief System Initialization
*
* @param None
*
* @return None
*
* @details The necessary initialization of system. Global variables are forbidden here.
*/
void SystemInit(void)
{
#if defined (__VTOR_PRESENT) && (__VTOR_PRESENT == 1U)
SCB->VTOR = (uint32_t) &__Vectors;
#endif
#if defined (__ARM_FEATURE_CMSE) && (__ARM_FEATURE_CMSE == 3)
TZ_SAU_Setup();
SCU_Setup();
FMC_NSBA_Setup();
#endif
#ifdef INIT_SYSCLK_AT_BOOTING
#endif
}
#if USE_ASSERT
/**
* @brief Assert Error Message
*
* @param[in] file the source file name
* @param[in] line line number
*
* @return None
*
* @details The function prints the source file name and line number where
* the ASSERT_PARAM() error occurs, and then stops in an infinite loop.
*/
void AssertError(uint8_t * file, uint32_t line)
{
printf("[%s] line %d : wrong parameters.\r\n", file, line);
/* Infinite loop */
while(1) ;
}
#endif
#if (defined(__ICCARM__) && (__VER__ >= 7080000) && (__VER__ < 8020000))
#if (__ARM_FEATURE_CMSE == 3U)
/**
\brief Get Process Stack Pointer (non-secure)
\details Returns the current value of the non-secure Process Stack Pointer (PSP) when in secure state.
\return PSP Register value
*/
uint32_t __TZ_get_PSP_NS(void)
{
register uint32_t result;
__ASM volatile("MRS %0, psp_ns" : "=r"(result));
return(result);
}
/**
\brief Set Process Stack Pointer (non-secure)
\details Assigns the given value to the non-secure Process Stack Pointer (PSP) when in secure state.
\param [in] topOfProcStack Process Stack Pointer value to set
*/
void __TZ_set_PSP_NS(uint32_t topOfProcStack)
{
__ASM volatile("MSR psp_ns, %0" : : "r"(topOfProcStack));
}
/**
\brief Get Main Stack Pointer (non-secure)
\details Returns the current value of the non-secure Main Stack Pointer (MSP) when in secure state.
\return MSP Register value
*/
int32_t __TZ_get_MSP_NS(void)
{
register uint32_t result;
__ASM volatile("MRS %0, msp_ns" : "=r"(result));
return(result);
}
/**
\brief Set Main Stack Pointer (non-secure)
\details Assigns the given value to the non-secure Main Stack Pointer (MSP) when in secure state.
\param [in] topOfMainStack Main Stack Pointer value to set
*/
void __TZ_set_MSP_NS(uint32_t topOfMainStack)
{
__ASM volatile("MSR msp_ns, %0" : : "r"(topOfMainStack));
}
/**
\brief Get Priority Mask (non-secure)
\details Returns the current state of the non-secure priority mask bit from the Priority Mask Register when in secure state.
\return Priority Mask value
*/
uint32_t __TZ_get_PRIMASK_NS(void)
{
uint32_t result;
__ASM volatile("MRS %0, primask_ns" : "=r"(result));
return(result);
}
/**
\brief Set Priority Mask (non-secure)
\details Assigns the given value to the non-secure Priority Mask Register when in secure state.
\param [in] priMask Priority Mask
*/
void __TZ_set_PRIMASK_NS(uint32_t priMask)
{
__ASM volatile("MSR primask_ns, %0" : : "r"(priMask) : "memory");
}
#endif
#endif
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::Network
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: Net_Config.c
* Purpose: Network Configuration
* Rev.: V7.1.0
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>Network System Settings
// <i>Global Network System definitions
// <s.15>Local Host Name
// <i>This is the name under which embedded host can be
// <i>accessed on a local area network.
// <i>Default: "my_host"
#define NET_HOST_NAME "my_host"
// <o>Memory Pool Size <1536-262144:4>
// <i>This is the size of a memory pool in bytes. Buffers for
// <i>network packets are allocated from this memory pool.
// <i>Default: 12000 bytes
#define NET_MEM_POOL_SIZE 12000
// <q>Start System Services
// <i>If enabled, the system will automatically start server services
// <i>(HTTP, FTP, TFTP server, ...) when initializing the network system.
// <i>Default: Enabled
#define NET_START_SERVICE 1
// <h>OS Resource Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Core Thread Stack Size <512-65535:4>
// <i>Default: 1024 bytes
#define NET_THREAD_STACK_SIZE 1024
// Core Thread Priority
#define NET_THREAD_PRIORITY osPriorityNormal
// </h>
// </h>
//------------- <<< end of configuration section >>> ---------------------------
#include "RTE_Components.h"
#ifdef RTE_Network_Interface_ETH_0
#include "Net_Config_ETH_0.h"
#endif
#ifdef RTE_Network_Interface_ETH_1
#include "Net_Config_ETH_1.h"
#endif
#ifdef RTE_Network_Interface_WiFi_0
#include "Net_Config_WiFi_0.h"
#endif
#ifdef RTE_Network_Interface_WiFi_1
#include "Net_Config_WiFi_1.h"
#endif
#ifdef RTE_Network_Interface_PPP
#include "Net_Config_PPP.h"
#endif
#ifdef RTE_Network_Interface_SLIP
#include "Net_Config_SLIP.h"
#endif
#ifdef RTE_Network_Socket_UDP
#include "Net_Config_UDP.h"
#endif
#ifdef RTE_Network_Socket_TCP
#include "Net_Config_TCP.h"
#endif
#ifdef RTE_Network_Socket_BSD
#include "Net_Config_BSD.h"
#endif
#ifdef RTE_Network_Web_Server_RO
#include "Net_Config_HTTP_Server.h"
#endif
#ifdef RTE_Network_Web_Server_FS
#include "Net_Config_HTTP_Server.h"
#endif
#ifdef RTE_Network_Telnet_Server
#include "Net_Config_Telnet_Server.h"
#endif
#ifdef RTE_Network_TFTP_Server
#include "Net_Config_TFTP_Server.h"
#endif
#ifdef RTE_Network_TFTP_Client
#include "Net_Config_TFTP_Client.h"
#endif
#ifdef RTE_Network_FTP_Server
#include "Net_Config_FTP_Server.h"
#endif
#ifdef RTE_Network_FTP_Client
#include "Net_Config_FTP_Client.h"
#endif
#ifdef RTE_Network_DNS_Client
#include "Net_Config_DNS_Client.h"
#endif
#ifdef RTE_Network_SMTP_Client
#include "Net_Config_SMTP_Client.h"
#endif
#ifdef RTE_Network_SNMP_Agent
#include "Net_Config_SNMP_Agent.h"
#endif
#ifdef RTE_Network_SNTP_Client
#include "Net_Config_SNTP_Client.h"
#endif
#include "net_config.h"
/**
\addtogroup net_genFunc
@{
*/
/**
\fn void net_sys_error (NET_ERROR error)
\ingroup net_cores
\brief Network system error handler.
*/
void net_sys_error (NET_ERROR error) {
/* This function is called when a fatal error is encountered. */
/* The normal program execution is not possible anymore. */
switch (error) {
case NET_ERROR_MEM_ALLOC:
/* Out of memory */
break;
case NET_ERROR_MEM_FREE:
/* Trying to release non existing memory block */
break;
case NET_ERROR_MEM_CORRUPT:
/* Memory Link pointer corrupted */
/* More data written than the size of allocated memory block */
break;
case NET_ERROR_CONFIG:
/* Network configuration error detected */
break;
case NET_ERROR_UDP_ALLOC:
/* Out of UDP Sockets */
break;
case NET_ERROR_TCP_ALLOC:
/* Out of TCP Sockets */
break;
case NET_ERROR_TCP_STATE:
/* TCP State machine in undefined state */
break;
}
/* End-less loop */
while (1);
}
/**
@}
*/
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::Network:Socket
* Copyright (c) 2004-2019 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: Net_Config_TCP.h
* Purpose: Network Configuration for TCP Sockets
* Rev.: V7.1.1
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>TCP Sockets
#define TCP_ENABLE 1
// <o>Number of TCP Sockets <1-20>
// <i>Number of available TCP sockets
// <i>Default: 6
#define TCP_NUM_SOCKS 6
// <o>Number of Retries <0-20>
// <i>How many times TCP module will try to retransmit data
// <i>before giving up. Increase this value for high-latency
// <i>and low throughput networks.
// <i>Default: 5
#define TCP_MAX_RETRY 5
// <o>Retry Timeout in seconds <1-10>
// <i>If data frame not acknowledged within this time frame,
// <i>TCP module will try to resend the data again.
// <i>Default: 4
#define TCP_RETRY_TOUT 4
// <o>Default Connect Timeout in seconds <1-65535>
// <i>If no TCP data frame has been exchanged during this time,
// <i>the TCP connection is either closed or a keep-alive frame
// <i>is sent to verify that the connection still exists.
// <i>Default: 120
#define TCP_DEFAULT_TOUT 120
// <o>Maximum Segment Size <536-1440>
// <i>The Maximum Segment Size specifies the maximum
// <i>number of bytes in the TCP segment's Data field.
// <i>Default: 1440
#define TCP_MAX_SEG_SIZE 1440
// <o>Receive Window Size <536-65535>
// <i>Receive Window Size specifies the size of data,
// <i>that the socket is able to buffer in flow-control mode.
// <i>Default: 4320
#define TCP_RECEIVE_WIN_SIZE 4320
// </h>
// TCP Initial Retransmit period in seconds
#define TCP_INITIAL_RETRY_TOUT 1
// TCP SYN frame retransmit period in seconds
#define TCP_SYN_RETRY_TOUT 2
// Number of retries to establish a connection
#define TCP_CONNECT_RETRY 7
// Dynamic port start (default 49152)
#define TCP_DYN_PORT_START 49152
// Dynamic port end (default 65535)
#define TCP_DYN_PORT_END 65535
//------------- <<< end of configuration section >>> ---------------------------
/*------------------------------------------------------------------------------
* MDK Middleware - Component ::Network:Interface
* Copyright (c) 2004-2020 Arm Limited (or its affiliates). All rights reserved.
*------------------------------------------------------------------------------
* Name: Net_Config_WiFi_0.h
* Purpose: Network Configuration for WiFi Interface
* Rev.: V7.1.0
*----------------------------------------------------------------------------*/
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
// <h>WiFi Network Interface
#define WIFI0_ENABLE 1
// <o>Connect to hardware via Driver_WiFi# <0-255>
// <i>Select driver control block for WiFi interface
#define WIFI0_DRIVER 0
// <o>WiFi Mode <0=>Station
// <1=>Access Point
// <i>Mode control setting for the WiFi driver
#define WIFI0_MODE 0
// <e>WiFi MAC
// <i>If this option is enabled, a configured MAC address
// <i>will be used. If disabled, MAC address provided in
// <i>the WiFi module will be used.
// <i>Default: disabled
#define WIFI0_MAC_CONFIG 0
// <s.17>MAC Address
// <i>MAC Address in text representation
// <i>Value FF-FF-FF-FF-FF-FF is not allowed,
// <i>LSB of first byte must be 0 (Multicast bit).
// <i>Default: "1E-30-6C-32-78-F8"
#define WIFI0_MAC_ADDR "1E-30-6C-32-78-F8"
// </e>
// <e>IPv4
// <i>Enable IPv4 Protocol for Network Interface
#define WIFI0_IP4_ENABLE 1
// <s.15>IP Address
// <i>Static IPv4 Address in text representation
// <i>Default: "192.168.1.100"
#define WIFI0_IP4_ADDR "192.168.1.100"
// <s.15>Subnet mask
// <i>Local Subnet mask in text representation
// <i>Default: "255.255.255.0"
#define WIFI0_IP4_MASK "255.255.255.0"
// <s.15>Default Gateway
// <i>IP Address of Default Gateway in text representation
// <i>Default: "192.168.1.254"
#define WIFI0_IP4_GATEWAY "192.168.1.254"
// <s.15>Primary DNS Server
// <i>IP Address of Primary DNS Server in text representation
// <i>Default: "8.8.8.8"
#define WIFI0_IP4_PRIMARY_DNS "8.8.8.8"
// <s.15>Secondary DNS Server
// <i>IP Address of Secondary DNS Server in text representation
// <i>Default: "8.8.4.4"
#define WIFI0_IP4_SECONDARY_DNS "8.8.4.4"
// <e>IP Fragmentation
// <i>This option enables fragmentation of outgoing IP datagrams,
// <i>and reassembling the fragments of incoming IP datagrams.
// <i>Default: enabled
#define WIFI0_IP4_FRAG_ENABLE 1
// <o>MTU size <576-1500>
// <i>Maximum Transmission Unit in bytes
// <i>Default: 1500
#define WIFI0_IP4_MTU 1500
// </e>
// <h>ARP Address Resolution
// <i>ARP cache and node address resolver settings
// <o>Cache Table size <5-100>
// <i>Number of cached MAC/IP addresses
// <i>Default: 10
#define WIFI0_ARP_TAB_SIZE 10
// <o>Cache Timeout in seconds <5-255>
// <i>A timeout for cached hardware/IP addresses
// <i>Default: 150
#define WIFI0_ARP_CACHE_TOUT 150
// <o>Number of Retries <0-20>
// <i>Number of Retries to resolve an IP address
// <i>before ARP module gives up
// <i>Default: 4
#define WIFI0_ARP_MAX_RETRY 4
// <o>Resend Timeout in seconds <1-10>
// <i>A timeout to resend the ARP Request
// <i>Default: 2
#define WIFI0_ARP_RESEND_TOUT 2
// <q>Send Notification on Address changes
// <i>When this option is enabled, the embedded host
// <i>will send a Gratuitous ARP notification at startup,
// <i>or when the device IP address has changed.
// <i>Default: Disabled
#define WIFI0_ARP_NOTIFY 0
// </h>
// <e>IGMP Group Management
// <i>Enable or disable Internet Group Management Protocol
#define WIFI0_IGMP_ENABLE 0
// <o>Membership Table size <2-50>
// <i>Number of Groups this host can join
// <i>Default: 5
#define WIFI0_IGMP_TAB_SIZE 5
// </e>
// <q>NetBIOS Name Service
// <i>When this option is enabled, the embedded host can be
// <i>accessed by its name on local LAN using NBNS protocol.
#define WIFI0_NBNS_ENABLE 1
// <e>Dynamic Host Configuration
// <i>When this option is enabled, local IP address, Net Mask
// <i>and Default Gateway are obtained automatically from
// <i>the DHCP Server on local LAN.
#define WIFI0_DHCP_ENABLE 1
// <s.40>Vendor Class Identifier
// <i>This value is optional. If specified, it is added
// <i>to DHCP request message, identifying vendor type.
// <i>Default: ""
#define WIFI0_DHCP_VCID ""
// <q>Bootfile Name
// <i>This value is optional. If enabled, the Bootfile Name
// <i>(option 67) is also requested from DHCP server.
// <i>Default: disabled
#define WIFI0_DHCP_BOOTFILE 0
// <q>NTP Servers
// <i>This value is optional. If enabled, a list of NTP Servers
// <i>(option 42) is also requested from DHCP server.
// <i>Default: disabled
#define WIFI0_DHCP_NTP_SERVERS 0
// </e>
// Disable ICMP Echo response
#define WIFI0_ICMP_NO_ECHO 0
// </e>
// <e>IPv6
// <i>Enable IPv6 Protocol for Network Interface
#define WIFI0_IP6_ENABLE 1
// <s.40>IPv6 Address
// <i>Static IPv6 Address in text representation
// <i>Use unspecified address "::" when static
// <i>IPv6 address is not used.
// <i>Default: "fec0::2"
#define WIFI0_IP6_ADDR "fec0::2"
// <o>Subnet prefix-length <1-128>
// <i>Number of bits that define network address
// <i>Default: 64
#define WIFI0_IP6_PREFIX_LEN 64
// <s.40>Default Gateway
// <i>Default Gateway IPv6 Address in text representation
// <i>Default: "fec0::1"
#define WIFI0_IP6_GATEWAY "fec0::1"
// <s.40>Primary DNS Server
// <i>Primary DNS Server IPv6 Address in text representation
// <i>Default: "2001:4860:4860::8888"
#define WIFI0_IP6_PRIMARY_DNS "2001:4860:4860::8888"
// <s.40>Secondary DNS Server
// <i>Secondary DNS Server IPv6 Address in text representation
// <i>Default: "2001:4860:4860::8844"
#define WIFI0_IP6_SECONDARY_DNS "2001:4860:4860::8844"
// <h>Neighbor Discovery
// <i>Neighbor cache and node address resolver settings
// <o>Cache Table size <5-100>
// <i>Number of cached node addresses
// <i>Default: 5
#define WIFI0_NDP_TAB_SIZE 5
// <o>Cache Timeout in seconds <5-255>
// <i>Timeout for cached node addresses
// <i>Default: 150
#define WIFI0_NDP_CACHE_TOUT 150
// <o>Number of Retries <0-20>
// <i>Number of retries to resolve an IP address
// <i>before NDP module gives up
// <i>Default: 4
#define WIFI0_NDP_MAX_RETRY 4
// <o>Resend Timeout in seconds <1-10>
// <i>A timeout to resend Neighbor Solicitation
// <i>Default: 2
#define WIFI0_NDP_RESEND_TOUT 2
// </h>
// <e>Dynamic Host Configuration
// <i>When this option is enabled, local IPv6 address is
// <i>automatically configured.
#define WIFI0_DHCP6_ENABLE 1
// <o>DHCPv6 Client Mode <0=>Stateless Mode <1=>Statefull Mode
// <i>Stateless DHCPv6 Client uses router advertisements
// <i>for IPv6 address autoconfiguration (SLAAC).
// <i>Statefull DHCPv6 Client connects to DHCPv6 server for a
// <i>leased IPv6 address and DNS server IPv6 addresses.
#define WIFI0_DHCP6_MODE 1
// <e>Vendor Class Option
// <i>If enabled, Vendor Class option is added to DHCPv6
// <i>request message, identifying vendor type.
// <i>Default: disabled
#define WIFI0_DHCP6_VCLASS_ENABLE 0
// <o>Enterprise ID
// <i>Enterprise-number as registered with IANA.
// <i>Default: 0 (Reserved)
#define WIFI0_DHCP6_VCLASS_EID 0
// <s.40>Vendor Class Data
// <i>This string identifies vendor type.
// <i>Default: ""
#define WIFI0_DHCP6_VCLASS_DATA ""
// </e>
// </e>
// Disable ICMP6 Echo response
#define WIFI0_ICMP6_NO_ECHO 0
// </e>
// <h>OS Resource Settings
// <i>These settings are used to optimize usage of OS resources.
// <o>Interface Thread Stack Size <512-65535:4>
// <i>Default: 512 bytes
#define WIFI0_THREAD_STACK_SIZE 512
// Interface Thread Priority
#define WIFI0_THREAD_PRIORITY osPriorityAboveNormal
// </h>
// </h>
//------------- <<< end of configuration section >>> ---------------------------
/*
* Configuration template
*
* Copyright (C) 2006-2021, Arm Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* This set of compile-time options may be used to enable
* or disable features selectively, and reduce the global
* memory footprint.
*/
#ifndef MBEDTLS_CONFIG_H
#define MBEDTLS_CONFIG_H
/* System support */
//#define MBEDTLS_HAVE_ASM
//#define MBEDTLS_HAVE_TIME
//#define MBEDTLS_HAVE_TIME_DATE
//#define MBEDTLS_PLATFORM_MEMORY
//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
//#define MBEDTLS_CHECK_PARAMS
/* mbed TLS feature support */
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#define MBEDTLS_AES_ROM_TABLES
//#define MBEDTLS_AES_FEWER_TABLES
//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
#define MBEDTLS_CIPHER_MODE_CBC
#define MBEDTLS_CIPHER_MODE_CFB
#define MBEDTLS_CIPHER_MODE_CTR
//#define MBEDTLS_CIPHER_MODE_OFB
//#define MBEDTLS_CIPHER_MODE_XTS
#define MBEDTLS_CIPHER_PADDING_PKCS7
#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
#define MBEDTLS_CIPHER_PADDING_ZEROS
#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
#define MBEDTLS_REMOVE_3DES_CIPHERSUITES
#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
#define MBEDTLS_ECP_DP_BP256R1_ENABLED
#define MBEDTLS_ECP_DP_BP384R1_ENABLED
#define MBEDTLS_ECP_DP_BP512R1_ENABLED
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
#define MBEDTLS_ECP_DP_CURVE448_ENABLED
#define MBEDTLS_ECP_NIST_OPTIM
//#define MBEDTLS_ECP_RESTARTABLE
#define MBEDTLS_ECDSA_DETERMINISTIC
#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
#define MBEDTLS_PK_PARSE_EC_EXTENDED
#define MBEDTLS_ERROR_STRERROR_DUMMY
#define MBEDTLS_GENPRIME
//#define MBEDTLS_FS_IO
//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
#define MBEDTLS_NO_PLATFORM_ENTROPY
//#define MBEDTLS_ENTROPY_FORCE_SHA256
//#define MBEDTLS_ENTROPY_NV_SEED
//#define MBEDTLS_MEMORY_DEBUG
//#define MBEDTLS_MEMORY_BACKTRACE
#define MBEDTLS_PK_RSA_ALT_SUPPORT
#define MBEDTLS_PKCS1_V15
#define MBEDTLS_PKCS1_V21
//#define MBEDTLS_PSA_CRYPTO_SPM
//#define MBEDTLS_RSA_NO_CRT
#define MBEDTLS_SELF_TEST
//#define MBEDTLS_SHA256_SMALLER
//#define MBEDTLS_SHA512_SMALLER
//#define MBEDTLS_SHA512_NO_SHA384
#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
//#define MBEDTLS_SSL_RECORD_CHECKING
//#define MBEDTLS_SSL_DTLS_CONNECTION_ID
//#define MBEDTLS_SSL_ASYNC_PRIVATE
//#define MBEDTLS_SSL_CONTEXT_SERIALIZATION
//#define MBEDTLS_SSL_DEBUG_ALL
#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
#define MBEDTLS_SSL_FALLBACK_SCSV
//#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
//#define MBEDTLS_SSL_HW_RECORD_ACCEL
#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
#define MBEDTLS_SSL_RENEGOTIATION
//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
#define MBEDTLS_SSL_PROTO_SSL3
#define MBEDTLS_SSL_PROTO_TLS1
#define MBEDTLS_SSL_PROTO_TLS1_1
#define MBEDTLS_SSL_PROTO_TLS1_2
#define MBEDTLS_SSL_PROTO_DTLS
#define MBEDTLS_SSL_ALPN
#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
#define MBEDTLS_SSL_SESSION_TICKETS
//#define MBEDTLS_SSL_EXPORT_KEYS
#define MBEDTLS_SSL_SERVER_NAME_INDICATION
#define MBEDTLS_SSL_TRUNCATED_HMAC
//#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
//#define MBEDTLS_USE_PSA_CRYPTO
#define MBEDTLS_VERSION_FEATURES
//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
//#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
#define MBEDTLS_X509_CHECK_KEY_USAGE
#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
//#define MBEDTLS_ZLIB_SUPPORT
/* mbed TLS modules */
#define MBEDTLS_AES_C
#define MBEDTLS_ARC4_C
#define MBEDTLS_ASN1_PARSE_C
#define MBEDTLS_ASN1_WRITE_C
#define MBEDTLS_BASE64_C
#define MBEDTLS_BIGNUM_C
#define MBEDTLS_BLOWFISH_C
#define MBEDTLS_CAMELLIA_C
//#define MBEDTLS_ARIA_C
#define MBEDTLS_CCM_C
#define MBEDTLS_CERTS_C
//#define MBEDTLS_CHACHA20_C
//#define MBEDTLS_CHACHAPOLY_C
#define MBEDTLS_CIPHER_C
//#define MBEDTLS_CMAC_C
#define MBEDTLS_CTR_DRBG_C
#define MBEDTLS_DEBUG_C
#define MBEDTLS_DES_C
#define MBEDTLS_DHM_C
#define MBEDTLS_ECDH_C
#define MBEDTLS_ECDSA_C
//#define MBEDTLS_ECJPAKE_C
#define MBEDTLS_ECP_C
#define MBEDTLS_ENTROPY_C
#define MBEDTLS_ERROR_C
#define MBEDTLS_GCM_C
//#define MBEDTLS_HAVEGE_C
//#define MBEDTLS_HKDF_C
#define MBEDTLS_HMAC_DRBG_C
//#define MBEDTLS_NIST_KW_C
#define MBEDTLS_MD_C
//#define MBEDTLS_MD2_C
//#define MBEDTLS_MD4_C
#define MBEDTLS_MD5_C
//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
#define MBEDTLS_NET_C
#define MBEDTLS_OID_C
#define MBEDTLS_PEM_PARSE_C
#define MBEDTLS_PEM_WRITE_C
#define MBEDTLS_PK_C
#define MBEDTLS_PK_PARSE_C
#define MBEDTLS_PK_WRITE_C
#define MBEDTLS_PKCS5_C
//#define MBEDTLS_PKCS11_C
#define MBEDTLS_PKCS12_C
#define MBEDTLS_PLATFORM_C
//#define MBEDTLS_POLY1305_C
//#define MBEDTLS_PSA_CRYPTO_C
//#define MBEDTLS_PSA_CRYPTO_SE_C
//#define MBEDTLS_PSA_CRYPTO_STORAGE_C
//#define MBEDTLS_PSA_ITS_FILE_C
#define MBEDTLS_RIPEMD160_C
#define MBEDTLS_RSA_C
#define MBEDTLS_SHA1_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_SHA512_C
#define MBEDTLS_SSL_CACHE_C
#define MBEDTLS_SSL_COOKIE_C
#define MBEDTLS_SSL_TICKET_C
#define MBEDTLS_SSL_CLI_C
//#define MBEDTLS_SSL_SRV_C
#define MBEDTLS_SSL_TLS_C
//#define MBEDTLS_THREADING_C
//#define MBEDTLS_TIMING_C
#define MBEDTLS_VERSION_C
#define MBEDTLS_X509_USE_C
#define MBEDTLS_X509_CRT_PARSE_C
#define MBEDTLS_X509_CRL_PARSE_C
#define MBEDTLS_X509_CSR_PARSE_C
#define MBEDTLS_X509_CREATE_C
#define MBEDTLS_X509_CRT_WRITE_C
#define MBEDTLS_X509_CSR_WRITE_C
#define MBEDTLS_XTEA_C
#include "mbedtls/check_config.h"
#endif /* MBEDTLS_CONFIG_H */
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'Secure'
* Target: 'Secure'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "M2351.h"
/* ARM::Security:mbed TLS:2.24.0 */
#define RTE_Security_mbedTLS /* Security mbed TLS */
#endif /* RTE_COMPONENTS_H */
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>Secure</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<TargetOption>
<CLKADS>12000000</CLKADS>
<OPTTT>
<gFlags>1</gFlags>
<BeepAtEnd>1</BeepAtEnd>
<RunSim>0</RunSim>
<RunTarget>1</RunTarget>
<RunAbUc>0</RunAbUc>
</OPTTT>
<OPTHX>
<HexSelection>1</HexSelection>
<FlashByte>65535</FlashByte>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
</OPTHX>
<OPTLEX>
<PageWidth>79</PageWidth>
<PageLength>66</PageLength>
<TabStop>8</TabStop>
<ListingPath>.\Listings\</ListingPath>
</OPTLEX>
<ListingPage>
<CreateCListing>1</CreateCListing>
<CreateAListing>1</CreateAListing>
<CreateLListing>1</CreateLListing>
<CreateIListing>0</CreateIListing>
<AsmCond>1</AsmCond>
<AsmSymb>1</AsmSymb>
<AsmXref>0</AsmXref>
<CCond>1</CCond>
<CCode>0</CCode>
<CListInc>0</CListInc>
<CSymb>0</CSymb>
<LinkerCodeListing>0</LinkerCodeListing>
</ListingPage>
<OPTXL>
<LMap>1</LMap>
<LComments>1</LComments>
<LGenerateSymbols>1</LGenerateSymbols>
<LLibSym>1</LLibSym>
<LLines>1</LLines>
<LLocSym>1</LLocSym>
<LPubSym>1</LPubSym>
<LXref>0</LXref>
<LExpSel>0</LExpSel>
</OPTXL>
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>6</CpuCode>
<DebugOpt>
<uSim>0</uSim>
<uTrg>1</uTrg>
<sLdApp>1</sLdApp>
<sGomain>1</sGomain>
<sRbreak>1</sRbreak>
<sRwatch>1</sRwatch>
<sRmem>1</sRmem>
<sRfunc>1</sRfunc>
<sRbox>1</sRbox>
<tLdApp>1</tLdApp>
<tGomain>1</tGomain>
<tRbreak>1</tRbreak>
<tRwatch>1</tRwatch>
<tRmem>1</tRmem>
<tRfunc>0</tRfunc>
<tRbox>1</tRbox>
<tRtrace>1</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>7</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>NULink\Nu_Link.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGTARM</Key>
<Name>(6010=-1,-1,-1,-1,0)(6018=-1,-1,-1,-1,0)(6019=-1,-1,-1,-1,0)(6008=-1,-1,-1,-1,0)(6009=-1,-1,-1,-1,0)(6014=-1,-1,-1,-1,0)(6015=-1,-1,-1,-1,0)(6003=-1,-1,-1,-1,0)(6000=-1,-1,-1,-1,0)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>ARMDBGFLAGS</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>Nu_Link</Key>
<Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2V8M</Key>
<Name>UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1200 -FN1 -FF0M2351_AP_512 -FS00 -FL080000 -FP0($$Device:M2351KIAAE$Flash\M2351_AP_512.FLM))</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>netData</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>1</periodic>
<aLwin>1</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>1</viewmode>
<vrSel>0</vrSel>
<aSym>0</aSym>
<aTbox>0</aTbox>
<AscS1>0</AscS1>
<AscS2>0</AscS2>
<AscS3>0</AscS3>
<aSer3>0</aSer3>
<eProf>0</eProf>
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
<aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
<uProt>0</uProt>
</DebugFlag>
<LintExecutable></LintExecutable>
<LintConfigFile></LintConfigFile>
<bLintAuto>0</bLintAuto>
<bAutoGenD>0</bAutoGenD>
<LntExFlags>0</LntExFlags>
<pMisraName></pMisraName>
<pszMrule></pszMrule>
<pSingCmds></pSingCmds>
<pMultCmds></pMultCmds>
<pMisraNamep></pMisraNamep>
<pszMrulep></pszMrulep>
<pSingCmdsp></pSingCmdsp>
<pMultCmdsp></pMultCmdsp>
<SystemViewers>
<Entry>
<Name>System Viewer\AES</Name>
<WinId>35905</WinId>
</Entry>
<Entry>
<Name>System Viewer\CRYPTO</Name>
<WinId>35904</WinId>
</Entry>
</SystemViewers>
</TargetOption>
</Target>
<Group>
<GroupName>CMSIS</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\Device\Nuvoton\M2351\Source\system_M2351.c</PathWithFileName>
<FilenameWithoutPath>system_M2351.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\Device\Nuvoton\M2351\Source\ARM\startup_M2351.s</PathWithFileName>
<FilenameWithoutPath>startup_M2351.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Library</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\clk.c</PathWithFileName>
<FilenameWithoutPath>clk.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\crypto.c</PathWithFileName>
<FilenameWithoutPath>crypto.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\fmc.c</PathWithFileName>
<FilenameWithoutPath>fmc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\gpio.c</PathWithFileName>
<FilenameWithoutPath>gpio.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\i2c.c</PathWithFileName>
<FilenameWithoutPath>i2c.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\retarget.c</PathWithFileName>
<FilenameWithoutPath>retarget.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\spi.c</PathWithFileName>
<FilenameWithoutPath>spi.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\sys.c</PathWithFileName>
<FilenameWithoutPath>sys.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\Library\StdDriver\src\uart.c</PathWithFileName>
<FilenameWithoutPath>uart.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Include</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\nsc.h</PathWithFileName>
<FilenameWithoutPath>nsc.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\MAX30102\MAX30102.h</PathWithFileName>
<FilenameWithoutPath>MAX30102.h</FilenameWithoutPath>
<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>.\Crypto\M2351_crypto.h</PathWithFileName>
<FilenameWithoutPath>M2351_crypto.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>MAX30102</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\MAX30102\MAX30102.c</PathWithFileName>
<FilenameWithoutPath>MAX30102.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Crypto</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\Crypto\M2351_crypto.c</PathWithFileName>
<FilenameWithoutPath>M2351_crypto.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>User</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\nsc.c</PathWithFileName>
<FilenameWithoutPath>nsc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>18</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\partition_M2351.h</PathWithFileName>
<FilenameWithoutPath>partition_M2351.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>19</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\mbedTLS_config.h</PathWithFileName>
<FilenameWithoutPath>mbedTLS_config.h</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>.\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
</ProjectOpt>
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
<SchemaVersion>2.1</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Targets>
<Target>
<TargetName>Secure</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6150000::V6.15::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>M2351KIAAE</Device>
<Vendor>Nuvoton</Vendor>
<PackID>Nuvoton.NuMicro_DFP.1.3.10</PackID>
<PackURL>http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack</PackURL>
<Cpu>IRAM(0x20000000,0x8000) IRAM2(0x30008000,0x10000) IROM(0x00000000,0x40000) IROM2(0x10040000,0x40000) CPUTYPE("Cortex-M23") TZ CLOCK(12000000) ESEL ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1200 -FN1 -FF0M2351_AP_512 -FS00 -FL080000 -FP0($$Device:M2351KIAAE$Flash\M2351_AP_512.FLM))</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:M2351KIAAE$Device\M2351\Include\M2351.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>$$Device:M2351KIAAE$SVD\Nuvoton\M2351_v1.svd</SFDFile>
<bCustSvd>0</bCustSvd>
<UseEnv>0</UseEnv>
<BinPath></BinPath>
<IncludePath></IncludePath>
<LibPath></LibPath>
<RegisterFilePath></RegisterFilePath>
<DBRegisterFilePath></DBRegisterFilePath>
<TargetStatus>
<Error>0</Error>
<ExitCodeStop>0</ExitCodeStop>
<ButtonStop>0</ButtonStop>
<NotGenerated>0</NotGenerated>
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Objects\</OutputDirectory>
<OutputName>Secure</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\Listings\</ListingPath>
<HexFormatSelection>1</HexFormatSelection>
<Merge32K>0</Merge32K>
<CreateBatchFile>0</CreateBatchFile>
<BeforeCompile>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopU1X>0</nStopU1X>
<nStopU2X>0</nStopU2X>
</BeforeCompile>
<BeforeMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopB1X>0</nStopB1X>
<nStopB2X>0</nStopB2X>
</BeforeMake>
<AfterMake>
<RunUserProg1>0</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name></UserProg1Name>
<UserProg2Name></UserProg2Name>
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
<nStopA1X>0</nStopA1X>
<nStopA2X>0</nStopA2X>
</AfterMake>
<SelectedForBatchBuild>0</SelectedForBatchBuild>
<SVCSIdString></SVCSIdString>
</TargetCommonOption>
<CommonProperty>
<UseCPPCompiler>0</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>0</AlwaysBuild>
<GenerateAssemblyFile>0</GenerateAssemblyFile>
<AssembleAssemblyFile>0</AssembleAssemblyFile>
<PublicsOnly>0</PublicsOnly>
<StopOnExitCode>3</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName></SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDll></SimDlgDll>
<SimDlgDllArguments></SimDlgDllArguments>
<TargetDllName>SARMV8M.DLL</TargetDllName>
<TargetDllArguments> -MPU</TargetDllArguments>
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM23</TargetDlgDllArguments>
</DllOption>
<DebugOption>
<OPTHX>
<HexSelection>1</HexSelection>
<HexRangeLowAddress>0</HexRangeLowAddress>
<HexRangeHighAddress>0</HexRangeHighAddress>
<HexOffset>0</HexOffset>
<Oh166RecLen>16</Oh166RecLen>
</OPTHX>
</DebugOption>
<Utilities>
<Flash1>
<UseTargetDll>1</UseTargetDll>
<UseExternalTool>0</UseExternalTool>
<RunIndependent>0</RunIndependent>
<UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
<Capability>1</Capability>
<DriverSelection>4102</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2V8M.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp>User</pFcarmGrp>
<pFcArmRoot></pFcArmRoot>
<FcArmLst>0</FcArmLst>
</Utilities>
<TargetArmAds>
<ArmAdsMisc>
<GenerateListings>0</GenerateListings>
<asHll>1</asHll>
<asAsm>1</asAsm>
<asMacX>1</asMacX>
<asSyms>1</asSyms>
<asFals>1</asFals>
<asDbgD>1</asDbgD>
<asForm>1</asForm>
<ldLst>0</ldLst>
<ldmm>1</ldmm>
<ldXref>1</ldXref>
<BigEnd>0</BigEnd>
<AdsALst>1</AdsALst>
<AdsACrf>1</AdsACrf>
<AdsANop>0</AdsANop>
<AdsANot>0</AdsANot>
<AdsLLst>1</AdsLLst>
<AdsLmap>1</AdsLmap>
<AdsLcgr>1</AdsLcgr>
<AdsLsym>1</AdsLsym>
<AdsLszi>1</AdsLszi>
<AdsLtoi>1</AdsLtoi>
<AdsLsun>1</AdsLsun>
<AdsLven>1</AdsLven>
<AdsLsxf>1</AdsLsxf>
<RvctClst>1</RvctClst>
<GenPPlst>1</GenPPlst>
<AdsCpuType>"Cortex-M23"</AdsCpuType>
<RvctDeviceName></RvctDeviceName>
<mOS>0</mOS>
<uocRom>0</uocRom>
<uocRam>0</uocRam>
<hadIROM>1</hadIROM>
<hadIRAM>1</hadIRAM>
<hadXRAM>0</hadXRAM>
<uocXRam>0</uocXRam>
<RvdsVP>0</RvdsVP>
<RvdsMve>0</RvdsMve>
<RvdsCdeCp>0</RvdsCdeCp>
<hadIRAM2>1</hadIRAM2>
<hadIROM2>1</hadIROM2>
<StupSel>8</StupSel>
<useUlib>1</useUlib>
<EndSel>1</EndSel>
<uLtcg>0</uLtcg>
<nSecure>1</nSecure>
<RoSelD>3</RoSelD>
<RwSelD>4</RwSelD>
<CodeSel>0</CodeSel>
<OptFeed>0</OptFeed>
<NoZi1>0</NoZi1>
<NoZi2>0</NoZi2>
<NoZi3>0</NoZi3>
<NoZi4>0</NoZi4>
<NoZi5>0</NoZi5>
<Ro1Chk>0</Ro1Chk>
<Ro2Chk>0</Ro2Chk>
<Ro3Chk>0</Ro3Chk>
<Ir1Chk>1</Ir1Chk>
<Ir2Chk>0</Ir2Chk>
<Ra1Chk>0</Ra1Chk>
<Ra2Chk>0</Ra2Chk>
<Ra3Chk>0</Ra3Chk>
<Im1Chk>1</Im1Chk>
<Im2Chk>0</Im2Chk>
<OnChipMemories>
<Ocm1>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm1>
<Ocm2>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm2>
<Ocm3>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm3>
<Ocm4>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm4>
<Ocm5>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm5>
<Ocm6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</Ocm6>
<IRAM>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x8000</Size>
</IRAM>
<IROM>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x40000</Size>
</IROM>
<XRAM>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</XRAM>
<OCR_RVCT1>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT1>
<OCR_RVCT2>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT2>
<OCR_RVCT3>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT3>
<OCR_RVCT4>
<Type>1</Type>
<StartAddress>0x0</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x10040000</StartAddress>
<Size>0x40000</Size>
</OCR_RVCT5>
<OCR_RVCT6>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT6>
<OCR_RVCT7>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT7>
<OCR_RVCT8>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT8>
<OCR_RVCT9>
<Type>0</Type>
<StartAddress>0x20000000</StartAddress>
<Size>0x8000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x30008000</StartAddress>
<Size>0x10000</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>2</Optim>
<oTime>0</oTime>
<SplitLS>0</SplitLS>
<OneElfS>1</OneElfS>
<Strict>0</Strict>
<EnumInt>0</EnumInt>
<PlainCh>0</PlainCh>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<wLevel>0</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<uGnu>0</uGnu>
<useXO>0</useXO>
<v6Lang>5</v6Lang>
<v6LangP>3</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define>DEBUG_PORT = UART0_NS</Define>
<Undefine></Undefine>
<IncludePath>..\Secure;.\Crypto;.\MAX30102;..\..\..\Library\CMSIS\Include;..\..\..\Library\Device\Nuvoton\M2351\Include;..\..\..\Library\StdDriver\inc;..\..\..\ThirdParty\mbedTLS\include;..\..\..\ThirdParty\mbedTLS\include\mbedtls</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>1</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>1</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<ClangAsOpt>1</ClangAsOpt>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>0</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange></TextAddressRange>
<DataAddressRange></DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>.\Objects\Secure.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc>--import-cmse-lib-out .\lib\nsclib.o</Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>CMSIS</GroupName>
<Files>
<File>
<FileName>system_M2351.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\Device\Nuvoton\M2351\Source\system_M2351.c</FilePath>
</File>
<File>
<FileName>startup_M2351.s</FileName>
<FileType>2</FileType>
<FilePath>..\..\..\Library\Device\Nuvoton\M2351\Source\ARM\startup_M2351.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Library</GroupName>
<Files>
<File>
<FileName>clk.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\clk.c</FilePath>
</File>
<File>
<FileName>crypto.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\crypto.c</FilePath>
</File>
<File>
<FileName>fmc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\fmc.c</FilePath>
</File>
<File>
<FileName>gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\gpio.c</FilePath>
</File>
<File>
<FileName>i2c.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\i2c.c</FilePath>
</File>
<File>
<FileName>retarget.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\retarget.c</FilePath>
</File>
<File>
<FileName>spi.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\spi.c</FilePath>
</File>
<File>
<FileName>sys.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\sys.c</FilePath>
</File>
<File>
<FileName>uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\Library\StdDriver\src\uart.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Include</GroupName>
<Files>
<File>
<FileName>nsc.h</FileName>
<FileType>5</FileType>
<FilePath>.\nsc.h</FilePath>
</File>
<File>
<FileName>MAX30102.h</FileName>
<FileType>5</FileType>
<FilePath>.\MAX30102\MAX30102.h</FilePath>
</File>
<File>
<FileName>M2351_crypto.h</FileName>
<FileType>5</FileType>
<FilePath>.\Crypto\M2351_crypto.h</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>MAX30102</GroupName>
<Files>
<File>
<FileName>MAX30102.c</FileName>
<FileType>1</FileType>
<FilePath>.\MAX30102\MAX30102.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Crypto</GroupName>
<Files>
<File>
<FileName>M2351_crypto.c</FileName>
<FileType>1</FileType>
<FilePath>.\Crypto\M2351_crypto.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>User</GroupName>
<Files>
<File>
<FileName>nsc.c</FileName>
<FileType>1</FileType>
<FilePath>.\nsc.c</FilePath>
</File>
<File>
<FileName>partition_M2351.h</FileName>
<FileType>5</FileType>
<FilePath>.\partition_M2351.h</FilePath>
</File>
<File>
<FileName>mbedTLS_config.h</FileName>
<FileType>5</FileType>
<FilePath>.\mbedTLS_config.h</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>.\main.c</FilePath>
</File>
</Files>
</Group>
</Groups>
</Target>
</Targets>
<RTE>
<apis/>
<components/>
<files>
<file attr="config" category="source" name="CMSIS\RTOS2\RTX\Config\RTX_Config.c" version="5.1.0">
<instance index="0" removed="1">RTE\CMSIS\RTX_Config.c</instance>
<component Capiversion="2.1.3" Cclass="CMSIS" Cgroup="RTOS2" Csub="Keil RTX5" Cvariant="Library" Cvendor="ARM" Cversion="5.5.2" condition="RTOS2 RTX5"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="CMSIS\RTOS2\RTX\Config\RTX_Config.h" version="5.5.1">
<instance index="0" removed="1">RTE\CMSIS\RTX_Config.h</instance>
<component Capiversion="2.1.3" Cclass="CMSIS" Cgroup="RTOS2" Csub="Keil RTX5" Cvariant="Library" Cvendor="ARM" Cversion="5.5.2" condition="RTOS2 RTX5"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="WiFi\ESP8266\Config\WiFi_ESP8266_Config.h" version="1.0.0">
<instance index="0" removed="1">RTE\CMSIS_Driver\WiFi_ESP8266_Config.h</instance>
<component Capiversion="1.1.0" Cclass="CMSIS Driver" Cgroup="WiFi" Csub="ESP8266" Cvariant="UART" Cvendor="Keil" Cversion="1.4.0" condition="CMSIS Core with RTOS2 and USART Driver"/>
<package name="CMSIS-Driver" schemaVersion="1.4.9" url="http://www.keil.com/pack/" vendor="ARM" version="2.6.1"/>
<targetInfos/>
</file>
<file attr="config" category="sourceC" name="Device\M2351\StdDriver\src\retarget.c" version="0.00.001">
<instance index="0" removed="1">RTE\Device\M2351KIAAE\retarget.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Nuvoton" Cversion="0.00.001" condition="M23NuMicro M2351 Device"/>
<package name="NuMicro_DFP" schemaVersion="1.2" url="http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack" vendor="Nuvoton" version="1.3.10"/>
<targetInfos/>
</file>
<file attr="config" category="sourceAsm" condition="Compiler ARM" name="Device\M2351\Source\ARM\startup_M2351.s" version="0.00.001">
<instance index="0" removed="1">RTE\Device\M2351KIAAE\startup_M2351.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Nuvoton" Cversion="0.00.001" condition="M23NuMicro M2351 Device"/>
<package name="NuMicro_DFP" schemaVersion="1.2" url="http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack" vendor="Nuvoton" version="1.3.10"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Device\M2351\Source\system_M2351.c" version="0.00.001">
<instance index="0" removed="1">RTE\Device\M2351KIAAE\system_M2351.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="Nuvoton" Cversion="0.00.001" condition="M23NuMicro M2351 Device"/>
<package name="NuMicro_DFP" schemaVersion="1.2" url="http://www.nuvoton.com/hq/enu/Documents/KEILSoftwarePack" vendor="Nuvoton" version="1.3.10"/>
<targetInfos/>
</file>
<file attr="config" category="source" name="Network\Config\Net_Config.c" version="7.1.0">
<instance index="0" removed="1">RTE\Network\Net_Config.c</instance>
<component Cbundle="MDK-Plus" Cclass="Network" Cgroup="CORE" Cvariant="IPv4 Release" Cvendor="Keil" Cversion="7.14.0" condition="CMSIS Core with RTOS" isDefaultVariant="1"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.12.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="Network\Config\Net_Config_TCP.h" version="7.1.1">
<instance index="0" removed="1">RTE\Network\Net_Config_TCP.h</instance>
<component Cbundle="MDK-Plus" Cclass="Network" Cgroup="Socket" Csub="TCP" Cvendor="Keil" Cversion="7.14.0" condition="Network Interface"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.12.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="Network\Config\Net_Config_WiFi.h" version="7.1.0">
<instance index="0" removed="1">RTE\Network\Net_Config_WiFi_0.h</instance>
<component Cbundle="MDK-Plus" Cclass="Network" Cgroup="Interface" Csub="WiFi" Cvendor="Keil" Cversion="7.14.0" condition="Network Driver WiFi" maxInstances="2"/>
<package name="MDK-Middleware" schemaVersion="1.4" url="http://www.keil.com/pack/" vendor="Keil" version="7.12.0"/>
<targetInfos/>
</file>
<file attr="config" category="header" name="configs\mbedTLS_config.h" version="2.24.0">
<instance index="0" removed="1">RTE\Security\mbedTLS_config.h</instance>
<component Cclass="Security" Cgroup="mbed TLS" Cvendor="ARM" Cversion="2.24.0"/>
<package name="mbedTLS" schemaVersion="1.6.3" url="http://www.keil.com/pack/" vendor="ARM" version="1.7.0"/>
<targetInfos/>
</file>
</files>
</RTE>
<LayerInfo>
<Layers>
<Layer>
<LayName>Secure</LayName>
<LayPrjMark>1</LayPrjMark>
</Layer>
</Layers>
</LayerInfo>
</Project>
/**********************************************************
*
* @file : main.c
* @author : HaewonSeo
*
* @note : Main of secure world
**********************************************************/
#include <arm_cmse.h>
#include <stdio.h>
#include <stdint.h>
#include "NuMicro.h"
#include "partition_M2351.h"
#include "nsc.h"
#include "MAX30102.h"
#include "M2351_crypto.h"
//extern int ssl_client1(void);
#define DEBUG_PORT UART0_NS
#define WIFI_PORT UART3_NS // Used to connect to WIFI module
#define NEXT_BOOT_BASE 0x10040000
#define JUMP_HERE 0xe7fee7ff /* Instruction Code of "B ." */
/* typedef for NonSecure callback functions */
typedef __NONSECURE_CALL void (*NonSecure_funcptr)(uint32_t);
typedef int32_t (*Secure_funcptr)(uint32_t);
volatile uint32_t millis_counter;
/*----------------------------------------------------------------------------
SysTick IRQ Handler
*----------------------------------------------------------------------------*/
void SysTick_Handler(void)
{
static uint32_t u32Ticks;
millis_counter++;
switch(u32Ticks++)
{
case 0:
break;
case 100:
break;
case 200:
break;
case 300:
break;
case 400:
break;
case 500:
break;
case 600:
u32Ticks = 0;
break;
default:
if(u32Ticks > 600)
{
u32Ticks = 0;
}
}
}
/*---------------------------------------------------------------------------*/
/* Functions */
/*---------------------------------------------------------------------------*/
void SYS_Init(void)
{
/* Set PF multi-function pins for XT1_OUT(PF.2) and XT1_IN(PF.3) */
SYS->GPF_MFPL = (SYS->GPF_MFPL & (~SYS_GPF_MFPL_PF2MFP_Msk)) | SYS_GPF_MFPL_PF2MFP_XT1_OUT;
SYS->GPF_MFPL = (SYS->GPF_MFPL & (~SYS_GPF_MFPL_PF3MFP_Msk)) | SYS_GPF_MFPL_PF3MFP_XT1_IN;
/*---------------------------------------------------------------------------------------------------------*/
/* Init System Clock */
/*---------------------------------------------------------------------------------------------------------*/
/* Enable HIRC clock */
CLK_EnableXtalRC(CLK_PWRCTL_HIRCEN_Msk);
/* Wait for HIRC clock ready */
CLK_WaitClockReady(CLK_STATUS_HIRCSTB_Msk);
/* Select HCLK clock source as HIRC and HCLK source divider as 1 */
CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_HIRC, CLK_CLKDIV0_HCLK(1));
/* Enable HXT clock */
CLK_EnableXtalRC(CLK_PWRCTL_HXTEN_Msk);
/* Wait for HXT clock ready */
CLK_WaitClockReady(CLK_STATUS_HXTSTB_Msk);
/* Enable PLL */
CLK->PLLCTL = CLK_PLLCTL_128MHz_HIRC;
/* Waiting for PLL stable */
CLK_WaitClockReady(CLK_STATUS_PLLSTB_Msk);
/* Select HCLK clock source as PLL and HCLK source divider as 1 */
CLK_SetHCLK(CLK_CLKSEL0_HCLKSEL_PLL, CLK_CLKDIV0_HCLK(1));
/* Select UART clock source */
//CLK->CLKSEL1 = (CLK->CLKSEL1 & (~CLK_CLKSEL1_UART0SEL_Msk)) | CLK_CLKSEL1_UART0SEL_HIRC;
//CLK->CLKSEL3 = (CLK->CLKSEL3 & (~CLK_CLKSEL3_UART3SEL_Msk)) | CLK_CLKSEL3_UART3SEL_HIRC;
CLK->PWRCTL |= CLK_PWRCTL_HIRC48EN_Msk;
while((CLK->STATUS & CLK_STATUS_HIRC48STB_Msk) == 0);
CLK->CLKSEL0 = CLK_CLKSEL0_HCLKSEL_HIRC48;
/* Select IP clock source */
CLK->CLKSEL1 = CLK_CLKSEL1_UART0SEL_HIRC | CLK_CLKSEL1_UART1SEL_HIRC;
CLK->CLKSEL3 = CLK_CLKSEL3_UART2SEL_HIRC | CLK_CLKSEL3_UART3SEL_HIRC | CLK_CLKSEL3_UART5SEL_HIRC;
/* Enable Crypto Accelerator */
CLK->AHBCLK |= CLK_AHBCLK_CRPTCKEN_Msk;
/* Enable IP clock */
CLK->APBCLK0 |= CLK_APBCLK0_UART0CKEN_Msk | CLK_APBCLK0_TMR0CKEN_Msk | CLK_APBCLK0_UART1CKEN_Msk |
CLK_APBCLK0_UART2CKEN_Msk | CLK_APBCLK0_UART3CKEN_Msk | CLK_APBCLK0_UART5CKEN_Msk;
/* Enable UART module clock */
//CLK_EnableModuleClock(UART0_MODULE);
/* Select UART module clock source as HXT `and UART module clock divider as 1 */
//CLK_SetModuleClock(UART0_MODULE, CLK_CLKSEL1_UART0SEL_HXT, CLK_CLKDIV0_UART0(1));
/* Select HIRC as the clock source of SPI0 */
CLK_SetModuleClock(SPI1_MODULE, CLK_CLKSEL2_SPI1SEL_PCLK0, MODULE_NoMsk);
//CLK_SetModuleClock(SDH0_MODULE, CLK_CLKSEL2_SPI0SEL_HIRC, MODULE_NoMsk);
/* Enable I2C0 peripheral clock */
CLK_EnableModuleClock(I2C0_MODULE);
/* Enable I2C1 peripheral clock */
//CLK_EnableModuleClock(I2C1_MODULE);
/* Enable SPI0 peripheral clock */
CLK_EnableModuleClock(SPI1_MODULE);
//CLK_EnableModuleClock(SDH0_MODULE);
/* Update System Core Clock */
/* User can use SystemCoreClockUpdate() to calculate PllClock, SystemCoreClock and CycylesPerUs automatically. */
//SystemCoreClockUpdate();
PllClock = 128000000; // PLL
SystemCoreClock = 64000000 / 1; // HCLK
CyclesPerUs = 64000000 / 1000000; // For SYS_SysTickDelay()
/*---------------------------------------------------------------------------------------------------------*/
/* Init I/O Multi-function */
/*---------------------------------------------------------------------------------------------------------*/
/* Set multi-function pins for UART0 RXD and TXD */
SYS->GPB_MFPH = (SYS->GPB_MFPH & (~(UART0_RXD_PB12_Msk | UART0_TXD_PB13_Msk))) | UART0_RXD_PB12 | UART0_TXD_PB13;
/* Set PA multi-function pins for I2C0 SDA and SCL */
/* PA.4(56):SDA, PA.5(55):SCL*/
SYS->GPA_MFPL &= ~(SYS_GPA_MFPL_PA4MFP_Msk | SYS_GPA_MFPL_PA5MFP_Msk);
SYS->GPA_MFPL |= (SYS_GPA_MFPL_PA4MFP_I2C0_SDA | SYS_GPA_MFPL_PA5MFP_I2C0_SCL);
/* Set PA multi-function pins for I2C1 SDA and SCL */
/* PA.2(58):SDA, PA.3(57):SCL*/
//SYS->GPA_MFPL &= ~(SYS_GPA_MFPL_PA2MFP_Msk | SYS_GPA_MFPL_PA3MFP_Msk);
//SYS->GPA_MFPL |= (SYS_GPA_MFPL_PA2MFP_I2C1_SDA | SYS_GPA_MFPL_PA3MFP_I2C1_SCL);
/* Setup SPI0 multi-function pins */
/* Reference the Arduino UNO compatible interface */
//SYS->GPF_MFPL &= ~(SYS_GPF_MFPL_PF6MFP_Msk | SYS_GPF_MFPL_PF7MFP_Msk | SYS_GPF_MFPH_PF8MFP_Msk | SYS_GPF_MFPH_PF9MFP_Msk);
//SYS->GPF_MFPL |= (SYS_GPF_MFPL_PF6MFP_SPI0_MOSI | SYS_GPF_MFPL_PF7MFP_SPI0_MISO | SYS_GPF_MFPH_PF8MFP_SPI0_CLK | SYS_GPF_MFPH_PF9MFP_SPI0_SS);
/* Setup SPI0 multi-function pins */
//SYS->GPD_MFPL &= ~(SYS_GPD_MFPL_PD0MFP_Msk | SYS_GPD_MFPL_PD2MFP_Msk | SYS_GPD_MFPL_PD3MFP_Msk);
//SYS->GPD_MFPL |= (SYS_GPD_MFPL_PD0MFP_SPI0_MOSI | SYS_GPD_MFPL_PD2MFP_SPI0_CLK | SYS_GPD_MFPL_PD3MFP_SPI0_SS);
/* Setup SPI0 multi-function pins */
//SYS->GPA_MFPL &= ~(SYS_GPA_MFPL_PA0MFP_Msk | SYS_GPA_MFPL_PA2MFP_Msk | SYS_GPA_MFPL_PA3MFP_Msk);
//SYS->GPA_MFPL |= (SYS_GPA_MFPL_PA0MFP_SPI0_MOSI | SYS_GPA_MFPL_PA2MFP_SPI0_CLK | SYS_GPA_MFPL_PA3MFP_SPI0_SS);
/* Setup SPI1 multi-function pins */
SYS->GPH_MFPH &= ~(SYS_GPH_MFPH_PH8MFP_Msk | SYS_GPH_MFPH_PH9MFP_Msk);
SYS->GPH_MFPH |= (SYS_GPH_MFPH_PH8MFP_SPI1_CLK | SYS_GPH_MFPH_PH9MFP_SPI1_SS);
SYS->GPE_MFPL &= ~(SYS_GPE_MFPL_PE0MFP_Msk);
SYS->GPE_MFPL |= (SYS_GPE_MFPL_PE0MFP_SPI1_MOSI);
}
/*---------------------------------------------------------------------------------------------------------*/
/* Init UART0_NS :115200, 8-bit word, no parity bit, 1 stop bit. */
/*---------------------------------------------------------------------------------------------------------*/
void DEBUG_PORT_Init()
{
DEBUG_PORT->LINE = UART_PARITY_NONE | UART_STOP_BIT_1 | UART_WORD_LEN_8;
DEBUG_PORT->BAUD = UART_BAUD_MODE2 | UART_BAUD_MODE2_DIVIDER(__HIRC, 115200);
}
/*---------------------------------------------------------------------------------------------------------*/
/* Init UART3_NS :115200, 8-bit word, no parity bit, 1 stop bit. */
/*---------------------------------------------------------------------------------------------------------*/
void WIFI_PORT_Init()
{
CLK->APBCLK0 |= CLK_APBCLK0_UART4CKEN_Msk;
CLK->CLKSEL3 = (CLK->CLKSEL3 & (~CLK_CLKSEL3_UART3SEL_Msk)) | CLK_CLKSEL3_UART3SEL_HIRC;
WIFI_PORT->LINE = UART_PARITY_NONE | UART_STOP_BIT_1 | UART_WORD_LEN_8;
WIFI_PORT->BAUD = UART_BAUD_MODE2 | UART_BAUD_MODE2_DIVIDER(__HIRC, 115200);
/* Set multi-function pins for RXD and TXD */
//SYS->GPC_MFPL = (SYS->GPC_MFPL & (~(UART4_RXD_PC6_Msk | UART4_TXD_PC7_Msk))) | UART4_RXD_PC6 | UART4_TXD_PC7;
SYS->GPD_MFPL = (SYS->GPD_MFPL & (~(UART3_RXD_PD0_Msk | UART3_TXD_PD1_Msk))) | UART3_RXD_PD0 | UART3_TXD_PD1;
}
/*---------------------------------------------------------------------------------------------------------*/
/* Init I2C0 */
/*---------------------------------------------------------------------------------------------------------*/
void I2C0_Init(void)
{
/* Open I2C0 module and set bus clock */
I2C_Open(I2C0, 400000);
/* Get I2C0 Bus Clock */
//printf("I2C0 clock %d Hz\n", I2C_GetBusClockFreq(I2C0));
/* Set I2C0 Slave Addresses */
I2C_SetSlaveAddr(I2C0, 0, MAX30102_ADDR, 0); /* MAX30102 Slave Address : 0x57 */
}
/*---------------------------------------------------------------------------------------------------------*/
/* Init SPI */
/*---------------------------------------------------------------------------------------------------------*/
/* Configure as a master, clock idle low, 32-bit transaction, drive output on falling clock edge and latch input on rising edge. */
void SPI_Init(void)
{
/* Set IP clock divider. SPI clock rate = 2MHz */
SPI_Open(SPI1_NS, SPI_MASTER, SPI_MODE_0, 32, 2000000);
/* Enable the automatic hardware slave select function. Select the SS pin and configure as low-active. */
SPI_EnableAutoSS(SPI1_NS, SPI_SS, SPI_SS_ACTIVE_LOW);
SPI_SET_DATA_WIDTH(SPI1_NS, 8);
}
void Nonsecure_Init(void)
{
NonSecure_funcptr fp;
/* SCB_NS.VTOR points to the Non-secure vector table base address. */
SCB_NS->VTOR = NEXT_BOOT_BASE;
/* 1st Entry in the vector table is the Non-secure Main Stack Pointer. */
__TZ_set_MSP_NS(*((uint32_t *)SCB_NS->VTOR)); /* Set up MSP in Non-secure code */
/* 2nd entry contains the address of the Reset_Handler (CMSIS-CORE) function */
fp = ((NonSecure_funcptr)(*(((uint32_t *)SCB_NS->VTOR) + 1)));
/* Clear the LSB of the function address to indicate the function-call
will cause a state switch from Secure to Non-secure */
fp = cmse_nsfptr_create(fp);
/* Check if the Reset_Handler address is in Non-secure space */
if(cmse_is_nsfptr(fp) && (((uint32_t)fp & 0xf0000000) == 0x10000000))
{
printf("\nExecute Non-secure code ...\n");
fp(0); /* Non-secure function call */
}
else
{
/* Something went wrong */
printf("No code in non-secure region!\n");
printf("CPU will halted at non-secure state\n");
/* Set nonsecure MSP in nonsecure region */
__TZ_set_MSP_NS(NON_SECURE_SRAM_BASE + 512);
/* Try to halted in non-secure state (SRAM) */
M32(NON_SECURE_SRAM_BASE) = JUMP_HERE;
fp = (NonSecure_funcptr)(NON_SECURE_SRAM_BASE + 1);
fp(0);
while(1);
}
}
/*---------------------------------------------------------------------------------------------------------*/
/* Main Function */
/*---------------------------------------------------------------------------------------------------------*/
int32_t main(void)
{
/* Unlock protected registers */
SYS_UnlockReg();
/* Init System, IP clock and multi-function I/O. */
SYS_Init();
/* Lock protected registers */
SYS_LockReg();
/* Call secure API to get system core clock */
//SystemCoreClock = GetSystemCoreClock();
/* Generate Systick interrupt each 1 ms */
SysTick_Config(SystemCoreClock / 1000);
/* Inin UART and I2C0 */
DEBUG_PORT_Init();
WIFI_PORT_Init();
I2C0_Init();
SPI_Init();
printf("+---------------------------------------------+\n");
printf("| Secure is running ... |\n");
printf("+---------------------------------------------+\n");
/* Config MAX30102 */
MAX30102_Config();
Nonsecure_Init();
do
{
//OLED_HeartRate(0, hr++);
//CLK_SysTickLongDelay(2000000);
__WFI();
}
while(1);
}
/*
* Configuration template
*
* Copyright (C) 2006-2021, Arm Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* This set of compile-time options may be used to enable
* or disable features selectively, and reduce the global
* memory footprint.
*/
#ifndef MBEDTLS_CONFIG_H
#define MBEDTLS_CONFIG_H
/* System support */
//#define MBEDTLS_HAVE_ASM
//#define MBEDTLS_HAVE_TIME
//#define MBEDTLS_HAVE_TIME_DATE
//#define MBEDTLS_PLATFORM_MEMORY
//#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS
//#define MBEDTLS_CHECK_PARAMS
/* mbed TLS feature support */
#define MBEDTLS_ENTROPY_HARDWARE_ALT
#define MBEDTLS_AES_ROM_TABLES
//#define MBEDTLS_AES_FEWER_TABLES
//#define MBEDTLS_CAMELLIA_SMALL_MEMORY
#define MBEDTLS_CIPHER_MODE_CBC
#define MBEDTLS_CIPHER_MODE_CFB
#define MBEDTLS_CIPHER_MODE_CTR
//#define MBEDTLS_CIPHER_MODE_OFB
//#define MBEDTLS_CIPHER_MODE_XTS
#define MBEDTLS_CIPHER_PADDING_PKCS7
#define MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS
#define MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN
#define MBEDTLS_CIPHER_PADDING_ZEROS
#define MBEDTLS_REMOVE_ARC4_CIPHERSUITES
#define MBEDTLS_REMOVE_3DES_CIPHERSUITES
#define MBEDTLS_ECP_DP_SECP192R1_ENABLED
#define MBEDTLS_ECP_DP_SECP224R1_ENABLED
#define MBEDTLS_ECP_DP_SECP256R1_ENABLED
#define MBEDTLS_ECP_DP_SECP384R1_ENABLED
#define MBEDTLS_ECP_DP_SECP521R1_ENABLED
#define MBEDTLS_ECP_DP_SECP192K1_ENABLED
#define MBEDTLS_ECP_DP_SECP224K1_ENABLED
#define MBEDTLS_ECP_DP_SECP256K1_ENABLED
#define MBEDTLS_ECP_DP_BP256R1_ENABLED
#define MBEDTLS_ECP_DP_BP384R1_ENABLED
#define MBEDTLS_ECP_DP_BP512R1_ENABLED
#define MBEDTLS_ECP_DP_CURVE25519_ENABLED
#define MBEDTLS_ECP_DP_CURVE448_ENABLED
#define MBEDTLS_ECP_NIST_OPTIM
//#define MBEDTLS_ECP_RESTARTABLE
#define MBEDTLS_ECDSA_DETERMINISTIC
#define MBEDTLS_KEY_EXCHANGE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
#define MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED
#define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
//#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
#define MBEDTLS_PK_PARSE_EC_EXTENDED
#define MBEDTLS_ERROR_STRERROR_DUMMY
#define MBEDTLS_GENPRIME
//#define MBEDTLS_FS_IO
//#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
#define MBEDTLS_NO_PLATFORM_ENTROPY
//#define MBEDTLS_ENTROPY_FORCE_SHA256
//#define MBEDTLS_ENTROPY_NV_SEED
//#define MBEDTLS_MEMORY_DEBUG
//#define MBEDTLS_MEMORY_BACKTRACE
#define MBEDTLS_PK_RSA_ALT_SUPPORT
#define MBEDTLS_PKCS1_V15
#define MBEDTLS_PKCS1_V21
//#define MBEDTLS_PSA_CRYPTO_SPM
//#define MBEDTLS_RSA_NO_CRT
#define MBEDTLS_SELF_TEST
//#define MBEDTLS_SHA256_SMALLER
//#define MBEDTLS_SHA512_SMALLER
//#define MBEDTLS_SHA512_NO_SHA384
#define MBEDTLS_SSL_ALL_ALERT_MESSAGES
//#define MBEDTLS_SSL_RECORD_CHECKING
//#define MBEDTLS_SSL_DTLS_CONNECTION_ID
//#define MBEDTLS_SSL_ASYNC_PRIVATE
//#define MBEDTLS_SSL_CONTEXT_SERIALIZATION
//#define MBEDTLS_SSL_DEBUG_ALL
#define MBEDTLS_SSL_ENCRYPT_THEN_MAC
#define MBEDTLS_SSL_EXTENDED_MASTER_SECRET
#define MBEDTLS_SSL_FALLBACK_SCSV
//#define MBEDTLS_SSL_KEEP_PEER_CERTIFICATE
//#define MBEDTLS_SSL_HW_RECORD_ACCEL
#define MBEDTLS_SSL_CBC_RECORD_SPLITTING
#define MBEDTLS_SSL_RENEGOTIATION
//#define MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
//#define MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE
#define MBEDTLS_SSL_MAX_FRAGMENT_LENGTH
#define MBEDTLS_SSL_PROTO_SSL3
#define MBEDTLS_SSL_PROTO_TLS1
#define MBEDTLS_SSL_PROTO_TLS1_1
#define MBEDTLS_SSL_PROTO_TLS1_2
#define MBEDTLS_SSL_PROTO_DTLS
#define MBEDTLS_SSL_ALPN
#define MBEDTLS_SSL_DTLS_ANTI_REPLAY
#define MBEDTLS_SSL_DTLS_HELLO_VERIFY
#define MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE
#define MBEDTLS_SSL_DTLS_BADMAC_LIMIT
#define MBEDTLS_SSL_SESSION_TICKETS
//#define MBEDTLS_SSL_EXPORT_KEYS
#define MBEDTLS_SSL_SERVER_NAME_INDICATION
#define MBEDTLS_SSL_TRUNCATED_HMAC
//#define MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH
//#define MBEDTLS_USE_PSA_CRYPTO
#define MBEDTLS_VERSION_FEATURES
//#define MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
//#define MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION
//#define MBEDTLS_X509_TRUSTED_CERTIFICATE_CALLBACK
#define MBEDTLS_X509_CHECK_KEY_USAGE
#define MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE
#define MBEDTLS_X509_RSASSA_PSS_SUPPORT
//#define MBEDTLS_ZLIB_SUPPORT
/* mbed TLS modules */
#define MBEDTLS_AES_C
#define MBEDTLS_ARC4_C
#define MBEDTLS_ASN1_PARSE_C
#define MBEDTLS_ASN1_WRITE_C
#define MBEDTLS_BASE64_C
#define MBEDTLS_BIGNUM_C
#define MBEDTLS_BLOWFISH_C
#define MBEDTLS_CAMELLIA_C
//#define MBEDTLS_ARIA_C
#define MBEDTLS_CCM_C
#define MBEDTLS_CERTS_C
//#define MBEDTLS_CHACHA20_C
//#define MBEDTLS_CHACHAPOLY_C
#define MBEDTLS_CIPHER_C
//#define MBEDTLS_CMAC_C
#define MBEDTLS_CTR_DRBG_C
#define MBEDTLS_DEBUG_C
#define MBEDTLS_DES_C
#define MBEDTLS_DHM_C
#define MBEDTLS_ECDH_C
#define MBEDTLS_ECDSA_C
//#define MBEDTLS_ECJPAKE_C
#define MBEDTLS_ECP_C
#define MBEDTLS_ENTROPY_C
#define MBEDTLS_ERROR_C
#define MBEDTLS_GCM_C
//#define MBEDTLS_HAVEGE_C
//#define MBEDTLS_HKDF_C
#define MBEDTLS_HMAC_DRBG_C
//#define MBEDTLS_NIST_KW_C
#define MBEDTLS_MD_C
//#define MBEDTLS_MD2_C
//#define MBEDTLS_MD4_C
#define MBEDTLS_MD5_C
//#define MBEDTLS_MEMORY_BUFFER_ALLOC_C
#define MBEDTLS_NET_C
#define MBEDTLS_OID_C
#define MBEDTLS_PEM_PARSE_C
#define MBEDTLS_PEM_WRITE_C
#define MBEDTLS_PK_C
#define MBEDTLS_PK_PARSE_C
#define MBEDTLS_PK_WRITE_C
#define MBEDTLS_PKCS5_C
//#define MBEDTLS_PKCS11_C
#define MBEDTLS_PKCS12_C
#define MBEDTLS_PLATFORM_C
//#define MBEDTLS_POLY1305_C
//#define MBEDTLS_PSA_CRYPTO_C
//#define MBEDTLS_PSA_CRYPTO_SE_C
//#define MBEDTLS_PSA_CRYPTO_STORAGE_C
//#define MBEDTLS_PSA_ITS_FILE_C
#define MBEDTLS_RIPEMD160_C
#define MBEDTLS_RSA_C
#define MBEDTLS_SHA1_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_SHA512_C
#define MBEDTLS_SSL_CACHE_C
#define MBEDTLS_SSL_COOKIE_C
#define MBEDTLS_SSL_TICKET_C
#define MBEDTLS_SSL_CLI_C
//#define MBEDTLS_SSL_SRV_C
#define MBEDTLS_SSL_TLS_C
//#define MBEDTLS_THREADING_C
//#define MBEDTLS_TIMING_C
#define MBEDTLS_VERSION_C
#define MBEDTLS_X509_USE_C
#define MBEDTLS_X509_CRT_PARSE_C
#define MBEDTLS_X509_CRL_PARSE_C
#define MBEDTLS_X509_CSR_PARSE_C
#define MBEDTLS_X509_CREATE_C
#define MBEDTLS_X509_CRT_WRITE_C
#define MBEDTLS_X509_CSR_WRITE_C
#define MBEDTLS_XTEA_C
#include "mbedtls/check_config.h"
#endif /* MBEDTLS_CONFIG_H */
/**********************************************************
*
* @file : nsc.c
* @author : HaewonSeo
*
* @note : Non-Secure callable
**********************************************************/
#include "nsc.h"
uint32_t startTime, endTime, OLED_printTime;
extern char priKey[49];
extern char pubKey1[49], pubKey2[49];
extern char R[49], S[49];
t_digitallySignedData gDSD;
/*----------------------------------------------------------------------------
NonSecure callable function for NonSecure callback
*----------------------------------------------------------------------------*/
NonSecure_funcptr pfNonSecure_OLED_On = (NonSecure_funcptr)NULL;
NonSecure_funcptr pfNonSecure_OLED_Off = (NonSecure_funcptr)NULL;
__NONSECURE_ENTRY
int32_t Secure_OLED_On_callback(NonSecure_funcptr *callback)
{
pfNonSecure_OLED_On = (NonSecure_funcptr)cmse_nsfptr_create(callback);
return 0;
}
__NONSECURE_ENTRY
int32_t Secure_OLED_Off_callback(NonSecure_funcptr *callback)
{
pfNonSecure_OLED_Off = (NonSecure_funcptr)cmse_nsfptr_create(callback);
return 0;
}
/*----------------------------------------------------------------------------
Secure functions exported to NonSecure application
Must place in Non-secure Callable
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
uint32_t GetSystemCoreClock(void)
{
//printf("System core clock = %d.\n", SystemCoreClock);
return SystemCoreClock;
}
__NONSECURE_ENTRY
uint32_t Get_BPM()
{
uint32_t ret;
static uint32_t ticks;
ret = MAX30102_ComputeBPM();
ticks++;
if (ticks == 60)
{
ticks = 0;
startTime = millis_counter;
/* Refresh OLED */
pfNonSecure_OLED_On(9999);
pfNonSecure_OLED_On(beatAvg);
endTime = millis_counter;
OLED_printTime = endTime - startTime;
//printf("OLED print time = %u\n", OLED_printTime);
}
else
OLED_printTime = 0;
if (ret == 0)
return 0;
return beatAvg;
}
__NONSECURE_ENTRY
uint32_t Get_EncryptedDigitallySignedData(t_digitallySignedData *dsd)
{
uint32_t ret;
static uint32_t ticks;
__attribute__((aligned(4))) uint8_t plainBPM[16] = //{0};
{
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30
};
ret = MAX30102_ComputeBPM();
ticks++;
if (ticks >= 60)
{
ticks = 0;
startTime = millis_counter;
/* Refresh OLED */
pfNonSecure_OLED_On(9999);
pfNonSecure_OLED_On(beatAvg);
endTime = millis_counter;
OLED_printTime = endTime - startTime;
//printf("OLED print time = %u\n", OLED_printTime);
/* Encyrpt beatAvg */
memcpy(plainBPM, &beatAvg, sizeof(uint8_t));
/* hashing(sha1) -> Generate Signature -> Encrypt plainBPM & Signiture */
M2351_ECDSA_GenerateSignature((uint8_t *)plainBPM, priKey, R, S);
Encrypt_data((uint8_t *)plainBPM, (uint8_t *)dsd->data, sizeof(plainBPM));
Encrypt_data((uint8_t *)pubKey1, (uint8_t *)dsd->pubKey1, 24);
Encrypt_data((uint8_t *)pubKey2, (uint8_t *)dsd->pubKey2, 24);
Encrypt_data((uint8_t *)R, (uint8_t *)dsd->R, 24);
Encrypt_data((uint8_t *)S, (uint8_t *)dsd->S, 24);
printf("\nplainBPM\n");
printBlock(plainBPM);
printf("\nencryptedBPM\n");
printBlock((uint8_t *)dsd->data);
}
else
OLED_printTime = 0;
if (beatAvg == 0)
return 0;
return 1;
}
/*----------------------------------------------------------------------------
CRYPTO Secure functions exported to NonSecure application
Must place in Non-secure Callable
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
int32_t Encrypt_data(uint8_t *plainData, uint8_t *encryptedData, uint32_t bytes) {
if (DEMO) printf("\n| Secure is running ... Encrypt_data |\n");
M2351_Crypto_Init(0, ENCRYPT);
M2351_Crypto_UseSessionKey(0);
M2351_Encrypt_Data(0, plainData, encryptedData, bytes);
//M2351_crypto_init(1, ENCRYPT);
//M2351_crypto_useMasterKey();
//M2351_encrypt_data(1, plainData, cipheredData);
return (int32_t)encryptedData;
}
__NONSECURE_ENTRY
int32_t Decrypt_data(uint8_t *encryptedData, uint8_t *resultData, uint32_t bytes) {
if (DEMO) printf("\n| Secure is running ... Decrypt_data |\n");
M2351_Crypto_Init(0, DECRYPT);
M2351_Crypto_UseSessionKey(0);
M2351_Decrypt_Data(0, encryptedData, resultData, bytes);
//M2351_crypto_init(1, DECRYPT);
//M2351_crypto_useMasterKey();
//M2351_decrypt_data(1, cipheredData, resultData);
return (int32_t)resultData;
}
__NONSECURE_ENTRY
void M2351_LoadKey()
{
static int called;
if (called)
return ;
called = 1;
printf("+---------------------------------------------+\n");
printf("| Load PriKey from OTP & Generate PubKey |\n");
printf("+---------------------------------------------+\n");
M2351_FMC_Read_Key(0, 3, priKey);
printf("prikey(%d-bits) : %s\n", strlen(priKey) * 4, priKey);
M2351_ECC_GenerateKey(priKey, pubKey1, pubKey2);
printf("pubKey1(%d-bits) : %s\npubKey2(%d-bits) : %s\n", strlen(pubKey1) * 4, pubKey1, strlen(pubKey2) * 4, pubKey2);
return ;
}
__NONSECURE_ENTRY
void M2351_DeleteKey()
{
memset(priKey, 0, sizeof(char) * 49);
memset(pubKey1, 0, sizeof(char) * 49);
memset(pubKey2, 0, sizeof(char) * 49);
memset(R, 0, sizeof(char) * 49);
memset(S, 0, sizeof(char) * 49);
//memset(&gDSD, 0, sizeof(t_digitallySignedData));
printf("\nDelete Key & Signature OK.\n");
}
/*----------------------------------------------------------------------------
PRINT Secure functions exported to NonSecure application
Must place in Non-secure Callable
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
int32_t printBlock(uint8_t *block) {
//printf("&block = %p\n",block);
for (uint8_t i = 0; i < 4; i++) {
printf("|");
for (uint8_t j = 0; j < 16; j = j+4) {
printf(" %02x",block[i+j]);
}
printf(" |\n");
}
printf("\n");
return 1;
}
__NONSECURE_ENTRY
int32_t printSecure(char *string, void *ptr, uint8_t val) {
if (ptr == NULL && val == NULL) printf("%s\n",string);
if (ptr == NULL && val != NULL) printf(string,val);
if (ptr != NULL && val == NULL) printf(string,ptr);
return 1;
}
__NONSECURE_ENTRY
int32_t printDigitallySignedData(t_digitallySignedData *dsd)
{
int32_t i;
printf(".data(%d-bits):\n", (sizeof(dsd->data)-1) * 8);
for(i=0; i<16; i++)
printf("%02x", dsd->data[i]);
//printf("\n.pubKey1(%d-bits):\n", (sizeof(dsd->pubKey1)-1) * 8);
//for(i=0; i<24; i++)
// printf("%02x", dsd->pubKey1[i]);
//printf("\n.pubKey2(%d-bits):\n", (sizeof(dsd->pubKey2)-1) * 8);
//for(i=0; i<24; i++)
// printf("%02x", dsd->pubKey2[i]);
printf("\n.SignatureR(%d-bits):\n", (sizeof(dsd->R)-1) * 8);
for(i=0; i<24; i++)
printf("%02x", dsd->R[i]);
printf("\n.SignatureS(%d-bits):\n", (sizeof(dsd->S)-1) * 8);
for(i=0; i<24; i++)
printf("%02x", dsd->S[i]);
printf("\n");
return 1;
}
/**********************************************************
*
* @file : nsc.h
* @author : HaewonSeo
*
* @note : Non-Secure callable
**********************************************************/
#ifndef __NSC_H__
#define __NSC_H__
#include <arm_cmse.h>
#include <stdio.h>
#include <stdlib.h>
#include "NuMicro.h"
#include "M2351_crypto.h"
#include "MAX30102.h"
#define DEMO 1
#define SUCCESS 1
#define FAIL 0
// Raw HR & SPo2 data from FIFO
extern volatile int32_t hr_val;
extern volatile int32_t spo2_val;
/* typedef for NonSecure callback functions */
typedef __NONSECURE_CALL void (*NonSecure_funcptr)(uint32_t);
extern volatile uint32_t millis_counter;
extern float beatsPerMinute;
extern uint32_t beatAvg;
typedef struct s_netData
{
char *data;
int len;
} t_netData;
typedef struct s_digitallySignedData
{
uint8_t data[17];
uint8_t pubKey1[25];
uint8_t pubKey2[25];
uint8_t R[25];
uint8_t S[25];
} t_digitallySignedData;
__NONSECURE_ENTRY
uint32_t GetSystemCoreClock(void);
/*----------------------------------------------------------------------------
NonSecure callable function for NonSecure callback
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
int32_t Secure_OLED_On_callback(NonSecure_funcptr *callback);
__NONSECURE_ENTRY
int32_t Secure_OLED_On_callback(NonSecure_funcptr *callback);
/*----------------------------------------------------------------------------
MAX30102 Heart-Rate Sensor functions exported to NonSecure application
Must place in Non-secure Callable
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
uint32_t Get_BPM();
__NONSECURE_ENTRY
uint32_t Get_EncryptedDigitallySignedData();
/*----------------------------------------------------------------------------
CRYPTO functions exported to NonSecure application
Must place in Non-secure Callable
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
int32_t Encrypt_data(uint8_t *,uint8_t *, uint32_t);
__NONSECURE_ENTRY
int32_t Decrypt_data(uint8_t *,uint8_t *, uint32_t);
__NONSECURE_ENTRY
void M2351_LoadKey();
__NONSECURE_ENTRY
void M2351_DeleteKey();
/*----------------------------------------------------------------------------
PRINT functions exported to NonSecure application
Must place in Non-secure Callable
*----------------------------------------------------------------------------*/
__NONSECURE_ENTRY
int32_t printBlock(uint8_t *);
__NONSECURE_ENTRY
int32_t printSecure(char *,void *,uint8_t);
__NONSECURE_ENTRY
int32_t printDigitallySignedData(t_digitallySignedData *dsd);
#endif /* __NSC_H__ */
/**************************************************************************//**
* @file partition_M2351.c
* @version V3.00
* @brief SAU configuration for secure/nonsecure region settings.
*
* @note
* Copyright (C) 2016 Nuvoton Technology Corp. All rights reserved.
*
******************************************************************************/
#ifndef PARTITION_M2351
#define PARTITION_M2351
/*
//-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
*/
/*
SRAMNSSET
*/
/*
// Bit 0..16
// <o.0..16> Secure SRAM Size <0=> 0 KB
// <0x2000=> 8KB
// <0x4000=> 16KB
// <0x6000=> 24KB
// <0x8000=> 32KB
// <0xa000=> 40KB
// <0xc000=> 48KB
// <0xe000=> 56KB
// <0x10000=> 64KB
// <0x12000=> 72KB
// <0x14000=> 80KB
// <0x16000=> 88KB
// <0x18000=> 96KB
*/
#define SCU_SECURE_SRAM_SIZE 0x08000
#define NON_SECURE_SRAM_BASE (0x30000000 + SCU_SECURE_SRAM_SIZE)
/*--------------------------------------------------------------------------------------------------------*/
/*
NSBA
*/
#define FMC_INIT_NSBA 1
/*
// <o>Secure Flash ROM Size <0x800-0x80000:0x800>
*/
#define FMC_SECURE_ROM_SIZE 0x40000
#define FMC_NON_SECURE_BASE (0x10000000 + FMC_SECURE_ROM_SIZE)
/*--------------------------------------------------------------------------------------------------------*/
/*
// <h> Peripheral Secure Attribution Configuration
*/
/*
PNSSET0
*/
/*
// Module 0..31
// <o.9> USBH <0=> Secure <1=> Non-Secure
// <o.13> SD0 <0=> Secure <1=> Non-Secure
// <o.16> EBI <0=> Secure <1=> Non-Secure
// <o.24> PDMA1 <0=> Secure <1=> Non-Secure
*/
#define SCU_INIT_PNSSET0_VAL 0x0
/*
PNSSET1
*/
/*
// Module 0..31
// <o.17> CRC <0=> Secure <1=> Non-Secure
// <o.18> CRPT <0=> Secure <1=> Non-Secure
*/
#define SCU_INIT_PNSSET1_VAL 0x00000
/*
PNSSET2
*/
/*
// Module 0..31
// <o.1> RTC <0=> Secure <1=> Non-Secure
// <o.3> EADC <0=> Secure <1=> Non-Secure
// <o.5> ACMP01 <0=> Secure <1=> Non-Secure
//
// <o.7> DAC <0=> Secure <1=> Non-Secure
// <o.8> I2S0 <0=> Secure <1=> Non-Secure
// <o.13> OTG <0=> Secure <1=> Non-Secure
// <o.17> TMR23 <0=> Secure <1=> Non-Secure
// <h> PWM
// <o.24> EPWM0 <0=> Secure <1=> Non-Secure
// <o.25> EPWM1 <0=> Secure <1=> Non-Secure
// <o.26> BPWM0 <0=> Secure <1=> Non-Secure
// <o.27> BPWM1 <0=> Secure <1=> Non-Secure
// </h>
*/
#define SCU_INIT_PNSSET2_VAL 0x0
/*
PNSSET3
*/
/*
// Module 0..31
// <h> SPI
// <o.0> QSPI0 <0=> Secure <1=> Non-Secure
// <o.1> SPI0 <0=> Secure <1=> Non-Secure
// <o.2> SPI1 <0=> Secure <1=> Non-Secure
// <o.3> SPI2 <0=> Secure <1=> Non-Secure
// <o.4> SPI3 <0=> Secure <1=> Non-Secure
// </h>
// <h> UART
// <o.16> UART0 <0=> Secure <1=> Non-Secure
// <o.17> UART1 <0=> Secure <1=> Non-Secure
// <o.18> UART2 <0=> Secure <1=> Non-Secure
// <o.19> UART3 <0=> Secure <1=> Non-Secure
// <o.20> UART4 <0=> Secure <1=> Non-Secure
// <o.21> UART5 <0=> Secure <1=> Non-Secure
// </h>
*/
#define SCU_INIT_PNSSET3_VAL 0x90004
/*
PNSSET4
*/
/*
// Module 0..31
// <h> I2C
// <o.0> I2C0 <0=> Secure <1=> Non-Secure
// <o.1> I2C1 <0=> Secure <1=> Non-Secure
// <o.2> I2C2 <0=> Secure <1=> Non-Secure
// </h>
// <h> Smart Card
// <o.16> SC0 <0=> Secure <1=> Non-Secure
// <o.17> SC1 <0=> Secure <1=> Non-Secure
// <o.18> SC2 <0=> Secure <1=> Non-Secure
// </h>
*/
#define SCU_INIT_PNSSET4_VAL 0x0
/*
PNSSET5
*/
/*
// Module 0..31
// <o.0> CAN0 <0=> Secure <1=> Non-Secure
// <h> QEI
// <o.16> QEI0 <0=> Secure <1=> Non-Secure
// <o.17> QEI1 <0=> Secure <1=> Non-Secure
// </h>
// <h> ECAP
// <o.20> ECAP0 <0=> Secure <1=> Non-Secure
// <o.21> ECAP1 <0=> Secure <1=> Non-Secure
// </h>
// <o.25> TRNG <0=> Secure <1=> Non-Secure
*/
#define SCU_INIT_PNSSET5_VAL 0x0
/*
PNSSET6
*/
/*
// Module 0..31
// <o.0> USBD <0=> Secure <1=> Non-Secure
// <h> USCI
// <o.16> USCI0 <0=> Secure <1=> Non-Secure
// <o.17> USCI1 <0=> Secure <1=> Non-Secure
// </h>
*/
#define SCU_INIT_PNSSET6_VAL 0x0
/*
// </h>
*/
/*
// <h> GPIO Secure Attribution Configuration
*/
/*
IONSSET
*/
/*
// Bit 0..31
// <o.0> PA <0=> Secure <1=> Non-Secure
// <o.1> PB <0=> Secure <1=> Non-Secure
// <o.2> PC <0=> Secure <1=> Non-Secure
// <o.3> PD <0=> Secure <1=> Non-Secure
// <o.4> PE <0=> Secure <1=> Non-Secure
// <o.5> PF <0=> Secure <1=> Non-Secure
// <o.6> PG <0=> Secure <1=> Non-Secure
// <o.7> PH <0=> Secure <1=> Non-Secure
*/
#define SCU_INIT_IONSSET_VAL 0x9E
/*
// </h>
*/
/* ---------------------------------------------------------------------------------------------------- */
/*
// <e>Secure Attribute Unit (SAU) Control
*/
#define SAU_INIT_CTRL 1
/*
// <q> Enable SAU
// <i> To enable Secure Attribute Unit (SAU).
*/
#define SAU_INIT_CTRL_ENABLE 1
/*
// <o> All Memory Attribute When SAU is disabled
// <0=> All Memory is Secure
// <1=> All Memory is Non-Secure
// <i> To set the ALLNS bit in SAU CTRL.
// <i> When all Memory is Non-Secure (ALLNS is 1), IDAU can override memory map configuration.
*/
#define SAU_INIT_CTRL_ALLNS 0
/*
// </e>
*/
/*
// <h>Enable and Set Secure/Non-Secure region
*/
#define SAU_REGIONS_MAX 8 /* Max. number of SAU regions */
/*
// <e>SAU Region 0
// <i> Setup SAU Region 0
*/
#define SAU_INIT_REGION0 1
/*
// <o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START0 0x0003F000 /* start address of SAU region 0 */
/*
// <o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END0 0x0003FFFF /* end address of SAU region 0 */
/*
// <o>Region is
// <0=>Non-Secure
// <1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC0 1
/*
// </e>
*/
/*
// <e>SAU Region 1
// <i> Setup SAU Region 1
*/
#define SAU_INIT_REGION1 0
/*
// <o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START1 0x10040000
/*
// <o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END1 0x1007FFFF
/*
// <o>Region is
// <0=>Non-Secure
// <1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC1 0
/*
// </e>
*/
/*
// <e>SAU Region 2
// <i> Setup SAU Region 2
*/
#define SAU_INIT_REGION2 0
/*
// <o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START2 0x2000F000
/*
// <o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END2 0x2000FFFF
/*
// <o>Region is
// <0=>Non-Secure
// <1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC2 1
/*
// </e>
*/
/*
// <e>SAU Region 3
// <i> Setup SAU Region 3
*/
#define SAU_INIT_REGION3 0
/*
// <o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START3 0x3f000
/*
// <o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END3 0x3f7ff
/*
// <o>Region is
// <0=>Non-Secure
// <1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC3 1
/*
// </e>
*/
/*
<e>SAU Region 4
<i> Setup SAU Region 4
*/
#define SAU_INIT_REGION4 1
/*
<o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START4 FMC_NON_SECURE_BASE /* start address of SAU region 4 */
/*
<o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END4 0x1007FFFF /* end address of SAU region 4 */
/*
<o>Region is
<0=>Non-Secure
<1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC4 0
/*
</e>
*/
/*
<e>SAU Region 5
<i> Setup SAU Region 5
*/
#define SAU_INIT_REGION5 1
/*
<o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START5 0x00807E00
/*
<o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END5 0x00807FFF
/*
<o>Region is
<0=>Non-Secure
<1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC5 1
/*
</e>
*/
/*
<e>SAU Region 6
<i> Setup SAU Region 6
*/
#define SAU_INIT_REGION6 1
/*
<o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START6 NON_SECURE_SRAM_BASE
/*
<o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END6 0x30017FFF
/*
<o>Region is
<0=>Non-Secure
<1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC6 0
/*
</e>
*/
/*
<e>SAU Region 7
<i> Setup SAU Region 7
*/
#define SAU_INIT_REGION7 1
/*
<o>Start Address <0-0xFFFFFFE0>
*/
#define SAU_INIT_START7 0x50000000
/*
<o>End Address <0x1F-0xFFFFFFFF>
*/
#define SAU_INIT_END7 0x5FFFFFFF
/*
<o>Region is
<0=>Non-Secure
<1=>Secure, Non-Secure Callable
*/
#define SAU_INIT_NSC7 0
/*
</e>
*/
/*
// </h>
*/
/*
// <e>Setup behavior of Sleep and Exception Handling
*/
#define SCB_CSR_AIRCR_INIT 1
/*
// <o> Deep Sleep can be enabled by
// <0=>Secure and Non-Secure state
// <1=>Secure state only
// <i> Value for SCB->CSR register bit DEEPSLEEPS
*/
#define SCB_CSR_DEEPSLEEPS_VAL 0
/*
// <o>System reset request accessible from
// <0=> Secure and Non-Secure state
// <1=> Secure state only
// <i> Value for SCB->AIRCR register bit SYSRESETREQS
*/
#define SCB_AIRCR_SYSRESETREQS_VAL 0
/*
// <o>Priority of Non-Secure exceptions is
// <0=> Not altered
// <1=> Lowered to 0x80-0xFF
// <i> Value for SCB->AIRCR register bit PRIS
*/
#define SCB_AIRCR_PRIS_VAL 0
/* Assign HardFault to be always secure for safe */
#define SCB_AIRCR_BFHFNMINS_VAL 0
/*
// </e>
*/
/*
max 128 SAU regions.
SAU regions are defined in partition.h
*/
#define SAU_INIT_REGION(n) \
SAU->RNR = (n & SAU_RNR_REGION_Msk); \
SAU->RBAR = (SAU_INIT_START##n & SAU_RBAR_BADDR_Msk); \
SAU->RLAR = (SAU_INIT_END##n & SAU_RLAR_LADDR_Msk) | \
((SAU_INIT_NSC##n << SAU_RLAR_NSC_Pos) & SAU_RLAR_NSC_Msk) | 1U
#endif /* PARTITION_M2351 */
/*
* SSL client demonstration program
*
* Copyright The Mbed TLS Contributors
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if !defined(MBEDTLS_CONFIG_FILE)
#include "mbedtls/config.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
#if defined(MBEDTLS_PLATFORM_C)
#include "mbedtls/platform.h"
#else
#include <stdio.h>
#include <stdlib.h>
#define mbedtls_time time
#define mbedtls_time_t time_t
#define mbedtls_fprintf fprintf
#define mbedtls_printf printf
#define mbedtls_exit exit
#define MBEDTLS_EXIT_SUCCESS EXIT_SUCCESS
#define MBEDTLS_EXIT_FAILURE EXIT_FAILURE
#endif /* MBEDTLS_PLATFORM_C */
#if !defined(MBEDTLS_BIGNUM_C) || !defined(MBEDTLS_ENTROPY_C) || \
!defined(MBEDTLS_SSL_TLS_C) || !defined(MBEDTLS_SSL_CLI_C) || \
!defined(MBEDTLS_NET_C) || !defined(MBEDTLS_RSA_C) || \
!defined(MBEDTLS_CERTS_C) || !defined(MBEDTLS_PEM_PARSE_C) || \
!defined(MBEDTLS_CTR_DRBG_C) || !defined(MBEDTLS_X509_CRT_PARSE_C)
int main( void )
{
mbedtls_printf("MBEDTLS_BIGNUM_C and/or MBEDTLS_ENTROPY_C and/or "
"MBEDTLS_SSL_TLS_C and/or MBEDTLS_SSL_CLI_C and/or "
"MBEDTLS_NET_C and/or MBEDTLS_RSA_C and/or "
"MBEDTLS_CTR_DRBG_C and/or MBEDTLS_X509_CRT_PARSE_C "
"not defined.\n");
mbedtls_exit( 0 );
}
#else
#include "mbedtls/net_sockets.h"
#include "mbedtls/debug.h"
#include "mbedtls/ssl.h"
#include "mbedtls/entropy.h"
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/error.h"
#include "mbedtls/certs.h"
#include <string.h>
#define SERVER_PORT "4433"
#define SERVER_NAME "172.27.145.87"
//#define SERVER_PORT "443"
//#define SERVER_NAME "tls.mbed.org"
#define GET_REQUEST "GET / HTTP/1.0\r\n\r\n"
#define DEBUG_LEVEL 1
static void my_debug( void *ctx, int level,
const char *file, int line,
const char *str )
{
((void) level);
mbedtls_fprintf( (FILE *) ctx, "%s:%04d: %s", file, line, str );
fflush( (FILE *) ctx );
}
int ssl_client1( void )
{
int ret = 1, len;
int exit_code = MBEDTLS_EXIT_FAILURE;
mbedtls_net_context server_fd;
uint32_t flags;
unsigned char buf[1024];
const char *pers = "ssl_client1";
mbedtls_entropy_context entropy;
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config conf;
mbedtls_x509_crt cacert;
#if defined(MBEDTLS_DEBUG_C)
mbedtls_debug_set_threshold( DEBUG_LEVEL );
#endif
/*
* 0. Initialize the RNG and the session data
*/
mbedtls_net_init( &server_fd );
mbedtls_ssl_init( &ssl );
mbedtls_ssl_config_init( &conf );
mbedtls_x509_crt_init( &cacert );
mbedtls_ctr_drbg_init( &ctr_drbg );
mbedtls_printf( "\n . Seeding the random number generator..." );
fflush( stdout );
mbedtls_entropy_init( &entropy );
if( ( ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy,
(const unsigned char *) pers,
strlen( pers ) ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_ctr_drbg_seed returned %d\n", ret );
goto exit;
}
mbedtls_printf( " ok\n" );
/*
* 0. Initialize certificates
*/
mbedtls_printf( " . Loading the CA root certificate ..." );
fflush( stdout );
ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_cas_pem,
mbedtls_test_cas_pem_len );
if( ret < 0 )
{
mbedtls_printf( " failed\n ! mbedtls_x509_crt_parse returned -0x%x\n\n", (unsigned int) -ret );
goto exit;
}
mbedtls_printf( " ok (%d skipped)\n", ret );
/*
* 1. Start the connection
*/
mbedtls_printf( " . Connecting to tcp/%s/%s...", SERVER_NAME, SERVER_PORT );
fflush( stdout );
if( ( ret = mbedtls_net_connect( &server_fd, SERVER_NAME,
SERVER_PORT, MBEDTLS_NET_PROTO_TCP ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_net_connect returned %d\n\n", ret );
goto exit;
}
mbedtls_printf( " ok\n" );
/*
* 2. Setup stuff
*/
mbedtls_printf( " . Setting up the SSL/TLS structure..." );
fflush( stdout );
if( ( ret = mbedtls_ssl_config_defaults( &conf,
MBEDTLS_SSL_IS_CLIENT,
MBEDTLS_SSL_TRANSPORT_STREAM,
MBEDTLS_SSL_PRESET_DEFAULT ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_config_defaults returned %d\n\n", ret );
goto exit;
}
mbedtls_printf( " ok\n" );
/* OPTIONAL is not optimal for security,
* but makes interop easier in this simplified example */
mbedtls_ssl_conf_authmode( &conf, MBEDTLS_SSL_VERIFY_OPTIONAL );
mbedtls_ssl_conf_ca_chain( &conf, &cacert, NULL );
mbedtls_ssl_conf_rng( &conf, mbedtls_ctr_drbg_random, &ctr_drbg );
mbedtls_ssl_conf_dbg( &conf, my_debug, stdout );
if( ( ret = mbedtls_ssl_setup( &ssl, &conf ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_setup returned %d\n\n", ret );
goto exit;
}
if( ( ret = mbedtls_ssl_set_hostname( &ssl, SERVER_NAME ) ) != 0 )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_set_hostname returned %d\n\n", ret );
goto exit;
}
mbedtls_ssl_set_bio( &ssl, &server_fd, mbedtls_net_send, mbedtls_net_recv, NULL );
/*
* 4. Handshake
*/
mbedtls_printf( " . Performing the SSL/TLS handshake..." );
fflush( stdout );
while( ( ret = mbedtls_ssl_handshake( &ssl ) ) != 0 )
{
if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_handshake returned -0x%x\n\n", (unsigned int) -ret );
goto exit;
}
}
mbedtls_printf( " ok\n" );
/*
* 5. Verify the server certificate
*/
mbedtls_printf( " . Verifying peer X.509 certificate..." );
/* In real life, we probably want to bail out when ret != 0 */
if( ( flags = mbedtls_ssl_get_verify_result( &ssl ) ) != 0 )
{
char vrfy_buf[512];
mbedtls_printf( " failed\n" );
mbedtls_x509_crt_verify_info( vrfy_buf, sizeof( vrfy_buf ), " ! ", flags );
mbedtls_printf( "%s\n", vrfy_buf );
}
else
mbedtls_printf( " ok\n" );
/*
* 3. Write the GET request
*/
mbedtls_printf( " > Write to server:" );
fflush( stdout );
len = sprintf( (char *) buf, GET_REQUEST );
while( ( ret = mbedtls_ssl_write( &ssl, buf, len ) ) <= 0 )
{
if( ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE )
{
mbedtls_printf( " failed\n ! mbedtls_ssl_write returned %d\n\n", ret );
goto exit;
}
}
len = ret;
mbedtls_printf( " %d bytes written\n\n%s", len, (char *) buf );
/*
* 7. Read the HTTP response
*/
mbedtls_printf( " < Read from server:" );
fflush( stdout );
do
{
len = sizeof( buf ) - 1;
memset( buf, 0, sizeof( buf ) );
ret = mbedtls_ssl_read( &ssl, buf, len );
if( ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE )
continue;
if( ret == MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY )
break;
if( ret < 0 )
{
mbedtls_printf( "failed\n ! mbedtls_ssl_read returned %d\n\n", ret );
break;
}
if( ret == 0 )
{
mbedtls_printf( "\n\nEOF\n\n" );
break;
}
len = ret;
mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf );
}
while( 1 );
mbedtls_ssl_close_notify( &ssl );
exit_code = MBEDTLS_EXIT_SUCCESS;
exit:
#ifdef MBEDTLS_ERROR_C
if( exit_code != MBEDTLS_EXIT_SUCCESS )
{
char error_buf[100];
mbedtls_strerror( ret, error_buf, 100 );
mbedtls_printf("Last error was: %d - %s\n\n", ret, error_buf );
}
#endif
mbedtls_net_free( &server_fd );
mbedtls_x509_crt_free( &cacert );
mbedtls_ssl_free( &ssl );
mbedtls_ssl_config_free( &conf );
mbedtls_ctr_drbg_free( &ctr_drbg );
mbedtls_entropy_free( &entropy );
#if defined(_WIN32)
mbedtls_printf( " + Press Enter to exit this program.\n" );
fflush( stdout ); getchar();
#endif
mbedtls_exit( exit_code );
}
#endif /* MBEDTLS_BIGNUM_C && MBEDTLS_ENTROPY_C && MBEDTLS_SSL_TLS_C &&
MBEDTLS_SSL_CLI_C && MBEDTLS_NET_C && MBEDTLS_RSA_C &&
MBEDTLS_CERTS_C && MBEDTLS_PEM_PARSE_C && MBEDTLS_CTR_DRBG_C &&
MBEDTLS_X509_CRT_PARSE_C */
FROM debian:buster
LABEL maintainer="shw2662@khu.ac.kr"
RUN apt-get update && apt-get install -y \
nginx \
openssl \
vim \
php-fpm \
mariadb-server \
php-mysql \
php-mbstring \
wget \
php \
gcc \
libssl-dev \
netstat
COPY ./srcs/default ./tmp/
COPY ./srcs/wordpress-5.6.2.tar.gz ./tmp/
COPY ./srcs/wp-config.php ./tmp/
COPY ./srcs/phpMyAdmin-4.9.7-all-languages.tar.gz ./tmp/
COPY ./srcs/config.inc.php ./tmp/
COPY ./srcs/run.sh ./
COPY ./srcs/input.php ./tmp/
COPY ./srcs/process.php ./tmp/
COPY ./srcs/highcharts.php ./tmp/
COPY ./srcs/socket.php ./tmp/
COPY ./srcs/tcp.h ./home/
COPY ./srcs/tcps.s ./home/
EXPOSE 80 443 2351
CMD bash run.sh
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
*/
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = '0k}CJ:h,X,mt0Dp.,IAPww,0.6gSor,B'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/**
* End of servers configuration
*/
/**
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/**
* Whether to display icons or text or both icons and text in table row
* action segment. Value can be either of 'icons', 'text' or 'both'.
* default = 'both'
*/
//$cfg['RowActionType'] = 'icons';
/**
* Defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['ShowAll'] = true;
/**
* Number of rows displayed when browsing a result set. If the result
* set contains more rows, "Previous" and "Next".
* Possible values: 25, 50, 100, 250, 500
* default = 25
*/
//$cfg['MaxRows'] = 50;
/**
* Disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for BLOB fields
* 'noblob' disallow editing except for BLOB fields
* 'all' disallow editing
* default = 'blob'
*/
//$cfg['ProtectBinary'] = false;
/**
* Default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';
/**
* How many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['PropertiesNumColumns'] = 2;
/**
* Set to true if you want DB-based query history.If false, this utilizes
* JS-routines to display query history (lost by window close)
*
* This requires configuration storage enabled, see above.
* default = false
*/
//$cfg['QueryHistoryDB'] = true;
/**
* When using DB-based query history, how many entries should be kept?
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;
/**
* Whether or not to query the user before sending the error report to
* the phpMyAdmin team when a JavaScript error occurs
*
* Available options
* ('ask' | 'always' | 'never')
* default = 'ask'
*/
//$cfg['SendErrorReports'] = 'always';
/**
* You can find more configuration options in the documentation
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
*/
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80;
listen [::]:80;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html input.php;
server_name ft_server80;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# autoindex on;
try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
# return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
ssl on;
ssl_certificate /etc/ssl/certs/localhost.dev.crt;
ssl_certificate_key /etc/ssl/private/localhost.dev.key;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
server_name ft_server;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
autoindex on;
try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
# listen 80;
# listen [::]:80;
#
# server_name example.com;
#
# root /var/www/example.com;
# index index.html;
#
# location / {
# try_files $uri $uri/ =404;
# }
#}
<?php
$mysql_host = 'localhost';
$mysql_user = 'haseo';
$mysql_password = 'haseo';
$mysql_db = 'M2351';
// DB 접속
$conn = mysqli_connect($mysql_host, $mysql_user, $mysql_password, $mysql_db);
// charset 설정, 설정하지 않으면 기본 mysql 설정으로 됨, 대체적으로 euc-kr를 많이 사용
//mysql_query("set names utf8");
// $sql="
// select * from (
// SELECT DATE_FORMAT( regday, '%m-%d %HH' ) mdh , COUNT( * ) cnt, SUM( temperature ) , round(SUM( temperature ) / COUNT( * ),2) atemper
// FROM `temperature`
// GROUP BY DATE_FORMAT( regday, '%Y%m%d%H' )
// order by regday desc
// limit 12
// ) t_a
// order by t_a.mdh
// ";
//echo $sql;
//$sql = "SELECT * FROM pulseTable";
$sql = "SELECT * FROM
(SELECT * FROM pulseTable ORDER BY date DESC LIMIT 30) A ORDER BY A.date ASC";
//echo $sql;
$result = mysqli_query($conn, $sql);
//echo $result;
$str_date="";
$str_heartrate="";
while ($row = mysqli_fetch_assoc($result))
{
$str_date .="'".$row['date']."',";
$str_heartrate .="".$row['pulse'].",";
}
$str_date= substr($str_date,0,-1);
$str_heartrate= substr($str_heartrate,0,-1);
//$str_date= substr($str_date,0,-1);
//$str_heartrate= substr($str_heartrate,0,-1);
//echo $str_date."</br>";
//echo $str_heartrate."</br>";
mysqli_close($conn);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Heart Rate Monitoring</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style type="text/css">
${demo.css}
</style>
<script type="text/javascript">
$(function () {
$('#container').highcharts({
chart: {
type: 'line',
events: {
load: function() {
// set up the updating of the chart each second
var series = this.series[0];
setInterval(function refresh(){
window.location.reload();
}, 3000);
}
}
},
title: {
text: 'Heart Rate Monitoring'
},
subtitle: {
text: 'Data was obtained from the MAX30102 in NuMaker-PFM-M2351 Secure World'
},
xAxis: {
categories: [<?php echo $str_date?>]
},
yAxis: {
title: {
text: 'Heart Rate (bpm)'
}
},
plotOptions: {
line: {
dataLabels: {
enabled: true
},
enableMouseTracking: true,
color: '#FF0000'
}
},
series: [{
name: 'Heart Rate',
data: [<?php echo $str_heartrate?>]
}
]
});
});
</script>
</head>
<body>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<script src="https://code.highcharts.com/modules/accessibility.js"></script>
<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<form action="process.php" method="get">
<p>Pulse : <input type="text" name="pulse"></p>
<p>pubKey1 : <input type="text" name="pubKey1"></p>
<p>pubKey2 : <input type="text" name="pubKey2"></p>
<p>signatureR : <input type="text" name="signatureR"></p>
<p>signatureS : <input type="text" name="signatureS"></p>
<p><input type="submit" /></p>
</form>
</body>
</html>
<?php
header("Content-Type: text/html; charset=UTF-8");
$KEY_128 = '0000000000000000';
$IV_128 = '0000000000000000';
echo "[pubKey of Device]<br/>";
$pubKey1 = $_GET['pubKey1'];
echo "pubKey1 = $pubKey1<br/>";
$pubKey2 = $_GET['pubKey2'];
echo "pubKey2 = $pubKey2<br/><br/>";
echo "[Encrypted digitally signed data]<br/>";
$pulse = $_GET['pulse'];
echo "pulse = $pulse<br/>";
//$pubKey1 = $_GET['pubKey1'];
//echo "pubKey1 = $pubKey1<br/>";
//$pubKey2 = $_GET['pubKey2'];
//echo "pubKey2 = $pubKey2<br/>";
$signatureR = $_GET['signatureR'];
echo "signatureR = $signatureR<br/>";
$signatureS = $_GET['signatureS'];
echo "signatureS = $signatureS<br/>";
echo "<br/>[Decrypted digitally signed data]<br/>";
$pulse = hex2bin($pulse);
$pulse = openssl_decrypt($pulse, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
//echo "pulse = $pulse<br/>";
$pulse = bin2hex($pulse);
echo "pulse = $pulse<br/>";
$pubKey1 = openssl_decrypt($pubKey1, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
$pubKey1 = bin2hex($pubKey1);
$pubKey1 = substr($pubKey1, 1, strlen($pubKey1) / 2);
//echo "pubKey1 = $pubKey1<br/>";
$pubKey2 = openssl_decrypt($pubKey2, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
$pubKey2 = bin2hex($pubKey2);
$pubKey2 = substr($pubKey2, 1, strlen($pubKey2) / 2);
//echo "pubKey2 = $pubKey2<br/>";
$signatureR = openssl_decrypt($signatureR, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
$signatureR = bin2hex($signatureR);
$signatureR = substr($signatureR, 1, strlen($signatureR) / 2);
echo "signatureR = $signatureR<br/>";
$signatureS = openssl_decrypt($signatureS, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
$signatureS = bin2hex($signatureS);
$signatureS = substr($signatureS, 1, strlen($signatureS) / 2);
echo "signatureS = $signatureS<br/>";
echo "<br/>[Digital signature verification]<br/>";
$hashPulse = sha1($hashPulse);
echo "hashPulse = $hashPulse<br/>";
echo "Verify signature with hashed data<br/>";
$result = openssl_verify($hashPulse, $signatureR, $pubKey1, 'ecdsa-with-SHA1');
// if ($result == 1) {
// echo "Valid<br/>";
// } elseif ($result == 0) {
// echo "Invalid<br/>";
// } else {
// echo "error: ".openssl_error_string();
// }
$host = 'localhost';
$user = 'haseo';
$pw = 'haseo';
$dbName = 'M2351';
$mysqli = new mysqli($host, $user, $pw, $dbName);
if($mysqli){
echo "<br/>[MySQL successfully connected!]<br/>";
echo "Convert binary to decimal<br/>";
$pulse = hexdec($pulse[0].$pulse[1]);
echo "pulse = $pulse<br/>";
$query = "INSERT INTO pulseTable(pulse) VALUES ('$pulse')";
mysqli_query($mysqli,$query);
echo "<br/>[Success insert pulse data to DB Table!!]";
}
else{
echo "MySQL could not be connected";
}
mysqli_close($mysqli);
/*
$encryptedBPM = $_GET['pulse'];
echo 'encryptedBPM : '.$encryptedBPM.'<br/>';
$decryptedBPM = Hex2Char($encryptedBPM);
echo 'decryptedBPM : '.$decryptedBPM.'<br/><br/>';
//echo 'decryptedBPM : '.hex2bin($decryptedBPM).'<br/><br/>';
//$decryptedBPM = Hex2String($decryptedBPM);
// echo 'decryptedBPM : '.$decryptedBPM.'<br/><br/>'
$decryptedBPM = openssl_encrypt($decryptedBPM, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
echo 'decryptedBPM : '.$decryptedBPM.'<br/><br/>';
$teststr = '414243';
echo 'teststr : '.$teststr.'<br/>';
$teststr = Hex2Char($teststr);
echo 'teststr : '.$teststr.'<br/>';
$teststr = openssl_encrypt($teststr, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
echo 'teststr : '.$teststr.'<br/>';
$teststr = openssl_decrypt($teststr, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
echo 'teststr : '.$teststr.'<br/>';
$plain = '=000000000000000';
$plain = openssl_encrypt($plain, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
echo 'plain : '.bin2hex($plain).'<br/>';
echo 'plain : '.$plain.'<br/>';
$plain = openssl_decrypt($plain, 'AES-128-CBC', $KEY_128, OPENSSL_NO_PADDING, $IV_128);
echo 'plain : '.$plain.'<br/>';
function HexStr2Str($string){
$hex='';
for ($i=0; $i < strlen($string); $i+=2){
$hex .= hex2bin(hexdec(($string[$i].$string[$i+1])));
}
return $hex;
}
function HexStr2DecStr($string){
$hex='';
for ($i=0; $i < strlen($string); $i+=2){
$hex .= hexdec(($string[$i].$string[$i+1]));
}
return $hex;
}
function Hex2Char($hex){
$string='';
for ($i=0; $i < strlen($hex); $i+=2){
$string .= chr(hexdec($hex[$i].$hex[$i+1]));
}
return $string;
}
function HexStr2Hex($str)
{
}
*/
?>
#!/bin/bash
service mysql start
# ssl configuration
openssl req -newkey rsa:4096 \
-days 365 \
-nodes \
-x509 \
-subj "/C=KR/ST=Seoul/O=KHU/OU=CSE/CN=localhost" \
-keyout localhost.dev.key \
-out localhost.dev.crt
mv localhost.dev.key /etc/ssl/private/
mv localhost.dev.crt /etc/ssl/certs/
chmod 600 /etc/ssl/private/localhost.dev.key /etc/ssl/certs/localhost.dev.crt
# Nginx configuration
cp -p ./tmp/default /etc/nginx/sites-available
# Wordpress configuration
tar -xvf ./tmp/wordpress-5.6.2.tar.gz
rm ./tmp/wordpress-5.6.2.tar.gz
mv /wordpress/ /var/www/html
cp ./tmp/wp-config.php /var/www/html/wordpress
# Move PHP files
mv ./tmp/input.php /var/www/html
mv ./tmp/process.php /var/www/html
mv ./tmp/highcharts.php /var/www/html
mv ./tmp/socket.php /var/www/html
# MariaDB configuration
echo "CREATE USER 'haseo'@'localhost' IDENTIFIED BY 'haseo';" \
| mysql -u root --skip-password
echo "CREATE DATABASE wordpress;" \
| mysql -u root --skip-password
echo "GRANT ALL PRIVILEGES ON wordpress.* TO 'haseo'@'localhost' WITH GRANT OPTION;" \
| mysql -u root --skip-password
echo "FLUSH PRIVILEGES" \
| mysql -u root --skip-password
echo "CREATE DATABASE M2351;" \
| mysql -u root --skip-password
echo "GRANT ALL PRIVILEGES ON M2351.* TO 'haseo'@'localhost' WITH GRANT OPTION;" \
| mysql -u root --skip-password
echo "FLUSH PRIVILEGES" \
| mysql -u root --skip-password
# phpMyAdmin configuration
tar -xvf ./tmp/phpMyAdmin-4.9.7-all-languages.tar.gz
rm ./tmp/phpMyAdmin-4.9.7-all-languages.tar.gz
mv phpMyAdmin-4.9.7-all-languages phpmyadmin
mv phpmyadmin /var/www/html/
cp ./tmp/config.inc.php /var/www/html/phpmyadmin/
mysql < /var/www/html/phpmyadmin/sql/create_tables.sql
# permission setting
chown -R www-data:www-data /var/www/*
find /var/www -type d -exec chmod 755 {} \;
find /var/www -type f -exec chmod 644 {} \;
# service start
service nginx start
service mysql restart
service php7.3-fpm start
service php7.3-fpm status
bash
#!/usr/local/bin/php -q
<?php
define("_IP", "127.0.0.1");
define("_PORT", "2351");
$sSock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind($sSock, _IP, _PORT);
socket_listen($sSock);
while($cSock = socket_accept($sSock))
{
socket_getpeername($cSock, $addr, $port);
echo "SERVER >> client connected $addr:$port \n";
$date = date("Y/m/d H:i:s");
socket_write($cSock, $date);
socket_close($cSock);
echo "SERVER >> client Close.\n";
}
?>
#define SERV_TCP_PORT (2351)
#define SERV_HOST_ADDR "127.0.0.1"
typedef struct {
char data[64];
}
MsgType;
// TCP sockek example
// TCP server
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
#include "tcp.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
int Sockfd;
void CloseServer()
{
close(Sockfd);
printf("\nTCP Server exit.....\n");
exit(0);
}
void main(int argc, char *argv[])
{
int newSockfd, cliAddrLen, n;
struct sockaddr_in cliAddr, servAddr; // PF_INET, IPv4
MsgType msg;
// register a signal handler
signal(SIGINT, CloseServer);
// SOCKET
// create a socket for TCP
if ((Sockfd = socket(PF_INET, SOCK_STREAM, 0)) < 0)
{
perror("socket");
exit(1);
}
// initailize a servAddr
bzero((char *)&servAddr, sizeof(servAddr));
servAddr.sin_family = PF_INET; //protocol family
servAddr.sin_addr.s_addr = htonl(INADDR_ANY); // network byte ordered 32-bit address
// receive any IP addresses
servAddr.sin_port = htons(SERV_TCP_PORT);
// BIND
if (bind(Sockfd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0)
{
perror("bind");
exit(1);
}
// LISTEN
listen(Sockfd, 5);
printf("TCP Server started.....\n");
// kernel allocate a cliAddr ifself
cliAddrLen = sizeof(cliAddr);
while (1)
{
memset(&msg, 0, sizeof(MsgType));
// ACCEPT
newSockfd = accept(Sockfd, (struct sockaddr *)&cliAddr, &cliAddrLen);
if (newSockfd < 0)
{
perror("accept");
exit(1);
}
printf("Accept a new socket\n");
// READ
if ((n = read(newSockfd, (char *)&msg, sizeof(msg))) < 0)
{
perror("read");
exit(1);
}
printf("Received message from M2351: %s\n", msg.data);
// WRITE
//sprintf(msg.data, "This is a reply from %d.", getpid());
char aesKey[20] = {0x61, 0x62, 0x63, 0x64, 0x65,
0x66, 0x67, 0x68, 0x69, 0x6a,
0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
0x70, 0x71, 0x72, 0x73, 0x74};
strcpy(msg.data, aesKey);
printf("aesKey : %s\n", msg.data);
if (write(newSockfd, (char *)&msg, sizeof(msg)) < 0)
{
perror("write");
exit(1);
}
printf("Replied.\n");
usleep(5000);
// CLOSE
close(newSockfd);
}
}
This file is too large to display.
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://wordpress.org/support/article/editing-wp-config-php/
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );
/** MySQL database username */
define( 'DB_USER', 'haseo' );
/** MySQL database password */
define( 'DB_PASSWORD', 'haseo' );
/** MySQL hostname */
define( 'DB_HOST', 'localhost' );
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define( 'AUTH_KEY', 'put your unique phrase here' );
define( 'SECURE_AUTH_KEY', 'put your unique phrase here' );
define( 'LOGGED_IN_KEY', 'put your unique phrase here' );
define( 'NONCE_KEY', 'put your unique phrase here' );
define( 'AUTH_SALT', 'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT', 'put your unique phrase here' );
define( 'NONCE_SALT', 'put your unique phrase here' );
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @link https://wordpress.org/support/article/debugging-in-wordpress/
*/
define( 'WP_DEBUG', false );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';