First version

This commit is contained in:
熊美景 2024-04-09 18:08:12 +08:00
parent 7fca1c3932
commit 040008f37a
121 changed files with 92718 additions and 0 deletions

File diff suppressed because one or more lines are too long

505
project/WL468/WL468.uvoptx Normal file
View File

@ -0,0 +1,505 @@
<?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</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>WL468</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>7</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>0</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>244</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>C:\Users\songc\Desktop\WLC_Gen3_ISP_V5381_20230915\src\common\tau_dsi_datatype.h</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>1</Number>
<Type>0</Type>
<LineNumber>57</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>C:\Users\songc\Desktop\WLC_Gen3_ISP_V5381_20230915\src\sdk\include\hal_dsi_rx_ctrl.h</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>0</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>app</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>..\..\src\app\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\touch\app_tp_transfer.c</PathWithFileName>
<FilenameWithoutPath>app_tp_transfer.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\S8\app_tp_for_custom_s8.c</PathWithFileName>
<FilenameWithoutPath>app_tp_for_custom_s8.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\S8\s8_demo.c</PathWithFileName>
<FilenameWithoutPath>s8_demo.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\Mi12Lite\Mi12Lite.c</PathWithFileName>
<FilenameWithoutPath>Mi12Lite.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>driver</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\sdk\CVWL468\lib\CVWL468.lib</PathWithFileName>
<FilenameWithoutPath>CVWL468.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>board</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\board\board.c</PathWithFileName>
<FilenameWithoutPath>board.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>startup</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\board\startup\startup_ARMCM0.s</PathWithFileName>
<FilenameWithoutPath>startup_ARMCM0.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>modules_demo</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_crc.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_crc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_dsi_rx.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_dsi_rx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_dsi_tx.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_dsi_tx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_flash.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_flash.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_gpio.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_gpio.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>14</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_i2c.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_i2c.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_spi.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_spi.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_pwm.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_pwm.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>..\..\src\app\module_demo\demo_hal_pwr.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_pwr.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>..\..\src\app\module_demo\demo_hal_swire.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_swire.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>..\..\src\app\module_demo\demo_hal_uart.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_uart.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>..\..\src\app\module_demo\demo_hal_wdg.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_wdg.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\module_demo_main.c</PathWithFileName>
<FilenameWithoutPath>module_demo_main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>

546
project/WL468/WL468.uvprojx Normal file
View File

@ -0,0 +1,546 @@
<?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>WL468</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pArmCC>5060750::V5.06 update 6 (build 750)::ARMCC</pArmCC>
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>ARMCM0</Device>
<Vendor>ARM</Vendor>
<PackID>ARM.CMSIS.5.5.1</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ESEL ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:ARMCM0$Device\ARM\ARMCM0\Include\ARMCM0.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile></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>WL468_demo</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>1</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>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin -o .\Objects\@L.bin .\Objects\@L.axf</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>SARMCM3.DLL</SimDllName>
<SimDllArguments> </SimDllArguments>
<SimDlgDll>DARMCM1.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM0</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments> </TargetDllArguments>
<TargetDlgDll>TARMCM1.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM0</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>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></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-M0"</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>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>16</StupSel>
<useUlib>1</useUlib>
<EndSel>1</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>4</RoSelD>
<RwSelD>3</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>0</Ir1Chk>
<Ir2Chk>1</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>0x20000</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>0x2000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x10000</StartAddress>
<Size>0x10000</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>0x70000</StartAddress>
<Size>0x8000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>1</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>2</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
<uGnu>1</uGnu>
<useXO>0</useXO>
<v6Lang>1</v6Lang>
<v6LangP>1</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\..\src;..\..\src\board;..\..\src\common;..\..\src\sdk\include;..\..\src\sdk\include\M0;..\..\src\app;..\..\src\app\S8;..\..\src\app\touch;..\..\src\app\module_demo;..\..\src\app\Mi12Lite</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>0</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<uClangAs>0</uClangAs>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x00000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>app</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\main.c</FilePath>
</File>
<File>
<FileName>app_tp_transfer.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\touch\app_tp_transfer.c</FilePath>
</File>
<File>
<FileName>app_tp_for_custom_s8.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\S8\app_tp_for_custom_s8.c</FilePath>
</File>
<File>
<FileName>s8_demo.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\S8\s8_demo.c</FilePath>
</File>
<File>
<FileName>Mi12Lite.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\Mi12Lite\Mi12Lite.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>driver</GroupName>
<Files>
<File>
<FileName>CVWL468.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\src\sdk\CVWL468\lib\CVWL468.lib</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>board</GroupName>
<Files>
<File>
<FileName>board.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\board\board.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>startup</GroupName>
<Files>
<File>
<FileName>startup_ARMCM0.s</FileName>
<FileType>2</FileType>
<FilePath>..\..\src\board\startup\startup_ARMCM0.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>modules_demo</GroupName>
<Files>
<File>
<FileName>demo_hal_crc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_crc.c</FilePath>
</File>
<File>
<FileName>demo_hal_dsi_rx.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_dsi_rx.c</FilePath>
</File>
<File>
<FileName>demo_hal_dsi_tx.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_dsi_tx.c</FilePath>
</File>
<File>
<FileName>demo_hal_flash.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_flash.c</FilePath>
</File>
<File>
<FileName>demo_hal_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_gpio.c</FilePath>
</File>
<File>
<FileName>demo_hal_i2c.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_i2c.c</FilePath>
</File>
<File>
<FileName>demo_hal_spi.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_spi.c</FilePath>
</File>
<File>
<FileName>demo_hal_pwm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_pwm.c</FilePath>
</File>
<File>
<FileName>demo_hal_pwr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_pwr.c</FilePath>
</File>
<File>
<FileName>demo_hal_swire.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_swire.c</FilePath>
</File>
<File>
<FileName>demo_hal_uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_uart.c</FilePath>
</File>
<File>
<FileName>demo_hal_wdg.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_wdg.c</FilePath>
</File>
<File>
<FileName>module_demo_main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\module_demo_main.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
</Groups>
</Target>
</Targets>
<RTE>
<apis/>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.2.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos>
<targetInfo name="WL468"/>
</targetInfos>
</component>
</components>
<files>
<file attr="config" category="sourceAsm" condition="ARMCC" name="Device\ARM\ARMCM0\Source\ARM\startup_ARMCM0.s" version="1.0.0">
<instance index="0" removed="1">RTE\Device\ARMCM0\startup_ARMCM0.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="ARM" Cversion="1.1.0" condition="ARMCM0 CMSIS"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos/>
</file>
<file attr="config" category="sourceC" name="Device\ARM\ARMCM0\Source\system_ARMCM0.c" version="1.0.0">
<instance index="0" removed="1">RTE\Device\ARMCM0\system_ARMCM0.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="ARM" Cversion="1.1.0" condition="ARMCM0 CMSIS"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos/>
</file>
</files>
</RTE>
</Project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
..\..\src\board\board.c -E --c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
-D__UVISION_VERSION="528" -D_RTE_ -DARMCM0
-o .\listings\board.i --list_dir ".\\Listings\\" --list

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave --gnu -o.\objects\board.o --asm_dir=.\Listings\ --list_dir=.\Listings\ --depend=.\objects\board.d --cpu=Cortex-M0 --apcs=interwork -O0 --diag_suppress=9931 -I..\..\src -I..\..\src\board -I..\..\src\common -I..\..\src\sdk\include -I..\..\src\sdk\include\M0 -I..\..\src\app -I..\..\src\app\S8 -I..\..\src\app\touch -I..\..\src\app\module_demo -I..\..\src\app\P8P -I.\RTE\_WL668 -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include -D__MICROLIB -D__UVISION_VERSION=528 -D_RTE_ -DARMCM0 --omf_browse=.\objects\board.crf ..\..\src\board\board.c]
THUMB
AREA ||i.board_Init||, CODE, READONLY, ALIGN=2
board_Init PROC
;;;20 */
;;;21 void board_Init(void)
000000 b510 PUSH {r4,lr}
;;;22 {
;;;23 /* system init ,配置MCU时钟 */
;;;24 hal_system_init(HAL_SYSCLK_80M);
000002 4804 LDR r0,|L1.20|
000004 f7fffffe BL hal_system_init
;;;25
;;;26 /* 使用SWD口作为Debug Log输出,可配置成Uart方式 */
;;;27 tau_log_init(115200, LOG_PORT_UART0);
000008 2100 MOVS r1,#0
00000a 20e1 MOVS r0,#0xe1
00000c 0240 LSLS r0,r0,#9
00000e f7fffffe BL tau_log_init
;;;28
;;;29 /* systick init,根据需要配置 */
;;;30 //hal_system_enable_systick(1);
;;;31 }
000012 bd10 POP {r4,pc}
ENDP
|L1.20|
DCD 0x04c4b400
;*** Start embedded assembler ***
#line 1 "..\\..\\src\\board\\board.c"
AREA ||.rev16_text||, CODE
THUMB
EXPORT |__asm___7_board_c_bcd01269____REV16|
#line 467 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"
|__asm___7_board_c_bcd01269____REV16| PROC
#line 468
rev16 r0, r0
bx lr
ENDP
AREA ||.revsh_text||, CODE
THUMB
EXPORT |__asm___7_board_c_bcd01269____REVSH|
#line 482
|__asm___7_board_c_bcd01269____REVSH| PROC
#line 483
revsh r0, r0
bx lr
ENDP
;*** End embedded assembler ***

View File

@ -0,0 +1,6 @@
..\..\src\app\main.c -E --c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
-D__UVISION_VERSION="528" -D_RTE_ -DARMCM0
-o .\listings\main.i --list_dir ".\\Listings\\" --list

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,84 @@
; generated by Component: ARM Compiler 5.06 update 6 (build 750) Tool: ArmCC [4d3637]
; commandline ArmCC [--c99 --list --split_sections --debug -c --asm --interleave --gnu -o.\objects\main.o --asm_dir=.\Listings\ --list_dir=.\Listings\ --depend=.\objects\main.d --cpu=Cortex-M0 --apcs=interwork -O0 --diag_suppress=9931 -I..\..\src -I..\..\src\board -I..\..\src\common -I..\..\src\sdk\include -I..\..\src\sdk\include\M0 -I..\..\src\app -I..\..\src\app\S8 -I..\..\src\app\touch -I..\..\src\app\module_demo -I..\..\src\app\P8P -I.\RTE\_WL668 -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include -D__MICROLIB -D__UVISION_VERSION=528 -D_RTE_ -DARMCM0 --omf_browse=.\objects\main.crf ..\..\src\app\main.c]
THUMB
AREA ||i.main||, CODE, READONLY, ALIGN=2
main PROC
;;;68 #endif /* __MODULE_DEMO_MAIN_H__ */
;;;9 int main()
000000 f7fffffe BL board_Init
;;;10 {
;;;11 board_Init();
;;;12
;;;13 while (1)
000004 e00b B |L1.30|
|L1.6|
;;;14 {
;;;15 #if _MODULE_DEMO_ENABLE
;;;16 module_demo_main();
;;;17 #endif
;;;18
;;;19
;;;20 #if _DEMO_GOOGLE_P8P_EN
;;;21 google_p8p_demo();
000006 f7fffffe BL google_p8p_demo
;;;22 #endif
;;;23 TAU_LOGD("668 Demo\n");
00000a bf00 NOP
00000c 2317 MOVS r3,#0x17
00000e a204 ADR r2,|L1.32|
000010 a105 ADR r1,|L1.40|
000012 2000 MOVS r0,#0
000014 f7fffffe BL tau_log_printf
000018 bf00 NOP
;;;24 while (1);
00001a bf00 NOP
|L1.28|
00001c e7fe B |L1.28|
|L1.30|
00001e e7f2 B |L1.6|
;;;25 }
;;;26 }
ENDP
|L1.32|
000020 7461755f DCB "tau_log",0
000024 6c6f6700
|L1.40|
000028 5b25735d DCB "[%s] (%04d) 668 Demo\n",0
00002c 20282530
000030 34642920
000034 36363820
000038 44656d6f
00003c 0a00
00003e 00 DCB 0
00003f 00 DCB 0
;*** Start embedded assembler ***
#line 1 "..\\..\\src\\app\\main.c"
AREA ||.rev16_text||, CODE
THUMB
EXPORT |__asm___6_main_c_main____REV16|
#line 467 "C:\\Users\\Markin\\AppData\\Local\\Arm\\Packs\\ARM\\CMSIS\\5.5.1\\CMSIS\\Core\\Include\\cmsis_armcc.h"
|__asm___6_main_c_main____REV16| PROC
#line 468
rev16 r0, r0
bx lr
ENDP
AREA ||.revsh_text||, CODE
THUMB
EXPORT |__asm___6_main_c_main____REVSH|
#line 482
|__asm___6_main_c_main____REVSH| PROC
#line 483
revsh r0, r0
bx lr
ENDP
;*** End embedded assembler ***
__ARM_use_no_argv EQU 0

View File

@ -0,0 +1,6 @@
..\..\src\app\P8P\p8p_demo.c -E --c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
-D__UVISION_VERSION="528" -D_RTE_ -DARMCM0
-o .\listings\p8p_demo.i --list_dir ".\\Listings\\" --list

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,77 @@
<html>
<body>
<pre>
<h1>µVision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: ¦ÌVision V5.28.0.0
Copyright (C) 2019 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: HAHA Markin, HAHA, LIC=VGXG8-3CKFQ-63XMB-246PQ-J4CUG-RTS7K
Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.28.0.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.28.0.0
Dialog DLL: DARMCM1.DLL V1.19.2.0
Target DLL: UL2CM3.DLL V1.162.16.0
Dialog DLL: TARMCM1.DLL V1.14.1.0
<h2>Project:</h2>
D:\Custom\´´ÐÅ\WL668_Pixel 8 Pro_TM667_ICNA3508(RAMLESS)_ CST6656S_OLED\µ÷ÊÔ´úÂë\WL668_GOOGLEP8P_TM667_ICNA3508_OLED_FHD_20240315\WL668_GOOGLEP8P_TM667_ICNA3508_20240306_¼æÈÝ5608\project\WL668\WL668.uvprojx
Project File Date: 04/01/2024
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'WL668'
creating preprocessor file for main.c...
compiling main.c...
creating preprocessor file for p8p_demo.c...
compiling p8p_demo.c...
..\..\src\app\P8P\p8p_demo.c(131): warning: #550-D: variable "sg_exit_idle_mode_flag" was set but never used
static bool sg_exit_idle_mode_flag = false;
..\..\src\app\P8P\p8p_demo.c(134): warning: #177-D: variable "pps_renew_flag" was declared but never referenced
static uint32_t pps_renew_flag = 0;
..\..\src\app\P8P\p8p_demo.c(135): warning: #177-D: variable "pwr_rst_flag" was declared but never referenced
static uint32_t pwr_rst_flag = 0;
..\..\src\app\P8P\p8p_demo.c(149): warning: #177-D: function "app_mipi_rx_start_cb" was declared but never referenced
static void app_mipi_rx_start_cb(void *data);
..\..\src\app\P8P\p8p_demo.c(459): warning: #177-D: variable "reg53_E8_fg" was declared but never referenced
static bool reg53_E8_fg=0;
..\..\src\app\P8P\p8p_demo.c(538): warning: #177-D: function "ap_dcs_set_exit_idle_mode" was declared but never referenced
static bool ap_dcs_set_exit_idle_mode(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
..\..\src\app\P8P\p8p_demo.c(563): warning: #177-D: function "soft_te_timer_init" was declared but never referenced
static void soft_te_timer_init()
..\..\src\app\P8P\p8p_demo.c: 7 warnings, 0 errors
creating preprocessor file for board.c...
compiling board.c...
assembling startup_ARMCM0.s...
linking...
Program Size: Code=37316 RO-data=9156 RW-data=1040 ZI-data=11608
FromELF: creating hex file...
After Build - User command #1: fromelf --bin -o .\Objects\WL668_P8P_TM667_ICNA3508_20240401.bin .\Objects\WL668_P8P_TM667_ICNA3508_20240401.axf
".\Objects\WL668_P8P_TM667_ICNA3508_20240401.axf" - 0 Error(s), 7 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.5.1.pack
ARM.CMSIS.5.5.1
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.2.0
<h2>Collection of Component include folders:</h2>
.\RTE\_WL668
C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.2.0
Build Time Elapsed: 00:00:02
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
--cpu Cortex-M0
".\objects\main.o"
".\objects\p8p_demo.o"
"..\..\src\sdk\CVWL668\lib\CVWL668.lib"
".\objects\board.o"
".\objects\startup_armcm0.o"
--library_type=microlib --strict --scatter ".\Objects\WL668_P8P_TM667_ICNA3508_20240401.sct"
--summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list ".\Listings\WL668_P8P_TM667_ICNA3508_20240401.map" -o .\Objects\WL668_P8P_TM667_ICNA3508_20240401.axf

View File

@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM2 0x00010000 0x00010000 { ; load region size_region
ER_IROM2 0x00010000 0x00010000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x00070000 0x00008000 { ; RW data
.ANY (+RW +ZI)
}
}

View File

@ -0,0 +1,79 @@
<html>
<body>
<pre>
<h1>µVision Build Log</h1>
<h2>Tool Versions:</h2>
IDE-Version: ¦ÌVision V5.28.0.0
Copyright (C) 2019 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: HAHA Markin, HAHA, LIC=VGXG8-3CKFQ-63XMB-246PQ-J4CUG-RTS7K
Tool Versions:
Toolchain: MDK-ARM Plus Version: 5.28.0.0
Toolchain Path: C:\Keil_v5\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 6 (build 750)
Assembler: Armasm.exe V5.06 update 6 (build 750)
Linker/Locator: ArmLink.exe V5.06 update 6 (build 750)
Library Manager: ArmAr.exe V5.06 update 6 (build 750)
Hex Converter: FromElf.exe V5.06 update 6 (build 750)
CPU DLL: SARMCM3.DLL V5.28.0.0
Dialog DLL: DARMCM1.DLL V1.19.2.0
Target DLL: UL2CM3.DLL V1.162.16.0
Dialog DLL: TARMCM1.DLL V1.14.1.0
<h2>Project:</h2>
D:\Custom\´´ÐÅ\WL668_Pixel 8 Pro_TM667_ICNA3508(RAMLESS)_ CST6656S_OLED\µ÷ÊÔ´úÂë\WL668_GOOGLEP8P_TM667_ICNA3508_OLED_FHD_20240315\WL668_GOOGLEP8P_TM667_ICNA3508_20240306_¼æÈÝ5608\project\WL668\WL668.uvprojx
Project File Date: 04/07/2024
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'WL668'
creating preprocessor file for main.c...
compiling main.c...
creating preprocessor file for p8p_demo.c...
compiling p8p_demo.c...
..\..\src\app\P8P\p8p_demo.c(473): warning: #186-D: pointless comparison of unsigned integer with zero
if((rd_51_val >=0x00)&&(rd_51_val <= 0xFFF) ){
..\..\src\app\P8P\p8p_demo.c(131): warning: #550-D: variable "sg_exit_idle_mode_flag" was set but never used
static bool sg_exit_idle_mode_flag = false;
..\..\src\app\P8P\p8p_demo.c(134): warning: #177-D: variable "pps_renew_flag" was declared but never referenced
static uint32_t pps_renew_flag = 0;
..\..\src\app\P8P\p8p_demo.c(135): warning: #177-D: variable "pwr_rst_flag" was declared but never referenced
static uint32_t pwr_rst_flag = 0;
..\..\src\app\P8P\p8p_demo.c(149): warning: #177-D: function "app_mipi_rx_start_cb" was declared but never referenced
static void app_mipi_rx_start_cb(void *data);
..\..\src\app\P8P\p8p_demo.c(459): warning: #177-D: variable "reg53_E8_fg" was declared but never referenced
static bool reg53_E8_fg=0;
..\..\src\app\P8P\p8p_demo.c(533): warning: #177-D: function "ap_dcs_set_exit_idle_mode" was declared but never referenced
static bool ap_dcs_set_exit_idle_mode(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
..\..\src\app\P8P\p8p_demo.c(558): warning: #177-D: function "soft_te_timer_init" was declared but never referenced
static void soft_te_timer_init()
..\..\src\app\P8P\p8p_demo.c: 8 warnings, 0 errors
creating preprocessor file for board.c...
compiling board.c...
assembling startup_ARMCM0.s...
linking...
Program Size: Code=37772 RO-data=9272 RW-data=1048 ZI-data=11632
FromELF: creating hex file...
After Build - User command #1: fromelf --bin -o .\Objects\WL668_P8P_TM667_ICNA3508_20240407.bin .\Objects\WL668_P8P_TM667_ICNA3508_20240407.axf
".\Objects\WL668_P8P_TM667_ICNA3508_20240407.axf" - 0 Error(s), 8 Warning(s).
<h2>Software Packages used:</h2>
Package Vendor: ARM
http://www.keil.com/pack/ARM.CMSIS.5.5.1.pack
ARM.CMSIS.5.5.1
CMSIS (Cortex Microcontroller Software Interface Standard)
* Component: CORE Version: 5.2.0
<h2>Collection of Component include folders:</h2>
.\RTE\_WL668
C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.2.0
Build Time Elapsed: 00:00:02
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,10 @@
--cpu Cortex-M0
".\objects\main.o"
".\objects\p8p_demo.o"
"..\..\src\sdk\CVWL668\lib\CVWL668.lib"
".\objects\board.o"
".\objects\startup_armcm0.o"
--library_type=microlib --strict --scatter ".\Objects\WL668_P8P_TM667_ICNA3508_20240407.sct"
--summary_stderr --info summarysizes --map --load_addr_map_info --xref --callgraph --symbols
--info sizes --info totals --info unused --info veneers
--list ".\Listings\WL668_P8P_TM667_ICNA3508_20240407.map" -o .\Objects\WL668_P8P_TM667_ICNA3508_20240407.axf

View File

@ -0,0 +1,16 @@
; *************************************************************
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM2 0x00010000 0x00010000 { ; load region size_region
ER_IROM2 0x00010000 0x00010000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
.ANY (+XO)
}
RW_IRAM1 0x00070000 0x00008000 { ; RW data
.ANY (+RW +ZI)
}
}

View File

@ -0,0 +1,70 @@
Dependencies for Project 'WL668', Target 'WL668': (DO NOT MODIFY !)
F (..\..\src\app\main.c)(0x660A99AE)(--c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\Listings\\" -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P -I.\RTE\_WL668 -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include -D__UVISION_VERSION="528" -D_RTE_ -DARMCM0 -o .\objects\main.o --list_dir ".\\Listings\\" --list --omf_browse .\objects\main.crf --depend .\objects\main.d)
I (C:\Keil_v5\ARM\ARMCC\include\stdio.h)(0x5CEB79E2)
I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5CEB79E2)
I (C:\Keil_v5\ARM\ARMCC\include\stdlib.h)(0x5CEB79E2)
I (..\..\src\app\test_cfg_global.h)(0x660A9B22)
I (..\..\src\app\P8P\p8p_demo.h)(0x660A9B17)
I (..\..\src\common\tau_log.h)(0x65E142C4)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5CEB79E2)
I (C:\Keil_v5\ARM\ARMCC\include\stdarg.h)(0x5CEB79E4)
I (..\..\src\sdk\include\M0\ArmCM0.h)(0x65E142C4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\core_cm0.h)(0x5C8B5FF6)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_version.h)(0x5B971444)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_compiler.h)(0x5C8F4DD4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_armcc.h)(0x5C8F4DD4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include\system_ARMCM0.h)(0x5BBD6B7A)
I (..\..\src\sdk\include\hal_system.h)(0x65E142C4)
I (..\..\src\common\tau_common.h)(0x65E142C4)
I (C:\Keil_v5\ARM\ARMCC\include\math.h)(0x5CEB79D6)
I (..\..\src\sdk\include\hal_gpio.h)(0x65E142C4)
I (..\..\src\common\tau_device_datatype.h)(0x65E142C4)
I (..\..\src\board\board.h)(0x65E142C4)
I (..\..\src\app\module_demo\module_demo_main.h)(0x6513C194)
F (..\..\src\app\P8P\p8p_demo.c)(0x6614B87F)(--c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\Listings\\" -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P -I.\RTE\_WL668 -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include -D__UVISION_VERSION="528" -D_RTE_ -DARMCM0 -o .\objects\p8p_demo.o --list_dir ".\\Listings\\" --list --omf_browse .\objects\p8p_demo.crf --depend .\objects\p8p_demo.d)
I (..\..\src\app\P8P\p8p_demo.h)(0x660A9B17)
I (..\..\src\sdk\include\M0\ArmCM0.h)(0x65E142C4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\core_cm0.h)(0x5C8B5FF6)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5CEB79E2)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_version.h)(0x5B971444)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_compiler.h)(0x5C8F4DD4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_armcc.h)(0x5C8F4DD4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include\system_ARMCM0.h)(0x5BBD6B7A)
I (..\..\src\common\tau_device_datatype.h)(0x65E142C4)
I (..\..\src\common\tau_common.h)(0x65E142C4)
I (C:\Keil_v5\ARM\ARMCC\include\math.h)(0x5CEB79D6)
I (..\..\src\common\tau_log.h)(0x65E142C4)
I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5CEB79E2)
I (C:\Keil_v5\ARM\ARMCC\include\stdarg.h)(0x5CEB79E4)
I (..\..\src\common\tau_operations.h)(0x65E142C4)
I (..\..\src\common\tau_delay.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_dsi_rx_ctrl.h)(0x65E142C4)
I (..\..\src\common\tau_dsi_datatype.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_dsi_tx_ctrl.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_gpio.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_swire.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_timer.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_system.h)(0x65E142C4)
I (..\..\src\app\test_cfg_global.h)(0x660A9B22)
I (..\..\src\sdk\include\hal_pwr.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_pwm.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_crc.h)(0x65E6BB1A)
F (..\..\src\sdk\CVWL668\lib\CVWL668.lib)(0x65E142A8)()
F (..\..\src\board\board.c)(0x66120E49)(--c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\Listings\\" -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P -I.\RTE\_WL668 -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include -D__UVISION_VERSION="528" -D_RTE_ -DARMCM0 -o .\objects\board.o --list_dir ".\\Listings\\" --list --omf_browse .\objects\board.crf --depend .\objects\board.d)
I (..\..\src\board\board.h)(0x65E142C4)
I (..\..\src\sdk\include\hal_system.h)(0x65E142C4)
I (..\..\src\common\tau_common.h)(0x65E142C4)
I (C:\Keil_v5\ARM\ARMCC\include\stdint.h)(0x5CEB79E2)
I (C:\Keil_v5\ARM\ARMCC\include\math.h)(0x5CEB79D6)
I (..\..\src\sdk\include\hal_gpio.h)(0x65E142C4)
I (..\..\src\common\tau_device_datatype.h)(0x65E142C4)
I (..\..\src\common\tau_log.h)(0x65E142C4)
I (C:\Keil_v5\ARM\ARMCC\include\string.h)(0x5CEB79E2)
I (C:\Keil_v5\ARM\ARMCC\include\stdarg.h)(0x5CEB79E4)
I (..\..\src\sdk\include\M0\ArmCM0.h)(0x65E142C4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\core_cm0.h)(0x5C8B5FF6)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_version.h)(0x5B971444)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_compiler.h)(0x5C8F4DD4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_armcc.h)(0x5C8F4DD4)
I (C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include\system_ARMCM0.h)(0x5BBD6B7A)
F (..\..\src\board\startup\startup_ARMCM0.s)(0x65E142C4)(--cpu Cortex-M0 --li -g --apcs=interwork --pd "__MICROLIB SETA 1" -I.\RTE\_WL668 -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include -IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include --pd "__UVISION_VERSION SETA 528" --pd "_RTE_ SETA 1" --pd "ARMCM0 SETA 1" --list .\listings\startup_armcm0.lst --xref -o .\objects\startup_armcm0.o --depend .\objects\startup_armcm0.d)

View File

@ -0,0 +1,6 @@
--c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\Listings\\" -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
-D__UVISION_VERSION="528" -D_RTE_ -DARMCM0
-o .\objects\board.o --list_dir ".\\Listings\\" --list --omf_browse .\objects\board.crf --depend .\objects\board.d "..\..\src\board\board.c"

Binary file not shown.

View File

@ -0,0 +1,17 @@
.\objects\board.o: ..\..\src\board\board.c
.\objects\board.o: ..\..\src\board\board.h
.\objects\board.o: ..\..\src\sdk\include\hal_system.h
.\objects\board.o: ..\..\src\common\tau_common.h
.\objects\board.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\board.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\board.o: ..\..\src\sdk\include\hal_gpio.h
.\objects\board.o: ..\..\src\common\tau_device_datatype.h
.\objects\board.o: ..\..\src\common\tau_log.h
.\objects\board.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\board.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdarg.h
.\objects\board.o: ..\..\src\sdk\include\M0\ArmCM0.h
.\objects\board.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\core_cm0.h
.\objects\board.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_version.h
.\objects\board.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_compiler.h
.\objects\board.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_armcc.h
.\objects\board.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include\system_ARMCM0.h

Binary file not shown.

View File

@ -0,0 +1,6 @@
--c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\Listings\\" -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
-D__UVISION_VERSION="528" -D_RTE_ -DARMCM0
-o .\objects\main.o --list_dir ".\\Listings\\" --list --omf_browse .\objects\main.crf --depend .\objects\main.d "..\..\src\app\main.c"

Binary file not shown.

View File

@ -0,0 +1,22 @@
.\objects\main.o: ..\..\src\app\main.c
.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdio.h
.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdlib.h
.\objects\main.o: ..\..\src\app\test_cfg_global.h
.\objects\main.o: ..\..\src\app\P8P\p8p_demo.h
.\objects\main.o: ..\..\src\common\tau_log.h
.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdarg.h
.\objects\main.o: ..\..\src\sdk\include\M0\ArmCM0.h
.\objects\main.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\core_cm0.h
.\objects\main.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_version.h
.\objects\main.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_compiler.h
.\objects\main.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_armcc.h
.\objects\main.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include\system_ARMCM0.h
.\objects\main.o: ..\..\src\sdk\include\hal_system.h
.\objects\main.o: ..\..\src\common\tau_common.h
.\objects\main.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\main.o: ..\..\src\sdk\include\hal_gpio.h
.\objects\main.o: ..\..\src\common\tau_device_datatype.h
.\objects\main.o: ..\..\src\board\board.h
.\objects\main.o: ..\..\src\app\module_demo\module_demo_main.h

Binary file not shown.

View File

@ -0,0 +1,6 @@
--c99 --gnu -c --cpu Cortex-M0 -D__MICROLIB --li -g -O0 --apcs=interwork --split_sections --asm --interleave --asm_dir ".\\Listings\\" -I ..\..\src -I ..\..\src\board -I ..\..\src\common -I ..\..\src\sdk\include -I ..\..\src\sdk\include\M0 -I ..\..\src\app -I ..\..\src\app\S8 -I ..\..\src\app\touch -I ..\..\src\app\module_demo -I ..\..\src\app\P8P
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
-D__UVISION_VERSION="528" -D_RTE_ -DARMCM0
-o .\objects\p8p_demo.o --list_dir ".\\Listings\\" --list --omf_browse .\objects\p8p_demo.crf --depend .\objects\p8p_demo.d "..\..\src\app\P8P\p8p_demo.c"

Binary file not shown.

View File

@ -0,0 +1,28 @@
.\objects\p8p_demo.o: ..\..\src\app\P8P\p8p_demo.c
.\objects\p8p_demo.o: ..\..\src\app\P8P\p8p_demo.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\M0\ArmCM0.h
.\objects\p8p_demo.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\core_cm0.h
.\objects\p8p_demo.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdint.h
.\objects\p8p_demo.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_version.h
.\objects\p8p_demo.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_compiler.h
.\objects\p8p_demo.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include\cmsis_armcc.h
.\objects\p8p_demo.o: C:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include\system_ARMCM0.h
.\objects\p8p_demo.o: ..\..\src\common\tau_device_datatype.h
.\objects\p8p_demo.o: ..\..\src\common\tau_common.h
.\objects\p8p_demo.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\math.h
.\objects\p8p_demo.o: ..\..\src\common\tau_log.h
.\objects\p8p_demo.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\string.h
.\objects\p8p_demo.o: C:\Keil_v5\ARM\ARMCC\Bin\..\include\stdarg.h
.\objects\p8p_demo.o: ..\..\src\common\tau_operations.h
.\objects\p8p_demo.o: ..\..\src\common\tau_delay.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_dsi_rx_ctrl.h
.\objects\p8p_demo.o: ..\..\src\common\tau_dsi_datatype.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_dsi_tx_ctrl.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_gpio.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_swire.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_timer.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_system.h
.\objects\p8p_demo.o: ..\..\src\app\test_cfg_global.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_pwr.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_pwm.h
.\objects\p8p_demo.o: ..\..\src\sdk\include\hal_crc.h

Binary file not shown.

View File

@ -0,0 +1,6 @@
--cpu Cortex-M0 --li -g --apcs=interwork --pd "__MICROLIB SETA 1"
-I.\RTE\_WL668
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\CMSIS\Core\Include
-IC:\Users\Markin\AppData\Local\Arm\Packs\ARM\CMSIS\5.5.1\Device\ARM\ARMCM0\Include
--pd "__UVISION_VERSION SETA 528" --pd "_RTE_ SETA 1" --pd "ARMCM0 SETA 1"
--list .\listings\startup_armcm0.lst --xref -o .\objects\startup_armcm0.o --depend .\objects\startup_armcm0.d "..\..\src\board\startup\startup_ARMCM0.s"

View File

@ -0,0 +1 @@
.\objects\startup_armcm0.o: ..\..\src\board\startup\startup_ARMCM0.s

Binary file not shown.

View File

@ -0,0 +1,21 @@
/*
* Auto generated Run-Time-Environment Configuration File
* *** Do not modify ! ***
*
* Project: 'WL668'
* Target: 'WL668'
*/
#ifndef RTE_COMPONENTS_H
#define RTE_COMPONENTS_H
/*
* Define the Device Header File:
*/
#define CMSIS_device_header "ARMCM0.h"
#endif /* RTE_COMPONENTS_H */

15
project/WL668/WL668.BAT Normal file
View File

@ -0,0 +1,15 @@
SET PATH=C:\Keil_v5\ARM\ARMCC\Bin;C:\Program Files (x86)\VMware\VMware Workstation\bin\;C:\Program Files\ImageMagick-7.1.0-Q16-HDRI;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Tools\;C:\Program Files\nodejs\;D:\Tools\platform-tools;%Android%;C:\Program Files\Git\cmd;C:\Users\Markin\AppData\Local\Programs\Python\Python312\Scripts\;C:\Users\Markin\AppData\Local\Programs\Python\Python312\;C:\Program Files\MySQL\MySQL Shell 8.0\bin\;C:\Users\Markin\AppData\Local\Microsoft\WindowsApps;C:\Users\Markin\AppData\Roaming\npm;D:\Tools\platform-tools_r34.0.1-windows\platform-tools;C:\Users\Markin\AppData\Local\Programs\Microsoft VS Code\bin
SET CPU_TYPE=ARMCM0
SET CPU_VENDOR=ARM
SET UV2_TARGET=WL668
SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via "listings\main._ip"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\main.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via "listings\p8p_demo._ip"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\p8p_demo.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via "listings\board._ip"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\board.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmAsm" --Via ".\objects\startup_armcm0._ia"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmLink" --Via ".\Objects\WL668_P8P_TM667_ICNA3508_20240407.lnp"
"C:\Keil_v5\ARM\ARMCC\Bin\fromelf.exe" ".\Objects\WL668_P8P_TM667_ICNA3508_20240407.axf" --i32combined --output ".\Objects\WL668_P8P_TM667_ICNA3508_20240407.hex"
fromelf --bin -o .\Objects\WL668_P8P_TM667_ICNA3508_20240407.bin .\Objects\WL668_P8P_TM667_ICNA3508_20240407.axf

File diff suppressed because one or more lines are too long

272
project/WL668/WL668.uvoptx Normal file
View File

@ -0,0 +1,272 @@
<?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</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>WL668</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>7</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>0</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>0</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>app</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>..\..\src\app\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\P8P\p8p_demo.c</PathWithFileName>
<FilenameWithoutPath>p8p_demo.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>driver</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\sdk\CVWL668\lib\CVWL668.lib</PathWithFileName>
<FilenameWithoutPath>CVWL668.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>board</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\board\board.c</PathWithFileName>
<FilenameWithoutPath>board.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>startup</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\board\startup\startup_ARMCM0.s</PathWithFileName>
<FilenameWithoutPath>startup_ARMCM0.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>

461
project/WL668/WL668.uvprojx Normal file
View File

@ -0,0 +1,461 @@
<?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>WL668</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pArmCC>5060750::V5.06 update 6 (build 750)::ARMCC</pArmCC>
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>ARMCM0</Device>
<Vendor>ARM</Vendor>
<PackID>ARM.CMSIS.5.5.1</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ESEL ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:ARMCM0$Device\ARM\ARMCM0\Include\ARMCM0.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile></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>WL668_P8P_TM667_ICNA3508_20240407</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>1</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>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin -o .\Objects\@L.bin .\Objects\@L.axf</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>SARMCM3.DLL</SimDllName>
<SimDllArguments> </SimDllArguments>
<SimDlgDll>DARMCM1.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM0</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments> </TargetDllArguments>
<TargetDlgDll>TARMCM1.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM0</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>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></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-M0"</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>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>16</StupSel>
<useUlib>1</useUlib>
<EndSel>1</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>4</RoSelD>
<RwSelD>3</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>0</Ir1Chk>
<Ir2Chk>1</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>0x20000</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>0x2000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x10000</StartAddress>
<Size>0x10000</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>0x70000</StartAddress>
<Size>0x8000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>1</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>2</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
<uGnu>1</uGnu>
<useXO>0</useXO>
<v6Lang>1</v6Lang>
<v6LangP>1</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\..\src;..\..\src\board;..\..\src\common;..\..\src\sdk\include;..\..\src\sdk\include\M0;..\..\src\app;..\..\src\app\S8;..\..\src\app\touch;..\..\src\app\module_demo;..\..\src\app\P8P</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>0</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<uClangAs>0</uClangAs>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x00000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>app</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\main.c</FilePath>
</File>
<File>
<FileName>p8p_demo.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\P8P\p8p_demo.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>driver</GroupName>
<Files>
<File>
<FileName>CVWL668.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\src\sdk\CVWL668\lib\CVWL668.lib</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>board</GroupName>
<Files>
<File>
<FileName>board.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\board\board.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>startup</GroupName>
<Files>
<File>
<FileName>startup_ARMCM0.s</FileName>
<FileType>2</FileType>
<FilePath>..\..\src\board\startup\startup_ARMCM0.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
</Groups>
</Target>
</Targets>
<RTE>
<apis/>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.2.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos>
<targetInfo name="WL668"/>
</targetInfos>
</component>
</components>
<files>
<file attr="config" category="sourceAsm" condition="ARMCC" name="Device\ARM\ARMCM0\Source\ARM\startup_ARMCM0.s" version="1.0.0">
<instance index="0" removed="1">RTE\Device\ARMCM0\startup_ARMCM0.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="ARM" Cversion="1.1.0" condition="ARMCM0 CMSIS"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos/>
</file>
<file attr="config" category="sourceC" name="Device\ARM\ARMCM0\Source\system_ARMCM0.c" version="1.0.0">
<instance index="0" removed="1">RTE\Device\ARMCM0\system_ARMCM0.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="ARM" Cversion="1.1.0" condition="ARMCM0 CMSIS"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos/>
</file>
</files>
</RTE>
</Project>

View File

@ -0,0 +1,472 @@
<?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</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>WL668T</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>7</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>0</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>BIN\UL2CM3.DLL</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2CM3</Key>
<Name>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint/>
<Tracepoint>
<THDelay>0</THDelay>
</Tracepoint>
<DebugFlag>
<trace>0</trace>
<periodic>0</periodic>
<aLwin>0</aLwin>
<aCover>0</aCover>
<aSer1>0</aSer1>
<aSer2>0</aSer2>
<aPa>0</aPa>
<viewmode>0</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>app</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>..\..\src\app\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\touch\app_tp_transfer.c</PathWithFileName>
<FilenameWithoutPath>app_tp_transfer.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\S8\app_tp_for_custom_s8.c</PathWithFileName>
<FilenameWithoutPath>app_tp_for_custom_s8.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\S8\s8_demo.c</PathWithFileName>
<FilenameWithoutPath>s8_demo.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\Mi12Lite\Mi12Lite.c</PathWithFileName>
<FilenameWithoutPath>Mi12Lite.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>driver</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>4</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\sdk\CVWL668T\lib\CVWL668T.lib</PathWithFileName>
<FilenameWithoutPath>CVWL668T.lib</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>board</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\board\board.c</PathWithFileName>
<FilenameWithoutPath>board.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>startup</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\board\startup\startup_ARMCM0.s</PathWithFileName>
<FilenameWithoutPath>startup_ARMCM0.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>modules_demo</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_crc.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_crc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_dsi_rx.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_dsi_rx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_dsi_tx.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_dsi_tx.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_flash.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_flash.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_gpio.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_gpio.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>14</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_i2c.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_i2c.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_spi.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_spi.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\demo_hal_pwm.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_pwm.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>..\..\src\app\module_demo\demo_hal_pwr.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_pwr.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>..\..\src\app\module_demo\demo_hal_swire.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_swire.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>..\..\src\app\module_demo\demo_hal_uart.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_uart.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>..\..\src\app\module_demo\demo_hal_wdg.c</PathWithFileName>
<FilenameWithoutPath>demo_hal_wdg.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\src\app\module_demo\module_demo_main.c</PathWithFileName>
<FilenameWithoutPath>module_demo_main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>

View File

@ -0,0 +1,546 @@
<?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>WL668T</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pArmCC>5060750::V5.06 update 6 (build 750)::ARMCC</pArmCC>
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
<uAC6>0</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>ARMCM0</Device>
<Vendor>ARM</Vendor>
<PackID>ARM.CMSIS.5.5.1</PackID>
<PackURL>http://www.keil.com/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x00020000) IROM(0x00000000,0x00040000) CPUTYPE("Cortex-M0") CLOCK(12000000) ESEL ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000)</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:ARMCM0$Device\ARM\ARMCM0\Include\ARMCM0.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile></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>WL668T_demo</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>1</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>1</RunUserProg1>
<RunUserProg2>0</RunUserProg2>
<UserProg1Name>fromelf --bin -o .\Objects\@L.bin .\Objects\@L.axf</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>SARMCM3.DLL</SimDllName>
<SimDllArguments> </SimDllArguments>
<SimDlgDll>DARMCM1.DLL</SimDlgDll>
<SimDlgDllArguments>-pCM0</SimDlgDllArguments>
<TargetDllName>SARMCM3.DLL</TargetDllName>
<TargetDllArguments> </TargetDllArguments>
<TargetDlgDll>TARMCM1.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM0</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>4096</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3>
<Flash4></Flash4>
<pFcarmOut></pFcarmOut>
<pFcarmGrp></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-M0"</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>
<hadIRAM2>0</hadIRAM2>
<hadIROM2>0</hadIROM2>
<StupSel>16</StupSel>
<useUlib>1</useUlib>
<EndSel>1</EndSel>
<uLtcg>0</uLtcg>
<nSecure>0</nSecure>
<RoSelD>4</RoSelD>
<RwSelD>3</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>0</Ir1Chk>
<Ir2Chk>1</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>0x20000</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>0x2000</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>1</Type>
<StartAddress>0x10000</StartAddress>
<Size>0x10000</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>0x70000</StartAddress>
<Size>0x8000</Size>
</OCR_RVCT9>
<OCR_RVCT10>
<Type>0</Type>
<StartAddress>0x0</StartAddress>
<Size>0x0</Size>
</OCR_RVCT10>
</OnChipMemories>
<RvctStartVector></RvctStartVector>
</ArmAdsMisc>
<Cads>
<interw>1</interw>
<Optim>1</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>2</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>1</uC99>
<uGnu>1</uGnu>
<useXO>0</useXO>
<v6Lang>1</v6Lang>
<v6LangP>1</v6LangP>
<vShortEn>1</vShortEn>
<vShortWch>1</vShortWch>
<v6Lto>0</v6Lto>
<v6WtE>0</v6WtE>
<v6Rtti>0</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath>..\..\src;..\..\src\board;..\..\src\common;..\..\src\sdk\include;..\..\src\sdk\include\M0;..\..\src\app;..\..\src\app\S8;..\..\src\app\touch;..\..\src\app\module_demo;..\..\src\app\Mi12Lite</IncludePath>
</VariousControls>
</Cads>
<Aads>
<interw>1</interw>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<thumb>0</thumb>
<SplitLS>0</SplitLS>
<SwStkChk>0</SwStkChk>
<NoWarn>0</NoWarn>
<uSurpInc>0</uSurpInc>
<useXO>0</useXO>
<uClangAs>0</uClangAs>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Aads>
<LDads>
<umfTarg>1</umfTarg>
<Ropi>0</Ropi>
<Rwpi>0</Rwpi>
<noStLib>0</noStLib>
<RepFail>1</RepFail>
<useFile>0</useFile>
<TextAddressRange>0x00000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile></ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>app</GroupName>
<Files>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\main.c</FilePath>
</File>
<File>
<FileName>app_tp_transfer.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\touch\app_tp_transfer.c</FilePath>
</File>
<File>
<FileName>app_tp_for_custom_s8.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\S8\app_tp_for_custom_s8.c</FilePath>
</File>
<File>
<FileName>s8_demo.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\S8\s8_demo.c</FilePath>
</File>
<File>
<FileName>Mi12Lite.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\Mi12Lite\Mi12Lite.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>driver</GroupName>
<Files>
<File>
<FileName>CVWL668T.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\src\sdk\CVWL668T\lib\CVWL668T.lib</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>board</GroupName>
<Files>
<File>
<FileName>board.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\board\board.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>startup</GroupName>
<Files>
<File>
<FileName>startup_ARMCM0.s</FileName>
<FileType>2</FileType>
<FilePath>..\..\src\board\startup\startup_ARMCM0.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>modules_demo</GroupName>
<Files>
<File>
<FileName>demo_hal_crc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_crc.c</FilePath>
</File>
<File>
<FileName>demo_hal_dsi_rx.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_dsi_rx.c</FilePath>
</File>
<File>
<FileName>demo_hal_dsi_tx.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_dsi_tx.c</FilePath>
</File>
<File>
<FileName>demo_hal_flash.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_flash.c</FilePath>
</File>
<File>
<FileName>demo_hal_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_gpio.c</FilePath>
</File>
<File>
<FileName>demo_hal_i2c.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_i2c.c</FilePath>
</File>
<File>
<FileName>demo_hal_spi.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_spi.c</FilePath>
</File>
<File>
<FileName>demo_hal_pwm.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_pwm.c</FilePath>
</File>
<File>
<FileName>demo_hal_pwr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_pwr.c</FilePath>
</File>
<File>
<FileName>demo_hal_swire.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_swire.c</FilePath>
</File>
<File>
<FileName>demo_hal_uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_uart.c</FilePath>
</File>
<File>
<FileName>demo_hal_wdg.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\demo_hal_wdg.c</FilePath>
</File>
<File>
<FileName>module_demo_main.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\src\app\module_demo\module_demo_main.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
</Group>
</Groups>
</Target>
</Targets>
<RTE>
<apis/>
<components>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.2.0" condition="ARMv6_7_8-M Device">
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos>
<targetInfo name="WL668T"/>
</targetInfos>
</component>
</components>
<files>
<file attr="config" category="sourceAsm" condition="ARMCC" name="Device\ARM\ARMCM0\Source\ARM\startup_ARMCM0.s" version="1.0.0">
<instance index="0" removed="1">RTE\Device\ARMCM0\startup_ARMCM0.s</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="ARM" Cversion="1.1.0" condition="ARMCM0 CMSIS"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos/>
</file>
<file attr="config" category="sourceC" name="Device\ARM\ARMCM0\Source\system_ARMCM0.c" version="1.0.0">
<instance index="0" removed="1">RTE\Device\ARMCM0\system_ARMCM0.c</instance>
<component Cclass="Device" Cgroup="Startup" Cvendor="ARM" Cversion="1.1.0" condition="ARMCM0 CMSIS"/>
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.5.1"/>
<targetInfos/>
</file>
</files>
</RTE>
</Project>

View File

@ -0,0 +1,11 @@
1. 此目录下所有project文件仅为链接文件使用宏定义和库文件区分
2. 强烈建议将不使用的芯片型号文件夹删除,仅保留使用的芯片型号文件夹,以免串烧导致芯片烧坏
3. 如若更换芯片仅需将提供的原工程下特定型号文件夹拷贝到模板工程删除原芯片project下原型号文件夹重新编译即可
如原来使用668芯片后面更换为668T芯片仅需把客户工程project下668文件夹删除重新从提供的源工程下的668T文件夹拷贝到客户工程project下打开重新编译即可
SDK每次更新会在demo.c中增加代码或注释请自行阅读。
第三代产品包括WL668,668T,468

2000
src/app/P8P/p8p_demo.c Normal file

File diff suppressed because it is too large Load Diff

21
src/app/P8P/p8p_demo.h Normal file
View File

@ -0,0 +1,21 @@
/*******************************************************************************
* Copyright (C) 2019-2022, TAU Systems (R),All Rights Reserved.
*
* File: P8P.h
* Description GOOGLE P8P DEMO file
* Version V0.1
* Date 2023-12-25
* Author Markin
*******************************************************************************/
#ifndef __GOOGLE_P8P_DEMO_H__
#define __GOOGLE_P8P_DEMO_H__
#define PANEL_INIT_CODE_ARRAY 1
#define DDIC_FPS_SETTING 1
void google_p8p_demo(void);
#endif

View File

@ -0,0 +1,288 @@
/*******************************************************************************
*
* File: draw_mode_lib.c
* Description 线
* Version V0.1
* Date 2022-6-21
* Author Tempest
*******************************************************************************/
#include "tau_log.h"
#include "tau_operations.h"
#include "tau_common.h"
#include "tau_delay.h"
#include "hal_dsi_rx_ctrl.h"
#define FONT_SIZE 50 //如需要显示其他字体大小,按照新的大小重新取模后更新到字库并修改该宏即可
/*
*使pctolcd2002
*:&=50;:;:;:;:=16,=8;
*
*
*/static const unsigned char font_50x50[][FONT_SIZE * FONT_SIZE] =
{
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF,
0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x7E, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x03, 0xF8, 0xC0, 0x00, 0x00,
0x7C, 0x00, 0x1F, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x3F, 0xC0, 0x00, 0x00, 0x00, 0x40, 0x00,
0x1F, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0C, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x08, 0x00,
0x04, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00,
0xF0, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x07, 0xE0, 0x00, 0x00, 0x00, 0x07, 0xC0, 0x3F, 0x80, 0x00,
0x00, 0x00, 0x1F, 0x01, 0xFE, 0x00, 0x10, 0x00, 0x00, 0xFE, 0x01, 0xF8, 0x00, 0x10, 0x00, 0x07,
0xFC, 0x00, 0xE0, 0x00, 0x10, 0x00, 0x1F, 0xE4, 0x00, 0x40, 0x00, 0x18, 0x00, 0x1F, 0x84, 0x00,
0x00, 0x00, 0x1C, 0x00, 0x0E, 0x04, 0x00, 0x00, 0x00, 0x1C, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00,
0x1F, 0x00, 0x04, 0x04, 0x80, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x04, 0x7F, 0xFF, 0xFF, 0xFE, 0x00,
0x00, 0x04, 0x7F, 0xFF, 0xFF, 0xFC, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x60, 0x00, 0x00,
0x00, 0x00, 0x04, 0x10, 0x30, 0x00, 0x00, 0x00, 0x00, 0x04, 0x60, 0x1C, 0x00, 0x00, 0x00, 0x00,
0x05, 0xC0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x80, 0x07, 0xC0, 0x00, 0x00, 0x00, 0x1F, 0x00,
0x03, 0xF0, 0x00, 0x00, 0x00, 0x1E, 0x00, 0x01, 0xFE, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x7F,
0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*"你"0*/
},
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x04, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x0C, 0x00, 0x00, 0x01, 0x00, 0x07, 0xC0, 0x18,
0x00, 0x00, 0x01, 0x00, 0x7F, 0xC0, 0x10, 0x00, 0x00, 0x01, 0x07, 0xFE, 0x40, 0x30, 0x00, 0x00,
0x01, 0xFF, 0xE0, 0x20, 0x60, 0x00, 0x00, 0x1F, 0xFE, 0x00, 0x20, 0xC0, 0x00, 0x1F, 0xFF, 0xE0,
0x00, 0x21, 0x80, 0x00, 0x1F, 0xFF, 0x00, 0x00, 0x17, 0x80, 0x00, 0x0F, 0xC1, 0x00, 0x00, 0x1F,
0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x7C, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, 0xF8, 0x00, 0x00,
0x00, 0x01, 0x00, 0x3F, 0xEC, 0x00, 0x00, 0x00, 0x01, 0x07, 0xFF, 0x0E, 0x00, 0x00, 0x00, 0x03,
0xFF, 0xF8, 0x0F, 0x00, 0x00, 0x00, 0x07, 0xFF, 0x80, 0x07, 0x80, 0x00, 0x00, 0x03, 0xE0, 0x80,
0x07, 0xC0, 0x00, 0x00, 0x01, 0x00, 0x40, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0xC0,
0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x10, 0x00, 0x00, 0x80, 0x00,
0x40, 0x00, 0x18, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x18, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00,
0x1C, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x1E, 0x00, 0x00, 0x80, 0x00, 0x40, 0x00, 0x1F, 0x00,
0x00, 0x81, 0x80, 0x40, 0x00, 0x3E, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFE, 0x00, 0x00, 0x80,
0xFF, 0xFF, 0xFF, 0xF8, 0x00, 0x00, 0x81, 0xE0, 0x40, 0x00, 0x00, 0x00, 0x00, 0x83, 0x40, 0x40,
0x00, 0x00, 0x00, 0x00, 0x8E, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x00, 0x40, 0x00, 0x00,
0x00, 0x00, 0xF8, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0xF0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x03,
0xE0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x01, 0xC0, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x01,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xC0, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /*"好"0*/
},
};
/**
* @brief 线(线线)
* @param x1,y1
* @param x2,y2
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @return none
*/
void lcd_draw_colorLine(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t red_data, uint8_t green_data, uint8_t blue_data)
{
uint16_t i = 0;
int16_t delta_x = 0, delta_y = 0;
int8_t incx = 0, incy = 0;
uint16_t distance = 0;
uint16_t t = 0;
uint16_t x = 0, y = 0;
uint16_t x_temp = 0, y_temp = 0;
if (y1 == y2)
{
/* 快速画水平线 */
if (x1 < x2)
{
for (i = x1; i < x2; i++)
{
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, i, y1, red_data, green_data, blue_data);
}
}
else
{
for (i = x2; i < x1; i++)
{
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, i, y1, red_data, green_data, blue_data);
}
}
return;
}
else
{
/* 画斜线Bresenham算法 */
/* 计算两点之间在x和y方向的间距得到画笔在x和y方向的步进值 */
delta_x = x2 - x1;
delta_y = y2 - y1;
if (delta_x > 0)
{
//斜线(从左到右)
incx = 1;
}
else if (delta_x == 0)
{
//垂直斜线(竖线)
incx = 0;
}
else
{
//斜线(从右到左)
incx = -1;
delta_x = -delta_x;
}
if (delta_y > 0)
{
//斜线(从左到右)
incy = 1;
}
else if (delta_y == 0)
{
//水平斜线(水平线)
incy = 0;
}
else
{
//斜线(从右到左)
incy = -1;
delta_y = -delta_y;
}
/* 计算画笔打点距离(取两个间距中的最大值) */
if (delta_x > delta_y)
{
distance = delta_x;
}
else
{
distance = delta_y;
}
/* 开始打点 */
x = x1;
y = y1;
//第一个点无效所以t的次数加一
for (t = 0; t <= distance + 1; t++)
{
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x, y, red_data, green_data, blue_data);
/* 判断离实际值最近的像素点 */
x_temp += delta_x;
if (x_temp > distance)
{
//x方向越界减去距离值为下一次检测做准备
x_temp -= distance;
//在x方向递增打点
x += incx;
}
y_temp += delta_y;
if (y_temp > distance)
{
//y方向越界减去距离值为下一次检测做准备
y_temp -= distance;
//在y方向递增打点
y += incy;
}
}
}
}
/**
* @breif
* @param x1,y1:
* @param x2,y2 :
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @retval none
*/
void lcd_draw_colorRect(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t red_data, uint8_t green_data, uint8_t blue_data)
{
lcd_draw_colorLine(rx_ctrl_handle, x1, y1, x2, y1, red_data, green_data, blue_data);
lcd_draw_colorLine(rx_ctrl_handle, x1, y1, x1, y2, red_data, green_data, blue_data);
lcd_draw_colorLine(rx_ctrl_handle, x1, y2, x2, y2, red_data, green_data, blue_data);
lcd_draw_colorLine(rx_ctrl_handle, x2, y1, x2, y2, red_data, green_data, blue_data);
}
/**
* @breif
* @param x1,x2:
* @param r:
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @retval none
*/
void lcd_draw_colorcircle(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x, uint16_t y, uint16_t r, uint8_t red_data, uint8_t green_data, uint8_t blue_data)
{
int a, b, num;
a = 0;
b = r;
/* 如果圆在屏幕可见区域外,直接退出 */
if ((x - r < 0) || (x + r > rx_ctrl_handle->base_info.dst_w) || (y - r < 0) || (y + r > rx_ctrl_handle->base_info.dst_h))
{
TAU_LOGD("circle outof size \n");
return;
}
while (2 * b * b >= r * r)
{
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x + a, y - b, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x - a, y - b, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x - a, y + b, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x + a, y + b, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x + b, y + a, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x + b, y - a, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x - b, y - a, red_data, green_data, blue_data);
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x - b, y + a, red_data, green_data, blue_data);
a++;
num = (a * a + b * b) - r * r;
if (num > 0)
{
b--;
a--;
}
}
}
/**
* @brief
* @param x,y:
* @param index:
* @param font_color: ,0xRRGGBB
* @param back_color: ,0xRRGGBB
* @return none
*/
void lcd_draw_chinese(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x, uint16_t y, uint16_t index, uint32_t font_color, uint16_t back_color)
{
uint32_t temp, i, j, size = FONT_SIZE;
uint32_t y0 = y;
uint32_t csize = (size * size) / 8; //得到字体一个字符对应点阵集所占的字节数
for (i = 0; i < csize; i++)
{
temp = font_50x50[index][i];
for (j = 0; j < 8; j++)
{
if (temp & 0x80)
{
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x, y, (font_color >> 16) & 0xFF, (font_color >> 8) & 0xFF, font_color & 0xFF);
}
else
{
hal_dsi_rx_ctrl_set_pixel_data(rx_ctrl_handle, x, y, (back_color >> 16) & 0xFF, (back_color >> 8) & 0xFF, back_color & 0xFF);
}
temp <<= 1;
y++;
if ((y - y0) == size)
{
y = y0;
x++;
break;
}
}
}
}

View File

@ -0,0 +1,56 @@
/*******************************************************************************
*
*
* File: draw_mode_lib.h
* Description draw mode
* Version V0.1
* Date 2022-06-21
* Author Tempest
*******************************************************************************/
#ifndef __DRAW_MODE_H__
#define __DRAW_MODE_H__
/**
* @brief 线(线线)
* @param x1,y1:
* @param x2,y2:
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @return none
*/
void lcd_draw_colorLine(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t red_data, uint8_t green_data, uint8_t blue_data);
/**
* @breif
* @param x1,y1:
* @param x2,y2 :
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @retval none
*/
void lcd_draw_colorRect(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint8_t red_data, uint8_t green_data, uint8_t blue_data);
/**
* @breif
* @param x,y:
* @param r:
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @retval none
*/
void lcd_draw_colorcircle(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x, uint16_t y, uint16_t r, uint8_t red_data, uint8_t green_data, uint8_t blue_data);
/**
* @brief
* @param x,y:
* @param index:
* @param font_color: ,0xRRGGBB
* @param back_color: ,0xRRGGBB
* @return none
*/
void lcd_draw_chinese(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint16_t x, uint16_t y, uint16_t index, uint32_t font_color, uint16_t back_color);
#endif

26
src/app/main.c Normal file
View File

@ -0,0 +1,26 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "test_cfg_global.h"
#include "tau_log.h"
#include "hal_system.h"
#include "board.h"
#include "module_demo_main.h"
int main()
{
board_Init();
while (1)
{
#if _MODULE_DEMO_ENABLE
module_demo_main();
#endif
#if _DEMO_GOOGLE_P8P_EN
google_p8p_demo();
#endif
TAU_LOGD("668 Demo\n");
while (1);
}
}

View File

@ -0,0 +1 @@
module_demo:存放hal层给客户的demo code,每个客户都需要release

View File

@ -0,0 +1,137 @@
/*******************************************************************************
*
*
* File: demo_hal_crc.c
* Description crc demo源文件
* Version V0.1
* Date: 2023-07-27
* Author zzf
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "demo_hal_crc.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "crc-log"
/* CRC计算方式0-CPU方式 1-DMA方式 */
#define CRC_DMA_CAL_EN (1)
/* for max total of test elements */
#define CRC_ELEMENT_MAX_TATOL (32u)
/* for crc initial POL regs value */
#define CRC_32_POL_VALUE0 (0x04C11DB7u)
#define CRC_16_POL_VALUE0 (0x8005u)
/* for crc calculate in crc software calculate */
#define CRC_SEED_VALUE_0 (0u)
#define CRC_SEED_VALUE_F (0xFFFFu)
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
#if CRC_DMA_CAL_EN
/* all the one element value crc calculate for software crc */
static uint32_t sg_crc32_arry[CRC_ELEMENT_MAX_TATOL] =
{
0x00000000, 0xFFFFFFFF, 0xAAAAAAAA, 0xEEEEEEEE, 0x55555555, 0x66666666, 0x11111111, 0x77777777,
0x12345678, 0x456789AB, 0x89ABCDEF, 0x3456789A, 0x6789ABCD, 0x9ABCDEF0, 0xBCDEF012, 0xFEDCAB98,
0x5a5aa5a5, 0x37377373, 0x98988989, 0x76767676, 0x41233214, 0x67433467, 0x91DF91DF, 0x76347634,
0x46378912, 0x57351059, 0xABFC9483, 0x837204AF, 0x41057DBA, 0x893CD024, 0x56378105, 0xFA34610B,
};
#else
/* all the one element value crc calculate for software crc */
static uint16_t sg_crc16_element_arry[CRC_ELEMENT_MAX_TATOL] =
{
0x0000, 0xFFFF, 0xAAAA, 0x2222, 0x3333, 0xDDDD, 0x9999, 0x8888,
0x1234, 0x5678, 0x9ABC, 0x2345, 0x4567, 0xABCD, 0xCDEF, 0x789A,
0x5a5a, 0x2323, 0x6868, 0x5aa5, 0x7887, 0x8558, 0x6336, 0xAFAF,
0x3194, 0x7853, 0x7733, 0x76DE, 0x89CA, 0x7401, 0x7392, 0xD2A8,
};
#endif
/*******************************************************************************
* 4.Global function prototypes
*******************************************************************************/
#if CRC_DMA_CAL_EN
/**
* @brief DMA计算CRC值回调函数
* @param calculate_result: CRC计算结果
* @retval None
*/
void demo_crc_dma_callback(uint32_t calculate_result)
{
TAU_LOGD("dma demo[0x%x]\n", calculate_result);
}
/**
* @brief DMA计算CRC值
* @param None
* @retval true or false
*/
bool demo_crc_array_dma_cal(void)
{
crc_ctrl_handle_t crc_cfg_para =
{
CRC_32_POL_VALUE0,
CRC_SEED_VALUE_0,
CRC_32_BIT_PROTOCOL,
CRC_FXOR_ENABLE,
CRC_REV_ONLY_BITS_TRANSPOSE,
CRC_REV_ONLY_BITS_TRANSPOSE
};
hal_crc_dma_init(&crc_cfg_para, demo_crc_dma_callback, sg_crc32_arry, CRC_ELEMENT_MAX_TATOL);
hal_crc_dma_start();
return true;
}
#else
/**
* @brief CPU阻塞式计算CRC值
* @param None
* @retval true or false
*/
bool demo_crc_array_cal(void)
{
crc_ctrl_handle_t crc_cfg_para =
{
CRC_16_POL_VALUE0,
CRC_SEED_VALUE_F,
CRC_16_BIT_PROTOCOL,
CRC_FXOR_ENABLE,
CRC_REV_BOTH_TRANSPOSE,
CRC_REV_BOTH_TRANSPOSE
};
hal_crc_init(&crc_cfg_para);
uint32_t output_crc = hal_crc_cal(sg_crc16_element_arry, CRC_ELEMENT_MAX_TATOL);
TAU_LOGD("cpu demo[0x%x]\n", output_crc);
return true;
}
#endif
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_hal_crc_case(void)
{
TAU_LOGD("HAL CRC DEMO.\n");
#if CRC_DMA_CAL_EN
demo_crc_array_dma_cal(); // DMA方式计算
#else
demo_crc_array_cal(); // CPU方式计算
#endif
}

View File

@ -0,0 +1,41 @@
/*******************************************************************************
*
*
* File: demo_hal_crc.h
* Description: crc demo头文件
* Version: V0.1
* Date: 2023-07-27
* Author: zzf
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_crc.h"
#include "tau_delay.h"
#include "tau_log.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifndef _DEMO_HAL_CRC_H_
#define _DEMO_HAL_CRC_H_
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_hal_crc_case(void);
#endif //_DEMO_HAL_CRC_H_

View File

@ -0,0 +1,212 @@
/*******************************************************************************
*
*
* File: demo_hal_dsi_rx.c
* Description: dsi rx
* Version: V0.1
* Date: 2020-06-12
* Author: lzy
*******************************************************************************/
#include "tau_device_datatype.h"
#include "tau_log.h"
#include "tau_operations.h"
#include "tau_common.h"
#include "hal_dsi_rx_ctrl.h"
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_hal_dsi_rx"
//客户可配参数
//输入配置
#define INPUT_WIDTH 720
#define INPUT_HEIGHT 1280
//输入 MIPI lane rate,video mode 下需要计算delay, command mode可以不设置或者随便设置
#define INPUT_MIPI_LANE_RATE 481000000
//输入图像格式
#define INPUT_COLOR_MODE DSI_RGB888
//输出数据格式(DSI_DATA_CMD_MODE , DSI_DATA_VIDEO_MODE)
#define INPUT_DATA_MODE DSI_DATA_VIDEO_MODE
//输入mipi lane数量(DSI_RX_LANE_x x为1-4)
#define INPUT_MIPI_LANE_NUM DSI_LANE_4
//输入为video mode 时数据格式
#define INPUT_VIDEO_MODEL DSI_NONBURST_EVENT
//输入虚拟通道(0-3)
#define INPUT_VC DSI_VC_0
//输入的帧率(60/90/120/144Hz)
#define INPUT_FRAME_RATE DSI_FRAME_RATE_60HZ
//输入数据是否DSC压缩
#define INPUT_COMPRESS false
//输出配置
#define OUTPUT_WIDTH 720
#define OUTPUT_HEIGHT 1280
static hal_dsi_rx_ctrl_handle_t *g_rx_ctrl_handle = NULL;
//客制化DCS处理函数
static bool cus_dsc_execute(hal_dsi_rx_ctrl_handle_t *handler, hal_dcs_packet_t *dcs_packet)
{
TAU_LOGD("cus_dsc_execute DCS[0x%x]\n", dcs_packet->dcs_command);
for (int i = 0; i < dcs_packet->param_length; i ++)
{
TAU_LOGD("cus_dsc_execute param[%d]:0x%x\n", i, dcs_packet->packet_param[i]);
}
#if 0
/* ack long cmd */
hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
DSI_ACK_DT_GEN_LONG_RESPONSE,
DSI_VC_0,
5,
0x1,
0x2,
0x3,
0x4,
0x5);
#else
/* ack short cmd */
hal_dsi_rx_ctrl_send_ack_cmd(g_rx_ctrl_handle,
DSI_ACK_DT_DCS_SHORT_RESPONSE_1B,
DSI_VC_0,
1,
0xC1);
#endif
return true;
}
static bool ap_dcs_read(uint8_t data_type, uint8_t dcs_cmd, uint8_t param)
{
if (dcs_cmd == 0xaa)
{
uint8_t cmd[] = {DSI_ACK_DT_DCS_LONG_RESPONSE,
212, 0, 1,
0x21, 0x07, 0x2C, 0x27, 0x2B, 0x7A, 0x78, 0x7A,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x71, 0xE8, 0x36, 0x2A, 0x2E, 0x07, 0x89, 0x17,
0x8B, 0x84, 0x28, 0x26, 0x6D, 0xEB, 0x12, 0x34,
0x79, 0x78, 0x79, 0x7C, 0x7C, 0x7C, 0x7C, 0x7C,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x7C, 0x67, 0x6E, 0x6c, 0x8A, 0x5B, 0x71, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x7d, 0x68, 0x61, 0xd9, 0x1A, 0x5B, 0xa7, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x7e, 0x69, 0x63, 0xe9, 0x3c, 0x5B, 0xfE, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x7f, 0x60, 0x3E, 0x6f, 0x9b, 0x5B, 0x45, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x70, 0x61, 0x4E, 0xc9, 0xdA, 0x5B, 0x69, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x71, 0x63, 0xaE, 0x88, 0x0A, 0x5B, 0x30, 0x00,
0x12, 0x34, 0x56, 0x78, 0x9a, 0xab, 0xcd, 0xef,
0x11, 0x22, 0x33, 0x44, 0x0A, 0x5B, 0x30, 0x00,
0x12, 0x34, 0x56, 0x78, 0x9a, 0xab, 0xcd, 0xef,
0x7f, 0x60, 0x3E, 0x6f, 0x9b, 0x5B, 0x45, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x7f, 0x60, 0x3E, 0x6f, 0x9b, 0x5B, 0x45, 0x00,
0x7D, 0x7D, 0x7E, 0x7F, 0x7E, 0x7E, 0x7F, 0x7F,
0x71, 0xE8, 0x36, 0x2A, 0x2E, 0x07, 0x89, 0x17,
0x8B, 0x84, 0x28, 0x26, 0x6D, 0xEB, 0x12, 0x34,
0x11, 0x22, 0x33, 0x44
};
/*长包超128字节发送*/
hal_dsi_rx_ctrl_ack_long_cmd(g_rx_ctrl_handle, sizeof(cmd) / sizeof(uint8_t), cmd);
}
else if (dcs_cmd == 0xFE)
{
uint16_t return_size;
return_size = hal_dsi_rx_ctrl_get_max_ret_size(g_rx_ctrl_handle);
if (return_size == 3)
{
uint8_t cmd[] = {DSI_ACK_DT_DCS_LONG_RESPONSE, 3, 0, 1, 0x40, 0x00, 0x03};
hal_dsi_rx_ctrl_ack_long_cmd(g_rx_ctrl_handle, sizeof(cmd) / sizeof(uint8_t), cmd);
}
else if (return_size == 32)
{
uint8_t cmd[] = {DSI_ACK_DT_DCS_LONG_RESPONSE,
32, 0, 1, 0x01, 0xc4, 0x01, 0xcd, 0x01, 0xfb, 0x55, 0x55,
0x55, 0x4e, 0x4c, 0x4e, 0x2e, 0x2d, 0x31, 0x30,
0x30, 0x38, 0x49, 0x42, 0x49, 0x3c, 0x39, 0x47,
0x01, 0x07, 0x2b, 0xfa, 0x22, 0x19, 0x32, 0x02
};
hal_dsi_rx_ctrl_ack_long_cmd(g_rx_ctrl_handle, sizeof(cmd) / sizeof(uint8_t), cmd);
}
}
TAU_LOGD("r %x\n", dcs_cmd);
return true;
}
static const hal_dcs_execute_entry_t g_cus_rx_dcs_execute_table[] =
{
{0x83, cus_dsc_execute, false}, //cus dcs 0x83, 处理函数为cus_dsc_execute不需要立即运行在while里异步即可
{0, NULL, false} //{0,NULL,false} 数组最后一个固定成员作为table结尾的判断标准
};
static void open_mipi_rx()
{
if (g_rx_ctrl_handle == NULL)
{
g_rx_ctrl_handle = hal_dsi_rx_ctrl_create_handle();
}
g_rx_ctrl_handle->base_info.src_w = INPUT_WIDTH;
g_rx_ctrl_handle->base_info.src_h = INPUT_HEIGHT;
g_rx_ctrl_handle->base_info.dst_w = OUTPUT_WIDTH;
g_rx_ctrl_handle->base_info.dst_h = OUTPUT_HEIGHT;
g_rx_ctrl_handle->base_info.src_frate = INPUT_FRAME_RATE;
g_rx_ctrl_handle->base_info.src_mode = INPUT_DATA_MODE;
g_rx_ctrl_handle->rx_color_mode = INPUT_COLOR_MODE;
g_rx_ctrl_handle->rx_lanes = INPUT_MIPI_LANE_NUM;
g_rx_ctrl_handle->rx_nonburst_models = INPUT_VIDEO_MODEL;
g_rx_ctrl_handle->compress_en = INPUT_COMPRESS;
g_rx_ctrl_handle->rx_hsclk_rate = INPUT_MIPI_LANE_RATE;
g_rx_ctrl_handle->extra_info.flow_control_mode = FC_AUTO_MODE;
g_rx_ctrl_handle->cus_dcs_entry_table = g_cus_rx_dcs_execute_table;
g_rx_ctrl_handle->rx_dcs_read_entry = ap_dcs_read;
/*PIN28~PIN19依次为21c03*/
g_rx_ctrl_handle->rx_lane_swap = RX_LANE_SWAP_2103;
/* 对 lane0~lane3 以及clk lane 进行PN交换*/
g_rx_ctrl_handle->base_info.pn_swap = RX_LANE_0_PN_SWAP | RX_LANE_1_PN_SWAP | RX_LANE_2_PN_SWAP | RX_LANE_3_PN_SWAP | RX_LANE_CLK_PN_SWAP;
if (g_rx_ctrl_handle->compress_en == true)
{
//hal_dsi_rx_ctrl_pre_init_pps(g_rx_ctrl_handle, pps, 128);
}
hal_dsi_rx_ctrl_init(g_rx_ctrl_handle);
#if 0
//使用盒子发送读命令 0xA,0xB,0xC,0xD,0xE,0xF,0x1E,0x1D
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE0, DSI_ACK_DT_DCS_SHORT_RESPONSE_1B, 0x0F, 1, 0xab);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE1, DSI_ACK_DT_DCS_SHORT_RESPONSE_2B, 0x0e, 2, 0xef, 0xcd);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE2, DSI_ACK_DT_GEN_SHORT_RESPONSE_1B, 0x0a, 1, 0x12);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE3, DSI_ACK_DT_GEN_SHORT_RESPONSE_2B, 0x0b, 2, 0x34, 0x56);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE4, DSI_ACK_DT_DCS_LONG_RESPONSE, 0x0c, 4, 0x12, 0x34, 0x56, 0x78);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE5, DSI_ACK_DT_GEN_LONG_RESPONSE, 0x0d, 4, 0xab, 0xcd, 0xef, 0x9a);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE6, DSI_ACK_DT_GEN_LONG_RESPONSE, 0x1e, 8, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8);
hal_dsi_rx_ctrl_set_auto_ack(g_rx_ctrl_handle, HAL_RX_QRESP_CODE7, DSI_ACK_DT_DCS_LONG_RESPONSE, 0x1d, 8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0x10);
#endif
hal_dsi_rx_ctrl_start(g_rx_ctrl_handle);
}
/**
* @brief test system
* @param none
* @retval none
*/
void demo_hal_dsi_rx_case()
{
open_mipi_rx();
TAU_LOGD("open_mipi_rx done !\n");
while (1)
{
hal_dsi_rx_ctrl_dcs_async_handler(g_rx_ctrl_handle);
}
}

View File

@ -0,0 +1,22 @@
/*******************************************************************************
*
*
* File: demo_hal_dsi_rx.h
* Description: dsi rx
* Version: V0.1
* Date: 2020-06-12
* Author: lzy
*******************************************************************************/
#ifndef __DEMO_HAL_DSI_RX_H__
#define __DEMO_HAL_DSI_RX_H__
/**
* @brief test system
* @param none
* @retval none
*/
void demo_hal_dsi_rx_case(void);
#endif

View File

@ -0,0 +1,389 @@
/*******************************************************************************
*
*
* File: demo_hal_dsi_tx.c
* Description dsi_tx demo源文件
* Version V0.1
* Date: 2023-07-27
* Author zzf
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "demo_hal_dsi_tx.h"
#if AMOLED_NT37280
#include "hal_swire.h"
#endif
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "tx-log"
#define DEMO_TX_VPG_EN (0) // 只适用于video模式输入video模式输出
#define DEMO_RX_GEN_PATTERN (0) // TX VPG和RX pattern不建议同时打开
#define DEMO_CCM_EN (0) // 基于RX pattern数据通路进行CCM调整
#define DEMO_ENDIAN_EN (0) // RGB大小端配置
#define DEMO_OVERWRITE_EN (0) // Overwrite功能配置
#define DEMO_EDGE_DECT_EN (0) // 边缘检测功能配置
#define DEMO_EDGE_ENHANCE_EN (0) // 边缘增强功能配置
#define DEMO_FC_EN (0) // false color功能配置
#define DEMO_BCS_EN (0) // BCS调整功能配置
#define DEMO_BTA_LP_EN (0) // LP模式下BTA使用
#define DEMO_BTA_HS_EN (0) // HS传输过程中BTA使用
/* base_info输入端信息 */
#define INPUT_WIDTH (1440)
#define INPUT_HEIGHT (2960)
#define INPUT_SRC_FRATE DSI_FRAME_RATE_60HZ
/* 输出数据格式(DSI_DATA_CMD_MODE , DSI_DATA_VIDEO_MODE) */
#define DSI_INPUT_DATA_MODE DSI_DATA_VIDEO_MODE
#define DSI_OUTPUT_DATA_MODE DSI_DATA_VIDEO_MODE
/* vid模式选择 */
#define OUTPUT_VID_SEL_MODE DSI_BURST_MODE
/* 虚拟通道(0-3) */
#define VIRTUAL_CHANNEL DSI_VC_0
/* TD_RSTN pin脚使用定义宏 */
#define PIN_TD_RSTN IO_PAD_TD_RSTN
#if DEMO_RX_GEN_PATTERN
/*输入mipi lane数量(DSI_RX_LANE_x x为1-4)*/
#define INPUT_MIPI_LANE_NUM DSI_LANE_4
/*输入图像格式*/
#define INPUT_COLOR_MODE DSI_RGB888
/*video mode输入时数据格式*/
#define INPUT_VIDEO_MODEL DSI_NONBURST_EVENT
/*输入MIPI lane rate,video mode下需要计算delay,command mode可以不设置或者随便设置*/
#define INPUT_MIPI_LANE_RATE (1200000000)
/*IPI pattern fps*/
#define PATTERN_FPS (60)
#endif
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
static hal_dsi_tx_ctrl_handle_t *g_tx_ctrl_handle = NULL;
#if DEMO_RX_GEN_PATTERN
static hal_dsi_rx_ctrl_handle_t *g_rx_ctrl_handle = NULL;
static uint8_t g_rx_pattern_sel = 0; // 0:Vertical mode ; 1:Horizontal mode
#endif
static bool panel_init = false;
#if DEMO_BTA_LP_EN
static uint8_t bta_ack_data = 0;
#endif
#if DEMO_BTA_HS_EN
static bool sg_bta_need_flag = true;
#endif
/*******************************************************************************
* 4.Global function prototypes
*******************************************************************************/
#if AMOLED_NT37280
/**
* @brief timer回调函数用于swire输出
* @param data:
* @retval
*/
static void demo_tx_timer_callback(void *data)
{
hal_swire_set_waveform(12, 12, 12, 12);
hal_swire_set_pulse(32);
}
/**
* @brief
* @param
* @retval
*/
static void demo_tx_panel_backlight_on(void)
{
hal_gpio_init_output(IO_PAD_AP_PWMEN, IO_LVL_HIGH);
hal_swire_init();
hal_swire_enable(true);
hal_swire_set_waveform(12, 12, 12, 12);
hal_swire_set_pulse(36);
hal_timer_init(TIMER_NUM1);
hal_timer_start(TIMER_NUM1, 16, demo_tx_timer_callback, NULL);
}
#endif
/**
* @brief PANEL初始化
* @param None
* @retval None
**/
void demo_panel_init(void)
{
#if AMOLED_NT37280
demo_tx_panel_backlight_on();
#endif
/*初始化TD_RSTN并产生屏端复位信号*/
hal_gpio_init_output(PIN_TD_RSTN, IO_LVL_HIGH);
hal_gpio_set_output_data(PIN_TD_RSTN, IO_LVL_HIGH);
delayMs(10);
hal_gpio_set_output_data(PIN_TD_RSTN, IO_LVL_LOW);
delayMs(10);
hal_gpio_set_output_data(PIN_TD_RSTN, IO_LVL_HIGH);
delayMs(10);
/*bta read register*/
#if DEMO_BTA_LP_EN
hal_dsi_tx_ctrl_read_cmd(0x06, 0, 0xDA, 1, &bta_ack_data);
TAU_LOGD("DA[0x%x]\n", bta_ack_data);
#endif
/*initial code*/
#if LCD_PT628_CSOT
TAU_LOGD("LCD_PT628_CSOT pannel init\n");
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xBF, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xC0, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x00, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xFF, 0x87, 0x56, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x00, 0x80);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xFF, 0x87, 0x56);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x00, 0xE8);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xC0, 0x20);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x00, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 4, 0xFF, 0x87, 0x56, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x00, 0x80);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0xFF, 0x87, 0x56);
hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x11);
delayMs(120);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x35, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 3, 0x51, 0x0F, 0xFF);
hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x29);
#elif AMOLED_NT37280
TAU_LOGD("AMOLED_NT37280 pannel init\n");
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFF, 0xE0);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFB, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x18, 0x80);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x1A, 0x15);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x73, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x89, 0x7F);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x0D, 0x9B);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x46, 0x17);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFF, 0xF0);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFB, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x54, 0x03);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x9C, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFF, 0x20);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFB, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x34, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x35, 0x66);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x36, 0x66);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFF, 0x10);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xFB, 0x01);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x88, 0x07);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0x2A, 0x00, 0x00, 0x04, 0x37);
hal_dsi_tx_ctrl_write_cmd(0x39, 0, 5, 0x2B, 0x00, 0x00, 0x08, 0xE7);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x7F, 0x07);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xE9, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xBF, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0xC0, 0x00);
hal_dsi_tx_ctrl_write_cmd(0x15, 0, 2, 0x35, 0x00); //TE 35=00是标准60Hz; 35=01是有很多小信号
hal_dsi_tx_ctrl_write_cmd(0x29, 0, 3, 0x51, 0x0F, 0xFF); //CABC
hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x11);
delayMs(120);
hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x29);
delayMs(10);
#endif
}
/**
* @brief RX初始化和开启
* @param None
* @retval None
**/
static void demo_open_mipi_rx(void)
{
/*RX demo详细请参考demo_hal_dsi_rx*/
#if DEMO_RX_GEN_PATTERN
/* 创建rx ctrl handle */
if (g_rx_ctrl_handle == NULL)
{
g_rx_ctrl_handle = hal_dsi_rx_ctrl_create_handle();
}
g_rx_ctrl_handle->base_info.src_w = INPUT_WIDTH;
g_rx_ctrl_handle->base_info.src_h = INPUT_HEIGHT;
g_rx_ctrl_handle->base_info.dst_w = __DPI_HACT;
g_rx_ctrl_handle->base_info.dst_h = __DPI_VACT;
g_rx_ctrl_handle->rx_hsclk_rate = INPUT_MIPI_LANE_RATE;
g_rx_ctrl_handle->base_info.src_frate = INPUT_SRC_FRATE;
g_rx_ctrl_handle->base_info.src_mode = DSI_INPUT_DATA_MODE;
g_rx_ctrl_handle->rx_color_mode = INPUT_COLOR_MODE;
g_rx_ctrl_handle->rx_lanes = INPUT_MIPI_LANE_NUM;
g_rx_ctrl_handle->rx_nonburst_models = INPUT_VIDEO_MODEL;
/* 初始化rx ctrl */
hal_dsi_rx_ctrl_init(g_rx_ctrl_handle);
/* 配置RX video pattern */
hal_dsi_rx_ctrl_enable_test_pattern(g_rx_ctrl_handle, g_rx_pattern_sel, true, PATTERN_FPS);
/* 启动rx ctrl */
hal_dsi_rx_ctrl_start(g_rx_ctrl_handle);
#endif
}
/**
* @brief TX初始化和开启
* @param None
* @retval None
**/
static void demo_open_mipi_tx(void)
{
/*创建TX实例*/
if (g_tx_ctrl_handle == NULL)
{
g_tx_ctrl_handle = hal_dsi_tx_ctrl_create_handle();
}
g_tx_ctrl_handle->lane_num = _LANE_NUMBER;
g_tx_ctrl_handle->channel_id = VIRTUAL_CHANNEL;
g_tx_ctrl_handle->vid_mode = OUTPUT_VID_SEL_MODE;
g_tx_ctrl_handle->cmd_tx_type = _CMD_TYPE;
g_tx_ctrl_handle->dpi_vsa = __DPI_VSA;
g_tx_ctrl_handle->dpi_vbp = __DPI_VBP;
g_tx_ctrl_handle->dpi_vfp = __DPI_VFP;
g_tx_ctrl_handle->dpi_hsa = __DPI_HSA;
g_tx_ctrl_handle->dpi_hbp = __DPI_HBP;
g_tx_ctrl_handle->dpi_hfp = __DPI_HFP;
g_tx_ctrl_handle->base_info.src_w = INPUT_WIDTH;
g_tx_ctrl_handle->base_info.src_h = INPUT_HEIGHT;
g_tx_ctrl_handle->base_info.dst_w = __DPI_HACT;
g_tx_ctrl_handle->base_info.dst_h = __DPI_VACT;
g_tx_ctrl_handle->base_info.src_frate = INPUT_SRC_FRATE;
g_tx_ctrl_handle->base_info.src_mode = DSI_INPUT_DATA_MODE;
g_tx_ctrl_handle->base_info.dst_mode = DSI_OUTPUT_DATA_MODE;
#if LCD_PT628_CSOT //RGBG玻璃匹配RGB Driver IC
//remap规则参数 此款玻璃remapl_rule/remapr_rule使用同一规则 如果玻璃存在两个规则需要支持请定义两个数组分别配置remapl_rule/remapr_rule
remap_rule_t remap_rule =
{
9, 11, 12, 8, 7, 10, 4, 5, 6, 2, 1, 3,
20, 19, 22, 21, 23, 24, 14, 13, 15, 16, 17, 18
};
g_tx_ctrl_handle->pentile_info.pentile_24b = true; // 是否RGB驱动IC搭配RGBG玻璃使用
g_tx_ctrl_handle->pentile_info.pentile_reverse_en = true; // 是否需要使用芯片本身行反转功能
g_tx_ctrl_handle->pentile_info.pentile_enable = true; // 是否RGBG格式的数据传输
g_tx_ctrl_handle->pentile_info.remapl_rule = &remap_rule; // reamp规则1
g_tx_ctrl_handle->pentile_info.remapr_rule = &remap_rule; // reamp规则2
g_tx_ctrl_handle->pentile_info.rgb_hact = 900; // 如果是RGB驱动IC搭配RGBG玻璃使用此处配置RGB驱动IC的分辨率dst_w按玻璃分辨率进行配置
/* RGBG 屏幕补黑配置,此款玻璃两块补黑区域均参与子像素重排*/
g_tx_ctrl_handle->pentile_info.blank_info0.blank_en = 1; // 是否使用补黑区域0
g_tx_ctrl_handle->pentile_info.blank_info0.remap_en = 1; // 补黑区域0是否参与remap重排
g_tx_ctrl_handle->pentile_info.blank_info0.st_col = 0; // 补黑区域0起始位置按有效子像素序号进行计算
g_tx_ctrl_handle->pentile_info.blank_info0.width = 12; // 补黑区域0补黑宽度按子像素级计算
g_tx_ctrl_handle->pentile_info.blank_info1.blank_en = 1; // 是否使用补黑区域1
g_tx_ctrl_handle->pentile_info.blank_info1.remap_en = 1; // 补黑区域1是否参与remap重排
g_tx_ctrl_handle->pentile_info.blank_info1.st_col = 1248; // 补黑区域1起始位置按有效子像素序号进行计算必须大于补黑区域0的起始位置
g_tx_ctrl_handle->pentile_info.blank_info1.width = 216; // 补黑区域1补黑宽度按子像素级计算
#endif
#if DEMO_ENDIAN_EN
hal_dsi_tx_ctrl_set_endianness(DPI_ENDIAN_BGR);// 默认RGB输出可以更改为BGR 需要在初始化之前调用
#endif
/*调用初始化接口进行TX初始化*/
hal_dsi_tx_ctrl_init(g_tx_ctrl_handle);
/*屏幕初始化复位时序和发送initial code*/
if (!panel_init)
{
demo_panel_init();
panel_init = true;
}
#if DEMO_TX_VPG_EN /*使用TX VPG测试TX是否正常工作*/
hal_dsi_tx_ctrl_set_vpg(true, TX_VPG_V_COLOR, false);
#endif
/*tx start开始传输高速数据*/
hal_dsi_tx_ctrl_start(g_tx_ctrl_handle);
/*可选功能配置,在任意时刻均可调用 start*/
#if DEMO_CCM_EN
ccm_coef_t coef;
coef.coef_c00 = 0x1f3;
coef.coef_c01 = 0xf3a;
coef.coef_c02 = 0xfd3;
coef.coef_c10 = 0xf9c;
coef.coef_c11 = 0x19c;
coef.coef_c12 = 0xfca;
coef.coef_c20 = 0x27;
coef.coef_c21 = 0xf46;
coef.coef_c22 = 0x193;
hal_dsi_tx_ctrl_set_ccm(&coef);
#endif
#if DEMO_OVERWRITE_EN
hal_dsi_tx_ctrl_set_overwrite_rgb(0x00, 0x00, 0xFF); //蓝色图形数据输出 参数为R/G/B灰度值
hal_dsi_tx_ctrl_overwrite_enable(true); //开启overwrite功能
/*........*/
//hal_dsi_tx_ctrl_overwrite_enable(false); //需要关闭overwrite功能时调用
#endif
#if DEMO_EDGE_DECT_EN
dsi_tx_edge_dect_t edge_dect_para = {0x10, true};
hal_dsi_tx_ctrl_set_edge_dect(&edge_dect_para, true);
#endif
#if DEMO_EDGE_ENHANCE_EN
dsi_tx_edge_enh_t edge_enh_para = {true, 64, 4, 64, 0};
hal_dsi_tx_ctrl_set_edge_enhance(&edge_enh_para, true);
#endif
#if DEMO_FC_EN
dsi_tx_fc_t fc_para = {64, 64};
hal_dsi_tx_ctrl_set_fc(&fc_para, true);
#endif
#if DEMO_BCS_EN
dsi_tx_bcs_t bcs_cfg = {0x00, 0x10, 0x10}; // 参数含义:{明亮度,对比度,饱和度}
hal_dsi_tx_ctrl_set_bcs(&bcs_cfg, true);
#endif
/*可选功能配置,在任意时刻均可调用 end*/
}
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_dsi_tx_case(void)
{
TAU_LOGD("DSI TX DEMO.\n");
demo_open_mipi_rx();
demo_open_mipi_tx();
while (1)
{
#if DEMO_BTA_HS_EN
if (sg_bta_need_flag) //当需要进行BTA回读的时候置标志位等待Vporch阶段进行BTA回读获取有效数据
{
uint8_t bta_data = 0;
if (hal_dsi_tx_ctrl_vporch_bta_opera(0x06, 0xDA, 1, &bta_data))
{
//Vporch阶段进行BTA回读获取到有效数据关闭本次回读流程
sg_bta_need_flag = false;
TAU_LOGD("hs bta[0x%x]\n", bta_data);
}
}
#endif
}
}

View File

@ -0,0 +1,77 @@
/*******************************************************************************
*
*
* File: demo_hal_dsi_tx.h
* Description: dsi-tx demo头文件
* Version: V0.1
* Date: 2023-07-27
* Author: zzf
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_dsi_tx_ctrl.h"
#include "hal_dsi_rx_ctrl.h"
#include "tau_delay.h"
#include "tau_log.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifndef _DEMO_HAL_DSI_TX_H_
#define _DEMO_HAL_DSI_TX_H_
#define LCD_PT628_CSOT (1) //4lane RGBG-1242x2699 RGB-900X2688
#define AMOLED_NT37280 (0) //4lane 1080X2280
#if LCD_PT628_CSOT
#define _LANE_NUMBER (4) //数据lane的个数
#define _CMD_TYPE (DSI_CMD_TX_LP) //0-HS,1-LP;
#define __DPI_VSA (16) //VSYNC宽度
#define __DPI_VBP (16) //VSYNC后的无效像素
#define __DPI_VACT (2688) //玻璃V分辨率定义
#define __DPI_VFP (123 ) //VSYNC前的无效像素
#define __DPI_HSA (6) //HSYNC宽度
#define __DPI_HBP (18) //HSYNC后的无效像素
#define __DPI_HACT (1242) //玻璃H分辨率定义
#define __DPI_HFP (32) //HSYNC前的无效像素
#elif AMOLED_NT37280
#define _LANE_NUMBER (4) //数据lane的个数
#define _CMD_TYPE (DSI_CMD_TX_LP) //0-HS,1-LP;
#define __DPI_VSA (4) //VSYNC宽度
#define __DPI_VBP (28) //VSYNC后的无效像素
#define __DPI_VACT (2280) //V分辨率定义
#define __DPI_VFP (10) //VSYNC前的无效像素
#define __DPI_HSA (8) //HSYNC宽度
#define __DPI_HBP (16) //HSYNC后的无效像素
#define __DPI_HACT (1080) //H分辨率定义
#define __DPI_HFP (36) //HSYNC前的无效像素
#endif
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_dsi_tx_case(void);
#endif

View File

@ -0,0 +1,218 @@
/*******************************************************************************
* Copyright (C) 2021-2022, All Rights Reserved.
*
* File: test_hal_flash.c
* Description hal_flash
* Version V0.1
* Date 2022-04-21
* Author RANDY
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "demo_hal_flash.h"
#include "hal_flash.h"
#include "tau_delay.h"
#include "tau_log.h"
#include "tau_common.h"
#include "test_cfg_global.h"
#if _MODULE_DEMO_FLASH_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_flash"
#define TEST_DATA_SIZE 32
#define DATA_BLOCK_SIZE (64*1024)
#define DATA_PAGE_SIZE 1024
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
static fls_ops_cfg_t *fls_ops_cfg;
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**************************************************************************
* @name :
* @brief
* @param
* @retval
**************************************************************************/
void test_hal_flash_get_public_region_test(void)
{
uint8_t test_data[TEST_DATA_SIZE] = 0;
TAU_LOGD("test get data public\n");
fls_ops_cfg->flash_block = 7;//固定值
fls_ops_cfg->flash_page = 0;//0-32
fls_ops_cfg->page_offset_addr = 0;
fls_ops_cfg->data_size = TEST_DATA_SIZE;
fls_ops_cfg->user_data = test_data;
hal_flash_init();
//1 读数据
hal_flash_public_region_ops(FLASH_PUBLIC_READ, fls_ops_cfg);
for (uint8_t i = 0; i < TEST_DATA_SIZE; i++)
{
TAU_LOGD("read data[%d]=0x%x ", i, test_data[i]);
}
//2 写数据
for (uint32_t i = 0; i < TEST_DATA_SIZE; i++)
{
test_data[i] = i;
}
hal_flash_public_region_ops(FLASH_PUBLIC_WRITE, fls_ops_cfg);
//3 回读
for (uint32_t i = 0; i < TEST_DATA_SIZE; i++)
{
test_data[i] = 0;
}
hal_flash_public_region_ops(FLASH_PUBLIC_READ, fls_ops_cfg);
//4 对比
for (uint8_t i = 0; i < TEST_DATA_SIZE; i++)
{
TAU_LOGD("read data[%d]=0x%x ", i, test_data[i]);
}
}
// 验证flash UID的读取16byte的UID
void test_flash_uid_read(void)
{
uint8_t get_id[16] = {0};
TAU_LOGD("test_flash_uid_read begin \n");
hal_flash_init();
hal_flash_read_uid(get_id, 16);
//不同的ICID不一样存在0x00或者0xFF的情况
for (uint8_t i = 0; i < 16; i++)
{
TAU_LOGD("read ID [%d]=0x%X \n", i, get_id[i]);
}
}
/**
* @brief user_data的数据个数
* @param
* @retval bool
*/
void get_user_data_size(void)
{
uint32_t user_data_size = 0;
TAU_LOGD("test get data addr\n");
user_data_size = hal_flash_get_user_data_size();
TAU_LOGD("user_data size 0x%x \n", user_data_size);
}
void test_hal_flash_get_user_region_test(void)
{
uint8_t user_data[32];
uint32_t user_address = 0; //需要读取数据的位置
uint32_t user_data_size = 0;
TAU_LOGD("test get data addr\n");
//读取user data 0地址
user_address = 0;
fls_ops_cfg->flash_block = user_address / DATA_BLOCK_SIZE;
fls_ops_cfg->flash_page = (user_address % DATA_BLOCK_SIZE) / DATA_PAGE_SIZE;
fls_ops_cfg->page_offset_addr = user_address % DATA_PAGE_SIZE;
fls_ops_cfg->data_size = 16;
fls_ops_cfg->user_data = user_data;
hal_flash_user_region_ops(FLASH_USERDATA_READ, fls_ops_cfg);
for (uint8_t i = 0; i < 2; i++)
{
TAU_LOGD("user_data[%d]=0x%x ", i, user_data[i]);
}
//读取user data 0x6000地址
user_address = 0x6000;
fls_ops_cfg->flash_block = user_address / DATA_BLOCK_SIZE;
fls_ops_cfg->flash_page = (user_address % DATA_BLOCK_SIZE) / DATA_PAGE_SIZE;
fls_ops_cfg->page_offset_addr = user_address % DATA_PAGE_SIZE;
fls_ops_cfg->data_size = 16;
fls_ops_cfg->user_data = user_data;
hal_flash_user_region_ops(FLASH_USERDATA_READ, fls_ops_cfg);
for (uint8_t i = 0; i < 2; i++)
{
TAU_LOGD("user_data[%d]=0x%x ", i, user_data[i]);
}
}
/**
* @brief user_data的绝对起始地址
* @param
* @retval bool
*/
void demo_hal_flash(void)
{
uint8_t case_sel = 2;
switch (case_sel)
{
case 1:
test_hal_flash_get_public_region_test();
break;
case 2:
test_hal_flash_get_user_region_test();
break;
case 3:
test_flash_uid_read();
break;
case 4:
get_user_data_size();
break;
case 5:
//测试共享flash接口,需要外接SPI主机测试
TAU_LOGI("test TMON \n");
hal_flash_share_mode(true);
break;
default:
break;
}
}
#endif

View File

@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (C) 2021-2022, All Rights Reserved.
*
* File: test_hal_flash.h
* Description: hal_flash测试用例头文件
* Version: V0.1
* Date: 2023-07-17
* Author: Kevin
*******************************************************************************/
#ifndef __DEMO_HAL_FLASH_H__
#define __DEMO_HAL_FLASH_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_flash(void);
#endif /* __TEST_HAL_FLASH_H__ */

View File

@ -0,0 +1,268 @@
/*******************************************************************************
*
*
* File: demo_gpio.c
* Description GPIO测试用例源文件
* Version V0.1
* Date 2023-07-27
* Author kevin
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_gpio.h"
#include "tau_delay.h"
#include "tau_log.h"
#include "test_cfg_global.h"
#if _DEMO_GPIO_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "gpio-log"
//output
#define GPIO_OUT_TEST 1
#define GPIO_OUT_IN_CONNECT 0
//input
#define GPIO_IN_INT_SINGLE 0
//IO mode init
#define GPIO_MODE_INIT 0
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
static bool s_gpio_callback_flag = false;
static sys_cfg_trigger_e s_gpio_trig = DETECT_HIGH_LVL;
static io_pad_e s_gpio_demo_pad1 = IO_PAD_AP_TPRSTN;
static io_pad_e s_gpio_demo_pad2 = IO_PAD_AP_PWMEN;
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**************************************************************************
* @name : demo_gpio_callback
* @brief :
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void demo_gpio_callback(void *data)
{
gpio_int_e type = *(gpio_int_e *)data;
gpio_int_e int_type = hal_gpio_get_int_type(s_gpio_demo_pad1);
TAU_LOGI("demo_gpio_callback type:%d, int_type:%d, s_gpio_trig:%d\r\n", type, int_type, s_gpio_trig);
hal_gpio_ctrl_eint(s_gpio_demo_pad1, DISABLE);
if (DETECT_HIGH_LVL == s_gpio_trig)
{
hal_gpio_set_output_data(s_gpio_demo_pad2, IO_LVL_LOW);
}
else if (DETECT_LOW_LVL == s_gpio_trig)
{
hal_gpio_set_output_data(s_gpio_demo_pad2, IO_LVL_HIGH);
}
switch (s_gpio_trig)
{
case DETECT_HIGH_LVL:
s_gpio_trig = DETECT_LOW_LVL;
break;
case DETECT_LOW_LVL:
s_gpio_trig = DETECT_RISING_EDGE;
break;
case DETECT_RISING_EDGE:
s_gpio_trig = DETECT_FALLING_EDGE;
break;
default:
return;
}
s_gpio_callback_flag = true;
}
/**************************************************************************
* @name : demo_gpio_int
* @brief : gpio测试中断通用配置
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void demo_gpio_int(io_pad_e pad, sys_cfg_trigger_e trig)
{
/*1.关闭中断*/
hal_gpio_ctrl_eint(pad, DISABLE);
/*2.中断初始化*/
hal_gpio_init_eint(pad, trig);
/*3.注册回调*/
hal_gpio_reg_eint_cb(pad, demo_gpio_callback);
/*4.使能中断*/
hal_gpio_ctrl_eint(pad, ENABLE);
}
/**************************************************************************
* @name : demo_gpio_out_case
* @brief : gpio output功能测试
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void demo_gpio_out_case(void)
{
gpio_level_e flag = IO_LVL_LOW;
TAU_LOGI("demo_gpio_out_case\r\n");
hal_gpio_init_output(s_gpio_demo_pad1, flag);
while (1)
{
delayMs(10);
flag = (flag == IO_LVL_LOW) ? IO_LVL_HIGH : IO_LVL_LOW;
hal_gpio_set_output_data(s_gpio_demo_pad1, flag);
}
}
/**************************************************************************
* @name : demo_gpio_in_case
* @brief : gpio input功能测试
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void demo_gpio_in_case(void)
{
gpio_level_e flag = IO_LVL_LOW;
TAU_LOGI("demo_gpio_in_case\r\n");
hal_gpio_init_input(s_gpio_demo_pad1);
hal_gpio_init_output(s_gpio_demo_pad2, flag);
while (1)
{
delayMs(10);
flag = (flag == IO_LVL_LOW) ? IO_LVL_HIGH : IO_LVL_LOW;
hal_gpio_set_output_data(s_gpio_demo_pad2, flag);
}
}
/**************************************************************************
* @name : demo_gpio_int_single
* @brief : gpio input配置单个中断
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void demo_gpio_int_single(void)
{
sys_cfg_trigger_e trig = s_gpio_trig;
TAU_LOGI("demo_gpio_int_single trig:%d\r\n", trig);
if (DETECT_HIGH_LVL == s_gpio_trig || DETECT_RISING_EDGE == s_gpio_trig)
{
hal_gpio_init_output(s_gpio_demo_pad2, IO_LVL_LOW);
}
else if (DETECT_LOW_LVL == s_gpio_trig || DETECT_FALLING_EDGE == s_gpio_trig)
{
hal_gpio_init_output(s_gpio_demo_pad2, IO_LVL_HIGH);
}
demo_gpio_int(s_gpio_demo_pad1, trig);
if (DETECT_HIGH_LVL == s_gpio_trig || DETECT_RISING_EDGE == s_gpio_trig)
{
delayMs(100);
hal_gpio_set_output_data(s_gpio_demo_pad2, IO_LVL_HIGH);
}
else if (DETECT_LOW_LVL == s_gpio_trig || DETECT_FALLING_EDGE == s_gpio_trig)
{
delayMs(100);
hal_gpio_set_output_data(s_gpio_demo_pad2, IO_LVL_LOW);
}
}
/**
* @brief GPIO初始化配置,IO功能以及状态,
* TP相关I2C/SPI tp_transfer.c
* @param none
* @retval none
*/
static void demo_gpio_init(void)
{
io_pad_attr_t attrs[] =
{
//1.配置成GPIO 输出
{IO_PIN_8, PIN8_MODE_GPIO7, IO_IOE_OUTPUT, IO_LVL_LOW}, /* PIN_8(TD_RSTN), GPIO,输出,低电平 */
{IO_PIN_17, PIN17_MODE_GPIO8, IO_IOE_OUTPUT, IO_LVL_LOW}, /* PIN_17(PWMEN), GPIO,输出,低电平 */
{IO_PIN_16, PIN16_MODE_GPIO2, IO_IOE_OUTPUT, IO_LVL_LOW}, /* PIN_16(AP_INT),GPIO,输出,低电平 */
//2.配置成GPIO 输入
{IO_PIN_29, PIN29_MODE_GPIO3, IO_IOE_INPUT, IO_LVL_NONE}, /* PIN_29(AP_TE), GPIO,输入 */
//3.配置UART TX
{IO_PIN_2, PIN2_MODE_UART0_TX, IO_IOE_NONE, IO_LVL_NONE}, /* PIN_2(UART0_TX), UART,TX */
//4.配置I2C
{IO_PIN_5, PIN5_MODE_I2C1_SCL, IO_IOE_NONE, IO_LVL_NONE}, /* PIN_5(TD_SPIM_CLK), I2C,SCL */
{IO_PIN_6, PIN6_MODE_I2C1_SDA, IO_IOE_NONE, IO_LVL_NONE}, /* PIN_6(TD_SPIM_CSN), I2C,SDA */
//5.配置SPIS
{IO_PIN_30, PIN30_MODE_SPIS_MISO, IO_IOE_NONE, IO_LVL_NONE}, /* PIN_30(AP_SPIS_MISO), SPIS,MISO */
{IO_PIN_31, PIN31_MODE_SPIS_CSN, IO_IOE_NONE, IO_LVL_NONE}, /* PIN_31(AP_SPIS_CSN), SPIS,CSN */
{IO_PIN_32, PIN32_MODE_SPIS_SCLK, IO_IOE_NONE, IO_LVL_NONE}, /* PIN_32(AP_SPIS_CLK), SPIS,CLK */
{IO_PIN_33, PIN33_MODE_SPIS_MOSI, IO_IOE_NONE, IO_LVL_NONE} /* PIN_33(AP_SPIS_MOSI), SPIS,MOSI */
};
uint8_t size = sizeof(attrs) / sizeof(io_pad_attr_t);
hal_gpio_config_pad(attrs, size);
}
/**************************************************************************
* @name : demo_gpio_case
* @brief :
* @param[in] :
* @return :
* @retval :
**************************************************************************/
void demo_gpio_case(void)
{
s_gpio_callback_flag = true;
#if GPIO_IN_INT_SINGLE
while (1)
{
if (s_gpio_callback_flag)
{
s_gpio_callback_flag = false;
demo_gpio_int_single();
}
}
#elif GPIO_OUT_TEST
demo_gpio_out_case();
#elif GPIO_OUT_IN_CONNECT
demo_gpio_in_case();
#elif GPIO_MODE_INIT
demo_gpio_init();
#endif
}
#endif

View File

@ -0,0 +1,35 @@
/*******************************************************************************
*
*
* File: demo_gpio.h
* Description: GPIO测试用例头文件
* Version: V0.1
* Date: 2023-07-27
* Author: kevin
*******************************************************************************/
#ifndef __DEMO_GPIO_H__
#define __DEMO_GPIO_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_gpio_case(void);
#endif /* __DEMO_GPIO_H__ */

View File

@ -0,0 +1,412 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_i2ci.c
* Description i2c demo code
* Version V0.1
* Date 2023-07-27
* Author swx
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_i2c_master.h"
#include "hal_i2c_slave.h"
#include "demo_hal_i2c.h"
#include "hal_gpio.h"
#include "tau_log.h"
#include "tau_delay.h"
#if _MODULE_DEMO_I2C_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_hal_i2c"
#define BUFFER_SIZE 10 // 以10个数据为例
#define CHECK_TRANS_RESULT(src, dst, size) \
for(uint32_t check_num = 0; check_num < size; check_num ++) \
{\
if(src[check_num] != dst[check_num])\
{\
TAU_LOGD("src[%d] = %x, dst[%d] = %x , error!!\n",check_num,src[check_num],check_num,dst[check_num]);\
return false;\
}\
}\
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
static uint8_t i2cm_read_buffer[BUFFER_SIZE];
static uint8_t i2cs_read_buffer[BUFFER_SIZE];
static uint8_t i2cs_write_buffer[BUFFER_SIZE];
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief i2c master的IO初始化
* @param none
* @retval none
*/
static void i2cm_io_init(void)
{
io_pad_attr_t attrs[] =
{
{IO_PAD_TD_SPIM_CLK, PIN5_MODE_I2C1_SCL, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_TD_SPIM_CSN, PIN6_MODE_I2C1_SDA, IO_IOE_NONE, IO_LVL_HIGH}
};
uint8_t size = sizeof(attrs) / sizeof(io_pad_attr_t);
hal_gpio_config_pad(attrs, size);
}
/**
* @brief i2c slave的IO初始化
* @param none
* @retval none
*/
static void i2cs_io_init(void)
{
io_pad_attr_t attrs[] =
{
{IO_PAD_AP_SPIS_CLK, PIN32_MODE_I2C02_SCL, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_AP_SPIS_CSN, PIN31_MODE_I2C02_SDA, IO_IOE_NONE, IO_LVL_HIGH}
};
uint8_t size = sizeof(attrs) / sizeof(io_pad_attr_t);
hal_gpio_config_pad(attrs, size);
}
/**
* @brief i2c slave的中断回调服务函数
* @param index: I2Cx index
* @param int_status:
* @param recieve_num packet数
* @retval none
*/
static void i2cs_callback(i2c_index_e index, hal_i2cs_event_e int_status, size_t recieve_num)
{
/* 收到READ_REQ中断 */
if (int_status == I2CS_EVENT_READ)
{
/* 更新I2CS的txbuffer将i2cs_write_buffer的数据发送给主机 */
hal_i2cs_update_tx_buffer(index, i2cs_write_buffer, BUFFER_SIZE, false);
}
/* 收到stop中断 */
else if (int_status == I2CS_EVENT_STOP)
{
if (recieve_num > 0)
{
/* 将读到的值写到i2cs_write_buffer中 */
for (int i = 0; i < recieve_num; i++)
i2cs_write_buffer[i] = i2cs_read_buffer[i];
}
/* 更新I2CS的rxbuffer */
hal_i2cs_update_rx_buffer(index, i2cs_read_buffer, BUFFER_SIZE);
}
}
/**
* @brief i2c master初始化
* @param index: I2Cx index
* @param addr:
* @param addr_bits:
* @param speed:
* @retval none
*/
void i2cm_init(i2c_index_e index, uint16_t addr, uint8_t addr_bits, uint32_t speed)
{
/* I2CS的IO初始化 */
i2cm_io_init();
/* I2CM初始化 */
hal_i2cm_init(index, addr, addr_bits, speed);
}
/**
* @brief i2c slave初始化
* @param index: I2Cx index
* @param addr:
* @param addr_bits:
* @retval none
*/
void i2cs_init(i2c_index_e index, uint16_t addr, uint8_t addr_bits)
{
/* I2CS的IO初始化 */
i2cs_io_init();
/* I2CS的初始化 */
hal_i2cs_init(index, addr, addr_bits);
/* I2CS注册回调函函数 */
hal_i2cs_register_callback(index, i2cs_callback);
/* I2CS设置初始读写buffer */
hal_i2cs_update_rx_buffer(index, i2cs_read_buffer, BUFFER_SIZE);
hal_i2cs_update_tx_buffer(index, i2cs_write_buffer, BUFFER_SIZE, false);
/* I2CS启动 */
hal_i2cs_start(index);
}
/**
* @brief i2c master去初始化
* @param index: I2Cx index
* @retval none
*/
void i2cm_deinit(i2c_index_e index)
{
hal_i2cm_deinit(index);
}
/**
* @brief i2c slave去初始化
* @param index: I2Cx index
* @retval none
*/
void i2cs_deinit(i2c_index_e index)
{
hal_i2cs_stop(index);
hal_i2cs_deinit(index);
}
/**
* @brief i2c case buffer初始化
* @param none
* @retval none
*/
static void i2c_case_buffer_init(void)
{
TAU_LOGD("i2c_case_buffer_init\n");
/* init buffer */
uint8_t i = 0 ;
for (i = 0; i < BUFFER_SIZE; i ++)
{
i2cm_read_buffer[i] = 0;
i2cs_read_buffer[i] = 0;
i2cs_write_buffer[i] = 0;
}
}
/**
* @brief I2CM与I2CS对接,I2CM用CPU方式传输数据的正确性
* @param
* @retval bool true/false
*/
static bool hal_i2c_cpu_transfer_case(void)
{
uint8_t write_buffer[10] = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
uint8_t addr_bit = 7;
uint32_t speed = 400000;
uint16_t addr = 0x50;
/* I2CM初始化I2C1+目标地址0x50+7位地址+400k传输速率 */
i2cm_init(I2C_INDEX_1, addr, addr_bit, speed);
/* I2CS初始化I2C0+本机地址0x50+7位地址 */
i2cs_init(I2C_INDEX_0, addr, addr_bit);
/* buffer初始化 */
i2c_case_buffer_init();
/* I2CM写write_buffer数据到0x50地址的从机 */
if (hal_i2cm_write(I2C_INDEX_1, write_buffer, BUFFER_SIZE) != true)
{
TAU_LOGD("I2CM CPU write data fail!\n");
return false;
}
TAU_LOGD("tx: %x %x %x %x %x %x %x %x %x %x\n", write_buffer[0], write_buffer[1], write_buffer[2], \
write_buffer[3], write_buffer[4], write_buffer[5], write_buffer[6], write_buffer[7], write_buffer[8], \
write_buffer[9]);
/* I2CM向地址为0x50的从机读取BUFFER_SIZE个数据此case中寄存器addr和size为0可自行添加 */
if (hal_i2cm_read(I2C_INDEX_1, 0, 0, i2cm_read_buffer, BUFFER_SIZE) != true)
{
TAU_LOGD("I2CM CPU read data fail!\n");
return false;
}
TAU_LOGD("rx: %x %x %x %x %x %x %x %x %x %x\n", i2cm_read_buffer[0], i2cm_read_buffer[1], \
i2cm_read_buffer[2], i2cm_read_buffer[3], i2cm_read_buffer[4], i2cm_read_buffer[5], \
i2cm_read_buffer[6], i2cm_read_buffer[7], i2cm_read_buffer[8], i2cm_read_buffer[9]);
/* 检查传输结果I2CM发出去的数据是否与接收到的数据一致 */
CHECK_TRANS_RESULT(write_buffer, i2cm_read_buffer, BUFFER_SIZE);
/* I2CM && I2CS去初始化 */
i2cs_deinit(I2C_INDEX_0);
i2cm_deinit(I2C_INDEX_1);
TAU_LOGD("hal_i2c_cpu_transfer_case done!\n");
return true;
}
/**
* @brief I2CM与I2CS对接,I2CM用DMA方式传输数据的正确性
* @param
* @retval bool true/false
*/
static bool hal_i2c_dma_transfer_case(void)
{
uint8_t write_buffer[10] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29};
uint8_t addr_bit = 7;
uint32_t speed = 400000;
uint16_t addr = 0x50;
/* I2CM初始化I2C1+目标地址0x50+7位地址+400k传输速率 */
i2cm_init(I2C_INDEX_1, addr, addr_bit, speed);
/* I2CS初始化I2C0+本机地址0x50+7位地址 */
i2cs_init(I2C_INDEX_0, addr, addr_bit);
/* buffer初始化 */
i2c_case_buffer_init();
/* I2CM写write_buffer数据到0x50地址的从机 */
hal_i2cm_dma_write(I2C_INDEX_1, write_buffer, BUFFER_SIZE);
/* 等待I2CM传输完成 */
while (!hal_i2cm_get_transfer_complete(I2C_INDEX_1));
TAU_LOGD("tx: %x %x %x %x %x %x %x %x %x %x\n", write_buffer[0], write_buffer[1], write_buffer[2], \
write_buffer[3], write_buffer[4], write_buffer[5], write_buffer[6], write_buffer[7], write_buffer[8], \
write_buffer[9]);
/* I2CM向地址为0x50的从机读取BUFFER_SIZE个数据此case中寄存器addr和size为0可自行添加 */
hal_i2cm_dma_read(I2C_INDEX_1, 0, 0, i2cm_read_buffer, BUFFER_SIZE);
/* 等待I2CM传输完成 */
while (!hal_i2cm_get_transfer_complete(I2C_INDEX_1));
TAU_LOGD("rx: %x %x %x %x %x %x %x %x %x %x\n", i2cm_read_buffer[0], i2cm_read_buffer[1], \
i2cm_read_buffer[2], i2cm_read_buffer[3], i2cm_read_buffer[4], i2cm_read_buffer[5], \
i2cm_read_buffer[6], i2cm_read_buffer[7], i2cm_read_buffer[8], i2cm_read_buffer[9]);
/* 检查传输结果I2CM发出去的数据是否与接收到的数据一致 */
CHECK_TRANS_RESULT(write_buffer, i2cm_read_buffer, BUFFER_SIZE);
/* I2CM && I2CS去初始化 */
i2cs_deinit(I2C_INDEX_0);
i2cm_deinit(I2C_INDEX_1);
TAU_LOGD("hal_i2c_dma_transfer_case done!\n");
return true;
}
/**
* @brief I2CM与I2CS对接,slave通信的正确性
* @param
* @retval bool true/false
*/
static bool hal_i2c_double_slave_case(void)
{
uint16_t i2cs1_addr = 0x50;
uint8_t i2cs1_addrbit = 7;
uint16_t i2cs2_addr = 0x120;
uint8_t i2cs2_addrbit = 10;
uint32_t speed = 400000;
uint8_t write_buffer1[10] = {0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
uint8_t write_buffer2[10] = {0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29};
/* I2CM初始化I2C1+目标地址0x50+7位地址+400k传输速率 */
i2cm_init(I2C_INDEX_1, i2cs1_addr, i2cs1_addrbit, speed);
/* I2CS初始化I2C0+本机地址0x50+7位地址 */
i2cs_init(I2C_INDEX_0, i2cs1_addr, i2cs1_addrbit);
/* I2CS初始化I2C2+本机地址0x120+10位地址 */
i2cs_init(I2C_INDEX_2, i2cs2_addr, i2cs2_addrbit);
/* I2CM写write_buffer1数据到0x50地址的从机 */
hal_i2cm_dma_write(I2C_INDEX_1, write_buffer1, BUFFER_SIZE);
/* 等待I2CM传输完成 */
while (!hal_i2cm_get_transfer_complete(I2C_INDEX_1));
TAU_LOGD("tx: %x %x %x %x %x %x %x %x %x %x\n", write_buffer1[0], write_buffer1[1], write_buffer1[2], \
write_buffer1[3], write_buffer1[4], write_buffer1[5], write_buffer1[6], write_buffer1[7], write_buffer1[8], \
write_buffer1[9]);
/* I2CM向地址为0x50的从机读取BUFFER_SIZE个数据此case中寄存器addr和size为0可自行添加 */
hal_i2cm_dma_read(I2C_INDEX_1, 0, 0, i2cm_read_buffer, BUFFER_SIZE);
/* 等待I2CM传输完成 */
while (!hal_i2cm_get_transfer_complete(I2C_INDEX_1));
TAU_LOGD("rx: %x %x %x %x %x %x %x %x %x %x\n", i2cm_read_buffer[0], i2cm_read_buffer[1], \
i2cm_read_buffer[2], i2cm_read_buffer[3], i2cm_read_buffer[4], i2cm_read_buffer[5], \
i2cm_read_buffer[6], i2cm_read_buffer[7], i2cm_read_buffer[8], i2cm_read_buffer[9]);
/* 检查传输结果I2CM发出去的数据是否与接收到的数据一致 */
CHECK_TRANS_RESULT(write_buffer1, i2cm_read_buffer, BUFFER_SIZE);
/* 修改I2CM的目标从机地址为10位地址的0x120 */
hal_i2cm_set_slave_addr(I2C_INDEX_1, i2cs2_addr, i2cs2_addrbit);
/* I2CM写write_buffer2数据到0x120地址的从机 */
hal_i2cm_dma_write(I2C_INDEX_1, write_buffer2, BUFFER_SIZE);
/* 等待I2CM传输完成 */
while (!hal_i2cm_get_transfer_complete(I2C_INDEX_1));
TAU_LOGD("tx: %x %x %x %x %x %x %x %x %x %x\n", write_buffer2[0], write_buffer2[1], write_buffer2[2], \
write_buffer2[3], write_buffer2[4], write_buffer2[5], write_buffer2[6], write_buffer2[7], write_buffer2[8], \
write_buffer2[9]);
/* I2CM向地址为0x120的从机读取BUFFER_SIZE个数据此case中寄存器addr和size为0可自行添加 */
hal_i2cm_dma_read(I2C_INDEX_1, 0, 0, i2cm_read_buffer, BUFFER_SIZE);
/* 等待I2CM传输完成 */
while (!hal_i2cm_get_transfer_complete(I2C_INDEX_1));
TAU_LOGD("rx: %x %x %x %x %x %x %x %x %x %x\n", i2cm_read_buffer[0], i2cm_read_buffer[1], \
i2cm_read_buffer[2], i2cm_read_buffer[3], i2cm_read_buffer[4], i2cm_read_buffer[5], \
i2cm_read_buffer[6], i2cm_read_buffer[7], i2cm_read_buffer[8], i2cm_read_buffer[9]);
/* 检查传输结果I2CM发出去的数据是否与接收到的数据一致 */
CHECK_TRANS_RESULT(write_buffer2, i2cm_read_buffer, BUFFER_SIZE);
/* I2CM && I2CS去初始化 */
i2cm_deinit(I2C_INDEX_1);
i2cs_deinit(I2C_INDEX_0);
i2cs_deinit(I2C_INDEX_2);
TAU_LOGD("hal_i2c_double_slave_case done!\n");
return true;
}
/**
* @brief i2c demo case
* @param none
* @retval none
*/
void demo_hal_i2c(void)
{
/* I2C DMA传输case */
if (!hal_i2c_dma_transfer_case())
{
i2cs_deinit(I2C_INDEX_0);
i2cm_deinit(I2C_INDEX_1);
TAU_LOGD("hal_i2c_dma_transfer_case fail!\n");
}
/* 双slave传输case */
if (!hal_i2c_double_slave_case())
{
i2cm_deinit(I2C_INDEX_1);
i2cs_deinit(I2C_INDEX_0);
i2cs_deinit(I2C_INDEX_2);
TAU_LOGD("hal_i2c_double_slave_case fail!\n");
}
/* I2C CPU传输case */
if (!hal_i2c_cpu_transfer_case())
{
i2cs_deinit(I2C_INDEX_0);
i2cm_deinit(I2C_INDEX_1);
TAU_LOGD("hal_i2c_cpu_transfer_case fail!\n");
}
TAU_LOGD("i2c case done\n");
}
#endif

View File

@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_i2c.h
* Description: demo i2c
* Version: V0.1
* Date 2023-07-27
* Author: swx
*******************************************************************************/
#ifndef __DEMO_HAL_I2C_H__
#define __DEMO_HAL_I2C_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "test_cfg_global.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_i2c(void);
#endif /* __DEMO_HAL_I2C_H__ */

View File

@ -0,0 +1,125 @@
/*******************************************************************************
*
*
* File: demo_hal_pwm.c
* Description pwm demo code
* Version V0.1
* Date 2023-07-27
* Author jaya
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "stdarg.h"
#include "stdlib.h"
#include "stdio.h"
#include "test_cfg_global.h"
#include "hal_pwm.h"
#include "hal_gpio.h"
#include "tau_log.h"
#include "tau_delay.h"
#include "demo_hal_pwm.h"
#if _MODULE_DEMO_PWM_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_hal_pwm"
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief PWM输出demo
* @param
* @retval bool true/false
*/
bool demo_digital_pwm_output(void)
{
/* GPIO 初始化,配置PIN15输出PWM, PWM可配置从PIN2/PIN13/PIN15/PIN17/PIN36输出 */
hal_gpio_set_mode(IO_PIN_15, PIN15_MODE_PWMO);
//hal_gpio_set_mode(IO_PIN_17, PIN17_MODE_PWMO);
/* PWM 初始化 配置为30K 255阶 */
if (hal_pwm_init(30000, 255))
{
/* PWM enable */
hal_pwm_enable(true);
uint8_t i = 0;
while (i != 255)
{
/* PWM 配置占空比, 从1/255开始到100%*/
hal_pwm_set_duty(i);
delayMs(20);
i++;
}
}
/* PWM disable */
hal_pwm_enable(false);
/* PWM deinit */
hal_pwm_deinit();
TAU_LOGD("demo_digital_pwm_output done\n");
return true;
}
/**
* @brief PWM输出demo
* @param
* @retval bool true/false
*/
bool demo_analog_pwm_output_with_vcc(void)
{
/* 模拟PWM,可选择不从数字IO输出PWM,也可以选择从数字IO输出 */
hal_gpio_set_mode(IO_PIN_15, PIN15_MODE_PWMO);
//hal_gpio_set_mode(IO_PIN_17, PIN17_MODE_PWMO);
/* PWM 初始化 配置为30K 255阶 */
if (hal_pwm_init(30000, 255))
{
/* PWM enable */
hal_pwm_enable(true);
/* ELVCC 接入3-6V的电源,PWM 配置从ELVCC调试后的电源 */
hal_pwm_set_elvcc_output(true);
uint8_t i = 0;
while (i != 255)
{
hal_pwm_set_duty(i);
delayMs(20);
i++;
}
}
/* PWM disable */
hal_pwm_enable(false);
/* PWM deinit */
hal_pwm_deinit();
TAU_LOGD("demo_digital_pwm_output done\n");
return true;
}
/**
* @brief pwm demo case
* @param none
* @retval none
*/
void demo_hal_pwm(void)
{
TAU_LOGD("pwm dmeo \n");
//demo_digital_pwm_output();
demo_analog_pwm_output_with_vcc();
}
#endif

View File

@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_pwm.h
* Description: demo pwm
* Version: V0.1
* Date 2023-07-27
* Author: jaya
*******************************************************************************/
#ifndef __DEMO_HAL_PWM_H__
#define __DEMO_HAL_PWM_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "test_cfg_global.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_pwm(void);
#endif /* __DEMO_HAL_PWM_H__ */

View File

@ -0,0 +1,218 @@
/*******************************************************************************
*
*
* File: demo_hal_pwr.c
* Description pwr demo code
* Version V0.1
* Date 2023-07-27
* Author jaya
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "stdarg.h"
#include "stdlib.h"
#include "stdio.h"
#include "test_cfg_global.h"
#include "hal_pwr.h"
#include "hal_gpio.h"
#include "tau_log.h"
#include "tau_delay.h"
#include "demo_hal_pwr.h"
#if _MODULE_DEMO_PWR_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_hal_pwr"
#define MAIN_POWER_SELECT PWR_SEL_VCC /* 主供电电源选择 */
#define SLEEP_MODE_POWER PWR_SLEEP_IN_TP18 /* 息屏电源选择 */
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
static bool sg_system_resume = false;
static void ap_rstn_pull_high_cb(void *data)
{
TAU_LOGD("AP RSTN !\n");
/* system resume begin */
sg_system_resume = true;
/* 关闭AP reset检查 */
hal_gpio_set_ap_reset_int(DISABLE, NULL, DETECT_HIGH_LVL);
}
/**
* @brief normal sleep mode demo
* @param
* @retval bool true/false
*/
static bool demo_normal_sleep_mode()
{
/* 主电源供电选择 */
hal_pwr_set_main_power(MAIN_POWER_SELECT);
if (MAIN_POWER_SELECT == PWR_SEL_VCC)
{
while (hal_pwr_get_vcc_power_ready() == false);
}
/* system 正常启动 */
/* sustem suspend */
/* 关闭外设/图像通路 */
/* 息屏电源供电选择 */
hal_pwr_set_sleep_mode_power(SLEEP_MODE_POWER);
/* enter deep sleep mode */
TAU_LOGD("enter stop mode now\n");
/* normal sleep mode, MCU可以正常工作 */
hal_gpio_set_ap_reset_int(ENABLE, ap_rstn_pull_high_cb, DETECT_RISING_EDGE);
hal_pwr_enter_normal_sleep_mode();
while (1)
{
/* normal sleep mode 下外设模块正常,打印正常,SWD通讯正常 */
TAU_LOGD("wait ap rstn\n");
if (sg_system_resume)
{
break;
}
delayMs(1000);
}
/* 退出sleep mode */
hal_pwr_exit_sleep_mode();
/* system resume */
TAU_LOGD("system resum\n");
return true;
}
/**
* @brief stop sleep mode demo
* @param
* @retval bool true/false
*/
static bool demo_stop_sleep_mode()
{
/* 主电源供电选择 */
hal_pwr_set_main_power(MAIN_POWER_SELECT);
if (MAIN_POWER_SELECT == PWR_SEL_VCC)
{
while (hal_pwr_get_vcc_power_ready() == false);
}
/* system 正常启动 */
/* sustem suspend */
/* 关闭外设/图像通路 */
/* 息屏电源供电选择 */
hal_pwr_set_sleep_mode_power(SLEEP_MODE_POWER);
/* enter deep sleep mode */
while (1)
{
TAU_LOGD("enter stop mode now\n");
/* 等待打印完成 */
delayMs(200); /* 实际使用不需要延时 */
/* 配置唤醒AP RSTN 、SPIS CS、TD INT 唤醒*/
hal_pwr_set_stop_sleep_wakeup_pin(IO_PAD_AP_RSTN, WUP_RISING_EDGE);
hal_pwr_set_stop_sleep_wakeup_pin(IO_PAD_AP_SPIS_CSN, WUP_FALLING_EDGE);
hal_pwr_set_stop_sleep_wakeup_pin(IO_PAD_TD_INT, WUP_FALLING_EDGE);
delayMs(1000); /* 实际使用不需要延时 */
/* 进入stop sleep mode, MCU停止运行,SWD无法通讯 */
io_pad_e wakeup_io = hal_pwr_enter_stop_sleep_mode();
TAU_LOGD("stop sleep mode wake up by io %d\n", wakeup_io);
if (wakeup_io == IO_PAD_AP_RSTN)
{
TAU_LOGD("AP RSTN reset, system resume\n");
break;
}
else
{
TAU_LOGD("Touch process\n");
/* 处理touchu 事件 处理完成后继续进入sleep mode*/
}
}
/* 退出sleep mode */
hal_pwr_exit_sleep_mode();
/* system resume */
TAU_LOGD("system resum\n");
return true;
}
/**
* @brief deep sleep mode demo
* @param
* @retval bool true/false
*/
static bool demo_deep_sleep_mode()
{
pwr_reset_flag_e reset_flag = hal_pwr_get_reset_flag();
TAU_LOGD("wakeup flag %d\n", reset_flag);
if (reset_flag == RF_TDINT_WAKEUP)
{
/* TD_INT reset, 处理触摸事件, 唤醒AP 等待AP RSTN*/
TAU_LOGD("TD_INT reset\n");
}
/* 主电源供电选择 */
hal_pwr_set_main_power(MAIN_POWER_SELECT);
if (MAIN_POWER_SELECT == PWR_SEL_VCC)
{
while (hal_pwr_get_vcc_power_ready() == false);
}
/* system 正常启动 */
/* enter deep sleep mode */
TAU_LOGD("enter deep mode now\n");
/* 息屏电源供电选择 */
hal_pwr_set_sleep_mode_power(SLEEP_MODE_POWER);
/* deep sleep mode,配置AP RSTN 上升沿,TD INT 下降沿唤醒 */
hal_pwr_enter_deep_sleep_mode(WUP_RISING_EDGE, WUP_FALLING_EDGE);
/* 数字完全掉电,SWD无法通讯,唤醒后芯片重启 */
return true;
}
/**
* @brief pwr demo case
* @param none
* @retval none
*/
void demo_hal_pwr(void)
{
TAU_LOGD("pwr dmeo \n");
/* normal sleep mode demo */
demo_normal_sleep_mode();
/* stop sleep mode demo */
demo_stop_sleep_mode();
/* deep sleep mode demo */
demo_deep_sleep_mode();
}
#endif

View File

@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_pwr.h
* Description: demo pwr
* Version: V0.1
* Date 2023-07-27
* Author: jaya
*******************************************************************************/
#ifndef __DEMO_HAL_PWR_H__
#define __DEMO_HAL_PWR_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "test_cfg_global.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_pwr(void);
#endif /* __DEMO_HAL_PWR_H__ */

View File

@ -0,0 +1,485 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_spi.c
* Description spi demo code
* Version V0.1
* Date 2023-07-27
* Author swx
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_spi_master.h"
#include "hal_spi_slave.h"
#include "demo_hal_spi.h"
#include "hal_gpio.h"
#include "tau_log.h"
#include "tau_delay.h"
#if _MODULE_DEMO_SPI_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_hal_spi"
#define BUFFER_SIZE 255
#define CHECK_TRANS_RESULT(src, dst, size) \
for(uint32_t check_num = 0; check_num < size; check_num ++) \
{\
if(src[check_num] != dst[check_num])\
{\
TAU_LOGD("src[%d] = %x, dst[%d] = %x , error!!\n",check_num,src[check_num],check_num,dst[check_num]);\
return false;\
}\
}\
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
bool spis_hw_miss_flag = false;
/*SPIS硬件回复功能32组回复数据*/
uint8_t spis_hw_header_data0[] = {0xf0, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d};
uint8_t spis_hw_header_data1[] = {0xf1, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
uint8_t spis_hw_header_data2[] = {0xf2, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29};
uint8_t spis_hw_header_data3[] = {0xf3, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39};
uint8_t spis_hw_header_data4[] = {0xf4, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49};
uint8_t spis_hw_header_data5[] = {0xf5, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59};
uint8_t spis_hw_header_data6[] = {0xf6, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69};
uint8_t spis_hw_header_data7[] = {0xf7, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79};
uint8_t spis_hw_header_data8[] = {0xf8, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89};
uint8_t spis_hw_header_data9[] = {0xf9, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99};
uint8_t spis_hw_header_data10[] = {0xfa, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9};
uint8_t spis_hw_header_data11[] = {0xfb, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9};
uint8_t spis_hw_header_data12[] = {0xfc, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9};
uint8_t spis_hw_header_data13[] = {0xfd, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9};
uint8_t spis_hw_header_data14[] = {0xfe, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9};
uint8_t spis_hw_header_data15[] = {0xff, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9};
uint8_t spis_hw_header_data16[] = {0xf0, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, 0x81, 0x91};
uint8_t spis_hw_header_data17[] = {0xf1, 0x22, 0x31, 0x42, 0x52, 0x62, 0x72, 0x82, 0x92};
uint8_t spis_hw_header_data18[] = {0xf2, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73, 0x83, 0x93};
uint8_t spis_hw_header_data19[] = {0xf3, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74, 0x84, 0x94};
uint8_t spis_hw_header_data20[] = {0xf4, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09};
uint8_t spis_hw_header_data21[] = {0xf5, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19};
uint8_t spis_hw_header_data22[] = {0xf6, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29};
uint8_t spis_hw_header_data23[] = {0xf7, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39};
uint8_t spis_hw_header_data24[] = {0xf8, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49};
uint8_t spis_hw_header_data25[] = {0xf9, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59};
uint8_t spis_hw_header_data26[] = {0xfa, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69};
uint8_t spis_hw_header_data27[] = {0xfb, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79};
uint8_t spis_hw_header_data28[] = {0xfc, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89};
uint8_t spis_hw_header_data29[] = {0xfd, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99};
uint8_t spis_hw_header_data30[] = {0xfe, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89};
uint8_t spis_hw_header_data31[] = {0xff, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xf0, 0x13, 0xff};
static hal_spis_hw_ack_info_t spis_hw_test_header[32] =
{
/*序号_匹配值_匹配长度_使能_回复延时_回复数据的地址_回复数据长度 */
{0, {0x01, 0x02, 0x03, 0x04}, 0, 1, 0, spis_hw_header_data0, sizeof(spis_hw_header_data0) / sizeof(uint8_t) - 1},
{1, {0x05, 0x06, 0x07, 0x08}, 1, 1, 1, spis_hw_header_data1, sizeof(spis_hw_header_data1) / sizeof(uint8_t) - 1},
{2, {0x09, 0x0a, 0x0b, 0x0c}, 2, 1, 2, spis_hw_header_data2, sizeof(spis_hw_header_data2) / sizeof(uint8_t) - 1},
{3, {0x0d, 0x0e, 0x0f, 0x10}, 3, 1, 3, spis_hw_header_data3, sizeof(spis_hw_header_data3) / sizeof(uint8_t) - 1},
{4, {0x11, 0x12, 0x13, 0x14}, 0, 1, 4, spis_hw_header_data4, sizeof(spis_hw_header_data4) / sizeof(uint8_t) - 1},
{5, {0x15, 0x16, 0x17, 0x18}, 1, 1, 5, spis_hw_header_data5, sizeof(spis_hw_header_data5) / sizeof(uint8_t) - 1},
{6, {0x19, 0x1a, 0x1b, 0x1c}, 2, 1, 6, spis_hw_header_data6, sizeof(spis_hw_header_data6) / sizeof(uint8_t) - 1},
{7, {0x1d, 0x1e, 0x1f, 0x20}, 3, 1, 7, spis_hw_header_data7, sizeof(spis_hw_header_data7) / sizeof(uint8_t) - 1},
{8, {0x21, 0x22, 0x23, 0x24}, 0, 1, 8, spis_hw_header_data8, sizeof(spis_hw_header_data8) / sizeof(uint8_t) - 1},
{9, {0x25, 0x26, 0x27, 0x28}, 1, 1, 9, spis_hw_header_data9, sizeof(spis_hw_header_data9) / sizeof(uint8_t) - 1},
{10, {0x29, 0x2a, 0x2b, 0x2c}, 2, 1, 10, spis_hw_header_data10, sizeof(spis_hw_header_data10) / sizeof(uint8_t) - 1},
{11, {0x2d, 0x2e, 0x2f, 0x30}, 3, 1, 0, spis_hw_header_data11, sizeof(spis_hw_header_data11) / sizeof(uint8_t) - 1},
{12, {0x31, 0x32, 0x33, 0x34}, 0, 1, 1, spis_hw_header_data12, sizeof(spis_hw_header_data12) / sizeof(uint8_t) - 1},
{13, {0x35, 0x36, 0x37, 0x38}, 1, 1, 2, spis_hw_header_data13, sizeof(spis_hw_header_data13) / sizeof(uint8_t) - 1},
{14, {0x39, 0x3a, 0x3b, 0x3c}, 2, 1, 3, spis_hw_header_data14, sizeof(spis_hw_header_data14) / sizeof(uint8_t) - 1},
{15, {0x3d, 0x3e, 0x3f, 0x40}, 3, 1, 4, spis_hw_header_data15, sizeof(spis_hw_header_data15) / sizeof(uint8_t) - 1},
{16, {0x41, 0x42, 0x43, 0x44}, 0, 1, 5, spis_hw_header_data16, sizeof(spis_hw_header_data16) / sizeof(uint8_t) - 1},
{17, {0x45, 0x46, 0x47, 0x48}, 1, 1, 6, spis_hw_header_data17, sizeof(spis_hw_header_data17) / sizeof(uint8_t) - 1},
{18, {0x49, 0x4a, 0x4b, 0x4c}, 2, 1, 7, spis_hw_header_data18, sizeof(spis_hw_header_data18) / sizeof(uint8_t) - 1},
{19, {0x4d, 0x4e, 0x4f, 0x50}, 3, 1, 8, spis_hw_header_data19, sizeof(spis_hw_header_data19) / sizeof(uint8_t) - 1},
{20, {0x51, 0x52, 0x53, 0x54}, 0, 1, 9, spis_hw_header_data20, sizeof(spis_hw_header_data20) / sizeof(uint8_t) - 1},
{21, {0x55, 0x56, 0x57, 0x58}, 1, 1, 10, spis_hw_header_data21, sizeof(spis_hw_header_data21) / sizeof(uint8_t) - 1},
{22, {0x59, 0x5a, 0x5b, 0x5c}, 2, 1, 11, spis_hw_header_data22, sizeof(spis_hw_header_data22) / sizeof(uint8_t) - 1},
{23, {0x5d, 0x5e, 0x5f, 0x60}, 3, 1, 12, spis_hw_header_data23, sizeof(spis_hw_header_data23) / sizeof(uint8_t) - 1},
{24, {0x61, 0x62, 0x63, 0x64}, 0, 1, 13, spis_hw_header_data24, sizeof(spis_hw_header_data24) / sizeof(uint8_t) - 1},
{25, {0x65, 0x66, 0x67, 0x68}, 1, 1, 14, spis_hw_header_data25, sizeof(spis_hw_header_data25) / sizeof(uint8_t) - 1},
{26, {0x69, 0x6a, 0x6b, 0x6c}, 2, 1, 15, spis_hw_header_data26, sizeof(spis_hw_header_data26) / sizeof(uint8_t) - 1},
{27, {0x6d, 0x6e, 0x6f, 0x70}, 3, 1, 11, spis_hw_header_data27, sizeof(spis_hw_header_data27) / sizeof(uint8_t) - 1},
{28, {0x71, 0x72, 0x73, 0x74}, 0, 1, 12, spis_hw_header_data28, sizeof(spis_hw_header_data28) / sizeof(uint8_t) - 1},
{29, {0x75, 0x76, 0x77, 0x78}, 1, 1, 13, spis_hw_header_data29, sizeof(spis_hw_header_data29) / sizeof(uint8_t) - 1},
{30, {0x79, 0x7a, 0x7b, 0x7c}, 2, 1, 12, spis_hw_header_data30, sizeof(spis_hw_header_data30) / sizeof(uint8_t) - 1},
{31, {0x7d, 0x7e, 0x7f, 0x80}, 3, 1, 14, spis_hw_header_data31, sizeof(spis_hw_header_data31) / sizeof(uint8_t) - 1},
};
static uint8_t spim_write_buffer[BUFFER_SIZE] = {0};
static uint8_t spim_read_buffer[BUFFER_SIZE] = {0};
static uint8_t spis_read_buffer[BUFFER_SIZE] = {0};
static uint8_t spis_write_buffer[BUFFER_SIZE] = {0};
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief spi master IO初始化
* @param none
* @retval
*/
static void spim_io_init(void)
{
io_pad_attr_t attrs[] =
{
{IO_PAD_TD_SPIM_CLK, PIN5_MODE_SPIM_SCLK, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_TD_SPIM_CSN, PIN6_MODE_SPIM_CSN, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_TD_SPIM_MISO, PIN7_MODE_SPIM_MISO, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_TD_SPIM_MOSI, PIN4_MODE_SPIM_MOSI, IO_IOE_NONE, IO_LVL_HIGH}
};
uint8_t size = sizeof(attrs) / sizeof(io_pad_attr_t);
hal_gpio_config_pad(attrs, size);
}
/**
* @brief spi slave IO初始化
* @param none
* @retval
*/
static void spis_io_init(void)
{
io_pad_attr_t attrs[] =
{
{IO_PAD_AP_SPIS_CLK, PIN32_MODE_SPIS_SCLK, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_AP_SPIS_CSN, PIN31_MODE_SPIS_CSN, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_AP_SPIS_MISO, PIN30_MODE_SPIS_MISO, IO_IOE_NONE, IO_LVL_HIGH},
{IO_PAD_AP_SPIS_MOSI, PIN33_MODE_SPIS_MOSI, IO_IOE_NONE, IO_LVL_HIGH}
};
uint8_t size = sizeof(attrs) / sizeof(io_pad_attr_t);
hal_gpio_config_pad(attrs, size);
}
/**
* @brief spi slave中断回调函数
* @param eventSPIS收到的中断事件
* @param packet_info SPIS收到的数据packet
* @retval
*/
void spis_callback(hal_spis_event_e event, hal_spis_packet_info_t *packet_info)
{
/* 收到CS_RISE中断 */
if (event == SPIS_EVENT_RCV_CS_RISE)
{
/* 更新SPIS的txbuffer和rxbuffer */
hal_spis_update_rx_buffer(spis_read_buffer, BUFFER_SIZE);
hal_spis_update_tx_buffer(spis_write_buffer, BUFFER_SIZE, true);
}
/* 收到CS_FALL中断 */
else if (event == SPIS_EVENT_RCV_CS_FALL)
{
//TAU_LOGD("spis_test SPIS_EVENT_RCV_CS_FALL\n");
}
/* 收到数据接收指定阈值中断 */
else if (event == SPIS_EVENT_RCV_CNT)
{
//TAU_LOGD("spis_test SPIS_EVENT_RCV_CNT\n");
}
/* 收到数据接收完全中断 */
else if (event == SPIS_EVENT_RCV_FULL)
{
//TAU_LOGD("spis_test SPIS_EVENT_RCV_CNT\n");
}
}
/**
* @brief spi slave硬件快速回复功能中断回调函数
* @param eventSPIS收到的中断事件
* @param packet_info SPIS收到的数据packet
* @retval
*/
void spis_hw_callback(hal_spis_event_e event, hal_spis_packet_info_t *packet_info)
{
/* 收到CS_RISE中断 */
if (event == SPIS_EVENT_RCV_CS_RISE)
{
/* 产生了ALL_MISS中断的标记 */
if (spis_hw_miss_flag)
{
/* 使能SPIS硬件快速回复功能默认回复值为0xE0 */
hal_spis_set_hw_ack_enable(ENABLE, 0xE0);
spis_hw_miss_flag = false;
}
/* SPIS更新读写buffer */
hal_spis_update_tx_buffer(spis_hw_header_data31, sizeof(spis_hw_header_data31) / sizeof(uint8_t), true);
hal_spis_update_rx_buffer(spis_read_buffer, BUFFER_SIZE);
}
/* 收到ALL_MISS中断 */
if (event == SPIS_EVENT_ALL_MISS)
{
/* 关闭SPIS硬件快速回复功能默认回复值为0xF0 */
hal_spis_set_hw_ack_enable(DISABLE, 0xf0);
spis_hw_miss_flag = true;
TAU_LOGE("All miss intr test\n");
}
}
/**
* @brief
* @param range_begin:
* @param renge_end:
* @retval uint32_t :
*/
uint32_t unit_case_get_rand(uint32_t range_begin, uint32_t renge_end)
{
uint32_t range = 1;
if (renge_end > range_begin)
{
range = renge_end - range_begin + 1;
}
else
{
TAU_LOGE("rand range[%d ~ %d] error! default set to 1\n");
}
return (uint32_t)((rand() % range) + range_begin);
}
/**
* @brief spi master和slave的发送/buffer初始化
* @param none
* @retval
*/
static bool spi_case_rand_buffer(bool spim_en, bool spis_en)
{
TAU_LOGD("spi_case_rand_buffer\n");
/* read buffer默认初始化为0, tx buffer 初始为随机数 */
uint8_t i = 0 ;
uint32_t count = BUFFER_SIZE;
for (i = 0; i < count; i ++)
{
spis_read_buffer[i] = 0;
spim_read_buffer[i] = 0;
if (spim_en)
{
spim_write_buffer[i] = unit_case_get_rand(0, 255);
}
if (spis_en)
{
spis_write_buffer[i] = unit_case_get_rand(0, 255);
}
}
return true;
}
/**
* @brief SPIM与SPIS对接,
* @param
* @retval bool true/false
*/
static bool hal_spi_base_case(void)
{
uint32_t speed = 400000;
uint8_t cpha = 0;
uint8_t cpol = 0;
/* 随机buffer值 */
spi_case_rand_buffer(true, true);
/* SPIS IO初始化 */
spis_io_init();
/* SPIS初始化相位0+极性0 */
hal_spis_init(cpha, cpol);
/* SPIS设置初始读写buffer */
hal_spis_update_rx_buffer(spis_read_buffer, BUFFER_SIZE);
hal_spis_update_tx_buffer(spis_write_buffer, BUFFER_SIZE, true);
/* SPIS注册回调函函数这里开启了CS_RISE、CS_FALL、RX_CNT、RX_FULL中断RX_CNT阈值设置为100 */
hal_spis_register_callback(spis_callback, SPIS_EVENT_RCV_CS_RISE | SPIS_EVENT_RCV_CS_FALL | SPIS_EVENT_RCV_CNT | SPIS_EVENT_RCV_FULL, 100);
/* SPIS启动 */
hal_spis_start();
/* SPIM IOc初始化 */
spim_io_init();
/* SPIM初始化400k传输速率+相位0+极性0 */
hal_spim_init(speed, cpha, cpol);
TAU_LOGD("base trans para cpha[%d] cpol[%d] speed[%d] \n", cpha, cpol, speed);
/* 测试 SPIM CPU读写 */
hal_spim_read(spim_write_buffer, BUFFER_SIZE, spim_read_buffer, BUFFER_SIZE);
/* SPIM 写完,检查 SPIS RX buffer 是否等于 SPIM TX buffer*/
CHECK_TRANS_RESULT(spim_write_buffer, spis_read_buffer, BUFFER_SIZE);
/* SPIM 读完,检查 SPIS TX buffer 是否等于 SPIM RX buffer*/
CHECK_TRANS_RESULT(spis_write_buffer, spim_read_buffer, BUFFER_SIZE);
/* 随机buffer值 */
spi_case_rand_buffer(true, false);
/* 测试 SPIM CPU写 */
hal_spim_write(spim_write_buffer, BUFFER_SIZE);
/* SPIM 写完,检查 SPIS RX buffer 是否等于 SPIM TX buffer*/
CHECK_TRANS_RESULT(spim_write_buffer, spis_read_buffer, BUFFER_SIZE);
/* 传输完成,关闭SPI */
hal_spis_stop();
hal_spis_deinit();
hal_spim_deinit();
TAU_LOGD("hal_spi_base_case done!\n");
return true;
}
/**
* @brief SPIM与SPIS对接, SPIS
* @param
* @retval bool true/false
*/
static bool hal_spis_hw_case(void)
{
uint32_t speed = 400000;
uint8_t cpha = 0;
uint8_t cpol = 0;
uint8_t write_buffer[30] = {0x9e, 0xa0, 0x00, 0x01, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
0x8a, 0x1b, 0x1c, 0x5d, 0x7e, 0x4f, 0x20, 0x21, 0x22, 0x23,
0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x30, 0x31, 0x32, 0x33
};
/* SPIS IO初始化 */
spis_io_init();
/* SPIS初始化相位0+极性0 */
hal_spis_init(cpha, cpol);
/* SPIS设置初始读buffer */
hal_spis_update_rx_buffer(spis_read_buffer, BUFFER_SIZE);
/* SPIS设置初始写buffer */
hal_spis_update_tx_buffer(spis_hw_header_data31, sizeof(spis_hw_header_data31) / sizeof(uint8_t), true);
/* SPIS注册回调函函数这里开启了CS_RISE和ALL_MISS中断 */
hal_spis_register_callback(spis_hw_callback, SPIS_EVENT_RCV_CS_RISE | SPIS_EVENT_ALL_MISS, 0);
/* 设置SPIS硬件快速回复参数 */
hal_spis_set_hw_ack_info(spis_hw_test_header, (sizeof(spis_hw_test_header) / sizeof(hal_spis_hw_ack_info_t)));
/* 使能SPIS硬件快速回复功能默认回复值为0xE0 */
hal_spis_set_hw_ack_enable(ENABLE, 0xE0);
/* SPIS启动 */
hal_spis_start();
/* SPIM IO初始化 */
spim_io_init();
/* SPIM初始化400k传输速率+相位0+极性0 */
hal_spim_init(speed, cpha, cpol);
/* 32组硬件快速回复功能参数demo */
for (int k = 0; k < 32; k++)
{
/* write_buffer前4个字节设置为每组参数的匹配值 */
for (int j = 0; j < 4; j++)
{
write_buffer[j] = spis_hw_test_header[k].cmp_data[j];
}
/* 将第11组和第14组的write_buffer[0]自加这样匹配不到后就会产生ALL_MISS中断 */
if ((k == 10) || (k == 13))
{
write_buffer[0]++;
}
/* FLUSH SPIM FIFO */
hal_spim_flush();
/* SPIM发送30个write_buffer数据给SPIS并读取SPIS的30个数据到spim_read_buffer */
hal_spim_read(write_buffer, 30, spim_read_buffer, 30);
/* 等待SPIM传输完成 */
while (!hal_spim_get_transfer_complete());
printf("SPIM_TX:");
for (int i = 0; i < 30; i++)
{
printf("%02x ", spis_read_buffer[i]);
}
printf("\n");
printf("SPIM_RX:");
for (int i = 0; i < 30; i++)
{
printf("%02x ", spim_read_buffer[i]);
}
printf("\n");
/* 以下是校验SPIS的硬件快速回复数据是否正确 */
int index = spis_hw_test_header[k].delay_clk + 1 + spis_hw_test_header[k].cmp_len + 1;
printf("CMP_LEN:%d, DELAY_CLK:%d\n", spis_hw_test_header[k].cmp_len, spis_hw_test_header[k].delay_clk);
bool flag = true;
for (int i = 0; i < spis_hw_test_header[k].ack_length; i++)
{
if (spis_hw_test_header[k].ack_address[i] == spim_read_buffer[index + i])
{
if (flag)
{
printf("Group[%d] OK\n", k);
flag = false;
}
continue;
}
else
{
if ((k == 10) || (k == 13))
{
if (flag)
{
printf("Group[%d] All_miss init test\n", k);
flag = false;
}
continue;
}
else
{
printf("Header_addr[%d]:%02x Header_addr[%d]:%02x ", i, spis_hw_test_header[k].ack_address[i], index + i, spim_read_buffer[index + i]);
printf("Group[%d] error\n", k);
return false;
}
}
}
printf("\n");
}
/* 传输完成,关闭SPI */
hal_spis_stop();
hal_spis_deinit();
hal_spim_deinit();
TAU_LOGD("hal_spis_hw_case done!\n");
return true;
}
/**
* @brief spi demo case
* @param none
* @retval none
*/
void demo_hal_spi(void)
{
/* 基础传输case */
if (!hal_spi_base_case())
{
hal_spis_stop();
hal_spis_deinit();
hal_spim_deinit();
TAU_LOGD("hal_spi_base_case fail!\n");
}
/* SPIS硬件快速回复功能case */
if (!hal_spis_hw_case())
{
hal_spis_stop();
hal_spis_deinit();
hal_spim_deinit();
TAU_LOGD("hal_spis_hw_case fail!\n");
}
TAU_LOGD("spi case done\n");
}
#endif

View File

@ -0,0 +1,37 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_spi.h
* Description: demo spi
* Version: V0.1
* Date 2023-07-27
* Author: swx
*******************************************************************************/
#ifndef __DEMO_HAL_SPI_H__
#define __DEMO_HAL_SPI_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "test_cfg_global.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_spi(void);
#endif /* __DEMO_HAL_SPI_H__ */

View File

@ -0,0 +1,140 @@
/*******************************************************************************
*
*
* File: demo_hal_swire.c
* Description swire demo code
* Version V0.1
* Date 2023-07-27
* Author jaya
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "stdarg.h"
#include "stdlib.h"
#include "stdio.h"
#include "test_cfg_global.h"
#include "hal_swire.h"
#include "hal_gpio.h"
#include "tau_log.h"
#include "tau_delay.h"
#include "demo_hal_swire.h"
#if _MODULE_DEMO_SWIRE_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "demo_hal_swire"
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief swire demo
* @param
* @retval bool true/false
*/
static bool demo_hal_swire_gen_swire_manual(void)
{
/* 配置PIN15为SWIRE 输出*/
hal_gpio_set_mode(IO_PAD_AP_SWIRE, PIN15_MODE_SWIRE);
/* swire 初始化 */
hal_swire_init();
/* 启动swire, Swire引脚信号拉高 */
hal_swire_enable(true);
delayMs(100);
/* 配置pulse 为36,产生36个脉冲波形后保持拉高 */
hal_swire_set_pulse(36);
delayMs(100);
/* 配置pulse 为25,产生25个脉冲波形后保持拉高 */
hal_swire_set_pulse(25);
delayMs(100);
/* 关闭swire, Swire引脚信号拉低 */
hal_swire_enable(false);
/* swire去初始化 */
hal_swire_deinit();
return true;
}
/**
* @brief swire demo
* @param
* @retval bool true/false
*/
static bool demo_hal_swire_gen_swire_auto(void)
{
/* 配置PIN15为SWIRE 输出*/
hal_gpio_set_mode(IO_PAD_AP_SWIRE, PIN15_MODE_SWIRE);
/* swire 初始化 */
hal_swire_init();
hal_swire_set_timer(TIMER_NUM0, 16, true);
/* 启动swire, Swire引脚信号拉高,每个16ms发送一次swire信号 */
hal_swire_enable(true);
/*保持每16ms输出36个脉冲持续100ms*/
hal_swire_set_pulse(36); /* 使用timer情况下pulse配置为0时实际输出255个脉冲, 可以在enable之前或者enable前后配置发送正确波形,消除255脉冲问题 */
delayMs(100);
/* 配置pulse 为25,保持每16ms输出36个脉冲持续100ms */
hal_swire_set_pulse(25);
/* 关闭swire, Swire引脚信号拉低 */
hal_swire_enable(false);
/* swire去初始化 */
hal_swire_deinit();
return true;
}
/**
* @brief swire demo
* @param
* @retval bool true/false
*/
static bool demo_hal_swire_set_swire_waveform(void)
{
/* 配置PIN15为SWIRE 输出*/
hal_gpio_set_mode(IO_PAD_AP_SWIRE, PIN15_MODE_SWIRE);
/* swire 初始化 */
hal_swire_init();
/* 配置波形,持续时间50us */
hal_swire_set_waveform(50, 50, 50, 50);
/* 启动swire, Swire引脚信号拉高 */
hal_swire_enable(true);
delayMs(100);
/* 配置pulse 为36,产生36个脉冲波形后保持拉高 */
hal_swire_set_pulse(36);
delayMs(100);
/* 关闭swire, Swire引脚信号拉低 */
hal_swire_enable(false);
/* swire去初始化 */
hal_swire_deinit();
return true;
}
/**
* @brief swire demo case
* @param none
* @retval none
*/
void demo_hal_swire(void)
{
TAU_LOGD("swire dmeo \n");
demo_hal_swire_gen_swire_manual();
//demo_hal_swire_gen_swire_auto();
//demo_hal_swire_set_swire_waveform();
}
#endif

View File

@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_swire.h
* Description: demo swire
* Version: V0.1
* Date 2023-07-27
* Author: jaya
*******************************************************************************/
#ifndef __DEMO_HAL_SWIRE_H__
#define __DEMO_HAL_SWIRE_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "test_cfg_global.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_swire(void);
#endif /* __DEMO_HAL_SWIRE_H__ */

View File

@ -0,0 +1,136 @@
/*******************************************************************************
*
*
* File: demo_hal_timer.c
* Description timer demo源文件
* Version V0.1
* Date 2023-07-27
* Author zzf
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_timer.h"
#include "hal_gpio.h"
#include "tau_log.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "timer-log"
#define TIMER_DEMO_NORMAL 0 //定时器常规使用,循环超时
#define TIMER_DEMO_RESTART 1 //中断重启定时器
#define TIMER_SEL TIMER_NUM0 //timer0-3 都ok
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
static io_pad_e sg_timer_io_pad = IO_PAD_GPIO1;
static gpio_level_e sg_timer_io_lvl = IO_LVL_LOW;
#if TIMER_DEMO_RESTART
static uint16_t sg_timer_count = 1;
#endif
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
#if TIMER_DEMO_RESTART
/**
* @brief
* @param None
* @retval None
*/
static void demo_timer_restart_callback(void *data)
{
/* 翻转GPIO */
sg_timer_io_lvl = (sg_timer_io_lvl ? IO_LVL_LOW : IO_LVL_HIGH);
hal_gpio_set_output_data(sg_timer_io_pad, sg_timer_io_lvl);
/* 重新启动定时器 */
sg_timer_count = sg_timer_count * 10;
if (sg_timer_count > 100)
{
sg_timer_count = 1;
}
hal_timer_start(TIMER_SEL, sg_timer_count * 10, demo_timer_restart_callback, NULL);
}
/**
* @brief
* @param None
* @retval None
*/
static void demo_timer_case_restart(void)
{
/*重新初始化定时器*/
hal_timer_init(TIMER_SEL);
hal_timer_set_repeat(TIMER_SEL, false);
/*初始化GPIO低电平*/
hal_gpio_init_output(sg_timer_io_pad, sg_timer_io_lvl);
/*更新当前timer测试参数*/
hal_timer_start(TIMER_SEL, sg_timer_count * 10, demo_timer_restart_callback, NULL);
}
#endif
#if TIMER_DEMO_NORMAL
/**
* @brief
* @param None
* @retval None
*/
static void demo_timer_normal_callback(void *data)
{
/* 翻转GPIO */
sg_timer_io_lvl = (sg_timer_io_lvl ? IO_LVL_LOW : IO_LVL_HIGH);
hal_gpio_set_output_data(sg_timer_io_pad, sg_timer_io_lvl);
}
/**
* @brief
* @param None
* @retval None
*/
static void demo_timer_case_normal(void)
{
/*重新初始化定时器*/
hal_timer_init(TIMER_SEL);
hal_timer_set_repeat(TIMER_SEL, true);
/*初始化GPIO低电平*/
hal_gpio_init_output(sg_timer_io_pad, sg_timer_io_lvl);
/*更新当前timer测试参数*/
hal_timer_start(TIMER_SEL, 10, demo_timer_normal_callback, NULL);
}
#endif
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_timer_case(void)
{
TAU_LOGI("start test\r\n");
#if TIMER_DEMO_NORMAL
demo_timer_case_normal(); // 10ms定时进行IO电平翻转
#elif TIMER_DEMO_RESTART
demo_timer_case_restart();
#endif
TAU_LOGI("end test\r\n");
}

View File

@ -0,0 +1,39 @@
/*******************************************************************************
*
*
* File: demo_hal_timer.h
* Description: timer demo头文件
* Version: V0.1
* Date: 2023-07-27
* Author: zzf
*******************************************************************************/
#ifndef __DEMO_TIMER_H__
#define __DEMO_TIMER_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_timer_case(void);
#endif /* __DEMO_TIMER_H__ */

View File

@ -0,0 +1,648 @@
/*******************************************************************************
*
*
* File: demo_hal_uart.c
* Description USB转串口分别连接UART01
* Version V0.1
* Date 2023-07-09
* Author kc
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "stdarg.h"
#include "stdlib.h"
#include "stdio.h"
#include "test_cfg_global.h"
#include "hal_uart.h"
#include "hal_gpio.h"
#include "tau_log.h"
#include "tau_delay.h"
#include "demo_hal_uart.h"
#if _MODULE_DEMO_UART_EN
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "uart-log"
#define UART_TEST_AUTO 1
#define TEST_UART_BAUDRATE 115200
/*******************************************************************************
* 3.Global function and Global variable declarations
*******************************************************************************/
/**
* @brief case
*/
typedef enum
{
UART_CASE_BLOCKING = 0,
UART_CASE_NONE_BLOCKING,
UART_CASE_DMA,
UART_CASE_MAX,
UART_CASE_LOOP_BACK,
UART_CASE_DEINIT,
} uart_case_e;
typedef void (*unit_test_func)();
typedef struct unit_test_entry_t
{
char case_name[128]; /* Case名称 */
unit_test_func case_func; /* Case处理函数 */
} unit_test_entry_t;
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
static char sg_uart_log[256] = {0};
static char sg_uart_send_buff[1024] = {0};
static char sg_uart_recv_buff[1024] = {0};
static uart_case_e sg_uart_case = UART_CASE_BLOCKING;
static hal_uart_num_e sg_uart_cur_num = HAL_UART_0;
volatile static bool sg_uart_case_done = true;
static hal_uart_config_t s_huart;
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void STRFMT(const char *fmt, ...)
{
va_list ap;//初始化指向可变参数列表的指针
//将第一个可变参数的地址付给ap即ap指向可变参数列表的开始
va_start(ap, fmt);
//将参数fmt、ap指向的可变参数一起转换成格式化字符串放string数组中其作用同sprintf只是参数类型不同
vsprintf(sg_uart_log, fmt, ap);
va_end(ap); //ap付值为0没什么实际用处主要是为程序健壮性
}
#define TEST_LOG(num,format,...) \
do { \
STRFMT(format, ##__VA_ARGS__); \
hal_uart_send_blocking(num, (uint8_t *)sg_uart_log, strlen(sg_uart_log)); \
} while (0)
/**************************************************************************
* @name : TEST_UART_PinMux_Init
* @brief : UART
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_mode_init(void)
{
//UART 0
hal_gpio_set_mode(IO_PAD_UART0_TX, PIN2_MODE_UART0_TX);
hal_gpio_set_mode(IO_PAD_UART0_RX, PIN36_MODE_UART0_RX);
//UART 1 只有唯一一组
//hal_gpio_set_mode(IO_PAD_UART1_TX, PIN14_MODE_UART1_TX);
//hal_gpio_set_mode(IO_PAD_TD_TP_RESX, PIN13_MODE_UART1_RX);
}
/**************************************************************************
* @name : test_uart_deinit
* @brief : uart注销
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_common_deinit(hal_uart_num_e num)
{
delayMs(500);
hal_uart_deinit(num);
}
/**************************************************************************
* @name : test_uart_normal_init
* @brief : uart
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_common_init(hal_uart_num_e num)
{
hal_uart_config_t huart = {0};
huart.baudrate = TEST_UART_BAUDRATE;
huart.data_width = HAL_UART_DATAWIDTH_8;
huart.parity = HAL_UART_PARITY_NO;
huart.stopbits = HAL_UART_STOPBIT_1;
hal_uart_init(num, &huart);
}
/**
* @brief
* @param
* @retval
*/
static char test_uart_get_input_str(hal_uart_num_e num)
{
char str = 0;
hal_uart_recv_blocking(num, (uint8_t *)&str, 1);
return str;
}
/**
* @brief
* @param
* @retval
*/
static uint32_t test_uart_get_input_num(hal_uart_num_e num)
{
uint32_t recv = 0;
char str[10] = {0};
uint8_t i = 0;
TEST_LOG(num, "input recv num and space to exit:");
while (1)
{
hal_uart_recv_blocking(num, (uint8_t *)&str[i], 1);
if (str[i] >= '0' && str[i] <= '9')
{
TEST_LOG(num, "%c", (char)str[i]);
i++;
}
else if (str[i] == 32)
{
str[i] = 0;
TEST_LOG(num, "\n");
break;
}
}
recv = atol(str);
return recv;
}
/**
* @brief uart所在PAD为GPIO mode
* @param
* @retval
*/
static void test_uart_reset_uart_mode(void)
{
hal_gpio_init_input(IO_PAD_AP_SPIS_MOSI);
hal_gpio_init_input(IO_PAD_UART0_TX);
hal_gpio_init_input(IO_PAD_AP_SPIS_MISO);
hal_gpio_init_input(IO_PAD_UART0_RX);
hal_gpio_init_input(IO_PAD_AP_TPRSTN);
hal_gpio_init_input(IO_PAD_AP_PWMEN);
hal_gpio_init_input(IO_PAD_TD_SPIM_MOSI);
hal_gpio_init_input(IO_PAD_UART1_TX);
hal_gpio_init_input(IO_PAD_TD_TP_RESX);
}
/**
* @brief UART2上设置UART1的TX和RX PAD
* @param
* @retval
*/
static void test_uart_set_uart_mode(void)
{
char str = 0;
hal_uart_num_e uart_org_num = sg_uart_cur_num;
TEST_LOG(uart_org_num, "select UART(0/1):\n");
TEST_LOG(uart_org_num, "Enter:");
str = test_uart_get_input_str(uart_org_num);
TEST_LOG(uart_org_num, "%c\n\n", str);
sg_uart_cur_num = (hal_uart_num_e)(str - '0');
if (HAL_UART_1 == sg_uart_cur_num) /* 测试UART1 */
{
//sel tx
TEST_LOG(uart_org_num, "select UART1 TX:\n");
TEST_LOG(uart_org_num, "0:IO_PAD_UART1_TX->PIN14_MODE_UART1_TX\n");
//sel rx
TEST_LOG(uart_org_num, "select UART1 RX:\n");
TEST_LOG(uart_org_num, "0:IO_PAD_TD_TP_RESX->PIN13_MODE_UART1_RX\n");
TEST_LOG(uart_org_num, "change the connect pin and press space to continue \n");
delayMs(200);
test_uart_reset_uart_mode();
hal_gpio_set_mode(IO_PAD_UART1_TX, PIN14_MODE_UART1_TX);
hal_gpio_set_mode(IO_PAD_TD_TP_RESX, PIN13_MODE_UART1_RX);
hal_uart_deinit(HAL_UART_0);
test_uart_common_init(HAL_UART_1);
}
else
{
uint8_t sel_tx, sel_rx;
//sel tx
TEST_LOG(uart_org_num, "select UART0 TX:\n");
TEST_LOG(uart_org_num, "0:IO_PAD_UART0_TX->PIN2_MODE_UART0_TX\n");
TEST_LOG(uart_org_num, "1:IO_PAD_AP_SPIS_MOSI->PIN33_MODE_UART0_TX \n");
TEST_LOG(uart_org_num, "2:IO_PAD_TD_SPIM_MOSI->PIN4_MODE_UART0_TX\n");
TEST_LOG(uart_org_num, "Enter:");
str = test_uart_get_input_str(uart_org_num);
TEST_LOG(uart_org_num, "%c\n\n", str);
sel_tx = str - '0';
//sel rx
TEST_LOG(uart_org_num, "select UART0 RX:\n");
TEST_LOG(uart_org_num, "0:IO_PAD_UART0_RX->PIN36_MODE_UART0_RX\n");
TEST_LOG(uart_org_num, "1:IO_PAD_AP_SPIS_MISO->PIN30_MODE_UART0_RX\n");
TEST_LOG(uart_org_num, "2:IO_PAD_AP_TPRSTN->PIN18_MODE_UART0_RX\n");
TEST_LOG(uart_org_num, "3:IO_PAD_AP_PWMEN->PIN17_MODE_UART0_RX\n");
TEST_LOG(uart_org_num, "4:IO_PAD_UART1_TX->PIN14_MODE_UART0_RX\n");
TEST_LOG(uart_org_num, "Enter:");
str = test_uart_get_input_str(uart_org_num);
TEST_LOG(uart_org_num, "%c\n\n", str);
sel_rx = str - '0';
TEST_LOG(uart_org_num, "change the connect pin and press space to continue \n");
delayMs(500);
test_uart_reset_uart_mode();
switch (sel_tx)
{
case 0:
hal_gpio_set_mode(IO_PAD_UART0_TX, PIN2_MODE_UART0_TX);
break;
case 1:
hal_gpio_set_mode(IO_PAD_AP_SPIS_MOSI, PIN33_MODE_UART0_TX);
break;
case 2:
hal_gpio_set_mode(IO_PAD_TD_SPIM_MOSI, PIN4_MODE_UART0_TX);
break;
default:
break;
}
switch (sel_rx)
{
case 0:
hal_gpio_set_mode(IO_PAD_UART0_RX, PIN36_MODE_UART0_RX);
break;
case 1:
hal_gpio_set_mode(IO_PAD_AP_SPIS_MISO, PIN30_MODE_UART0_RX);
break;
case 2:
hal_gpio_set_mode(IO_PAD_AP_TPRSTN, PIN18_MODE_UART0_RX);
break;
case 3:
hal_gpio_set_mode(IO_PAD_AP_PWMEN, PIN17_MODE_UART0_RX);
break;
case 4:
hal_gpio_set_mode(IO_PAD_UART1_TX, PIN14_MODE_UART0_RX);
break;
default:
break;
}
hal_uart_deinit(HAL_UART_1);
test_uart_common_init(HAL_UART_0);
}
while (1)
{
str = test_uart_get_input_str(sg_uart_cur_num);
if (str == 32)
{
break;
}
}
}
/**
* @brief
* @param
* @retval
*/
static bool test_uart_sel_continue()
{
uint8_t str = 0;
delayMs(500);
test_uart_common_deinit(sg_uart_cur_num);
test_uart_common_init(sg_uart_cur_num);
TEST_LOG(sg_uart_cur_num, " y repeat \n");
TEST_LOG(sg_uart_cur_num, " n exit \n");
while (1)
{
str = test_uart_get_input_str(sg_uart_cur_num);
switch (str)
{
case 'y':
TEST_LOG(sg_uart_cur_num, "y\n");
return true;
case 'n':
TEST_LOG(sg_uart_cur_num, "n\n");
return false;
default:
continue;
}
}
}
/**************************************************************************
* @name : test_uart_blocking
* @brief : UART TXRX阻塞读写
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_blocking(void)
{
uint32_t recv = 0;
delayMs(500);
test_uart_common_deinit(sg_uart_cur_num);
test_uart_common_init(sg_uart_cur_num);
delayMs(500);
TEST_LOG(sg_uart_cur_num, "test uart%d start.\n", sg_uart_cur_num);
//test recv
recv = test_uart_get_input_num(sg_uart_cur_num);
TEST_LOG(sg_uart_cur_num, "input %d char one time:\n", recv);
memset(sg_uart_recv_buff, 0, recv + 1);
if (!hal_uart_recv_blocking(sg_uart_cur_num, (uint8_t *)sg_uart_recv_buff, recv))
{
TEST_LOG(sg_uart_cur_num, "an error has occurred!\n");
}
TEST_LOG(sg_uart_cur_num, "%s\n", sg_uart_recv_buff);
//test send
TEST_LOG(sg_uart_cur_num, "send:\n");
strcpy(sg_uart_send_buff, sg_uart_recv_buff);
if (!hal_uart_send_blocking(sg_uart_cur_num, (uint8_t *)sg_uart_send_buff, strlen(sg_uart_send_buff)))
{
TEST_LOG(sg_uart_cur_num, "an error has occurred!\n");
}
TEST_LOG(sg_uart_cur_num, "\n");
sg_uart_case_done = true;
}
/**************************************************************************
* @name : test_uart_trans_cb
* @brief :
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_trans_cb(status_t status, void *user_data)
{
switch (status)
{
case STATUS_UART_RX_IDLE:
case STATUS_UART_TX_IDLE:
*(bool *)user_data = true;
break;
default:
break;
}
}
/**************************************************************************
* @name : test_uart_none_blocking
* @brief : UART TXRX非阻塞读写
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_none_blocking(void)
{
uint32_t recv = 0;
volatile bool int_done = false;
delayMs(500);
test_uart_common_deinit(sg_uart_cur_num);
s_huart.baudrate = TEST_UART_BAUDRATE;
s_huart.data_width = HAL_UART_DATAWIDTH_8;
s_huart.parity = HAL_UART_PARITY_NO;
s_huart.stopbits = HAL_UART_STOPBIT_1;
s_huart.callback = test_uart_trans_cb;
s_huart.user_data = &int_done;
hal_uart_init(sg_uart_cur_num, &s_huart);
delayMs(500);
TEST_LOG(sg_uart_cur_num, "test uart%d start...\n", sg_uart_cur_num);
TEST_LOG(sg_uart_cur_num, "input and output 10 char:\n");
int_done = false;
memset(sg_uart_recv_buff, 0, recv + 1);
while (!hal_uart_recv_none_blocking(sg_uart_cur_num, (uint8_t *)sg_uart_recv_buff, 10))
{
//TEST_LOG(sg_uart_cur_num, "device busy!\n");
}
while (!int_done);
//test send
int_done = false;
strcpy(sg_uart_send_buff, sg_uart_recv_buff);
while (!hal_uart_send_none_blocking(sg_uart_cur_num, (uint8_t *)sg_uart_send_buff, strlen(sg_uart_send_buff)))
{
//TEST_LOG(sg_uart_cur_num, "device busy!\n");
}
while (!int_done);
TEST_LOG(sg_uart_cur_num, "\n");
sg_uart_case_done = true;
}
/**************************************************************************
* @name : test_uart_dma_transmit
* @brief : UART DMA读写测试
* @param[in] :
* @return :
* @retval :
**************************************************************************/
static void test_uart_dma_transmit(void)
{
uint32_t recv = 0;
char str = 0;
bool int_done = false;
while (1)
{
TEST_LOG(sg_uart_cur_num, "test uart%d start...\n", sg_uart_cur_num);
recv = test_uart_get_input_num(sg_uart_cur_num);
TEST_LOG(sg_uart_cur_num, "please input %d char once:\n", recv);
test_uart_common_deinit(sg_uart_cur_num);
s_huart.baudrate = TEST_UART_BAUDRATE;
s_huart.data_width = HAL_UART_DATAWIDTH_8;
s_huart.parity = HAL_UART_PARITY_NO;
s_huart.stopbits = HAL_UART_STOPBIT_1;
s_huart.callback = test_uart_trans_cb;
s_huart.user_data = &int_done;
hal_uart_init(sg_uart_cur_num, &s_huart);
int_done = false;
memset(sg_uart_recv_buff, 0, recv + 1);
while (!hal_uart_dma_recv(sg_uart_cur_num, (uint8_t *)sg_uart_recv_buff, recv))
{
//TEST_LOG(sg_uart_cur_num, "device busy!\n");
}
while (!int_done)
{
delayMs(500);
};
TEST_LOG(sg_uart_cur_num, "%s\n", sg_uart_recv_buff);
TEST_LOG(sg_uart_cur_num, "please input %d char twice:\n", recv);
int_done = false;
memset(sg_uart_recv_buff, 0, recv + 1);
while (!hal_uart_dma_recv(sg_uart_cur_num, (uint8_t *)sg_uart_recv_buff, recv))
{
//TEST_LOG(sg_uart_cur_num, "device busy!\n");
}
while (!int_done)
{
delayMs(100);
//TEST_LOG("recv dma not done!!!\n");
};
TEST_LOG(sg_uart_cur_num, "%s\n", sg_uart_recv_buff);
int_done = false;
strcpy(sg_uart_send_buff, "uart dma tx test comp once!\n");
while (!hal_uart_dma_send(sg_uart_cur_num, (uint8_t *)sg_uart_send_buff, strlen(sg_uart_send_buff)))
{
//TEST_LOG(sg_uart_cur_num, "device busy!\n");
}
while (!int_done);
int_done = false;
strcpy(sg_uart_send_buff, "uart dma tx test comp twice!\n");
while (!hal_uart_dma_send(sg_uart_cur_num, (uint8_t *)sg_uart_send_buff, strlen(sg_uart_send_buff)))
{
//TEST_LOG(sg_uart_cur_num, "device busy!\n");
}
while (!int_done);
if (sg_uart_cur_num == HAL_UART_0)
{
hal_uart_dma_path_close(HAL_UART0_DMA_PATH_TX);
hal_uart_dma_path_close(HAL_UART0_DMA_PATH_RX);
//TEST_LOG(sg_uart_cur_num, "close uart0 dma channel\n");
}
else
{
hal_uart_dma_path_close(HAL_UART1_DMA_PATH_TX);
hal_uart_dma_path_close(HAL_UART1_DMA_PATH_RX);
//TEST_LOG(sg_uart_cur_num, "close uart1 dma channel\n");
}
delayMs(500);
/* 用普通方式初始化uart */
test_uart_common_deinit(sg_uart_cur_num);
test_uart_common_init(sg_uart_cur_num);
TEST_LOG(sg_uart_cur_num, "0:continue\n");
TEST_LOG(sg_uart_cur_num, "1:exit\n");
TEST_LOG(sg_uart_cur_num, "Enter:");
while (1)
{
str = test_uart_get_input_str(sg_uart_cur_num);
if ('0' == str)
{
TEST_LOG(sg_uart_cur_num, "%c\n", str);
break;
}
else if ('1' == str)
{
TEST_LOG(sg_uart_cur_num, "%c\n", str);
sg_uart_case_done = true;
return;
}
}
}
}
static const unit_test_entry_t sg_uart_unit_test_table[] =
{
{"blocking case ...", test_uart_blocking},
{"none blocking case ...", test_uart_none_blocking},
{"dma trans case ...", test_uart_dma_transmit},
{"end", NULL},
};
#if UART_TEST_AUTO
/**
* @brief uart测试用例切换
* @param
* @retval
*/
static void test_uart_auto_case(void)
{
for (sg_uart_case = UART_CASE_BLOCKING; sg_uart_case < UART_CASE_MAX; sg_uart_case++)
{
TEST_LOG(sg_uart_cur_num, "%s\n", sg_uart_unit_test_table[sg_uart_case].case_name);
sg_uart_case_done = false;
/*配置并启动定时器*/
sg_uart_unit_test_table[sg_uart_case].case_func();
/*等待超时中断*/
while (!sg_uart_case_done);
TEST_LOG(sg_uart_cur_num, "test case pass \n");
TEST_LOG(sg_uart_cur_num, "\n");
}
}
#else
/**
* @brief uart测试用例切换
* @param
* @retval
*/
static void test_uart_unit_case(uint8_t case_num)
{
TEST_LOG(sg_uart_cur_num, "%s\n", sg_uart_unit_test_table[case_num].case_name);
sg_uart_case_done = false;
/*配置并启动定时器*/
sg_uart_unit_test_table[case_num].case_func();
/*等待超时中断*/
while (!sg_uart_case_done);
TEST_LOG(sg_uart_cur_num, "test case pass!!\n");
}
#endif
/**************************************************************************
* @name : demo_hal_uart_case
* @brief :
* @param[in] :
* @return :
* @retval :
**************************************************************************/
void demo_hal_uart_case(void)
{
test_uart_common_init(sg_uart_cur_num);
test_uart_mode_init();
while (1)
{
test_uart_set_uart_mode();
#if UART_TEST_AUTO
test_uart_auto_case();
#else
test_uart_unit_case(sg_uart_case);
#endif
if (!test_uart_sel_continue())
{
break;
}
}
TEST_LOG(sg_uart_cur_num, "uart test done!\n");
}
#endif

View File

@ -0,0 +1,36 @@
/*******************************************************************************
* Copyright (C) 2020-2023, tau Systems (R),All Rights Reserved.
*
* File: demo_hal_uart.h
* Description: hal uart测试用例头文件
* Version: V0.1
* Date 2023-07-09
* Author: kc
*******************************************************************************/
#ifndef __DEMO_HAL_UART_H__
#define __DEMO_HAL_UART_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "test_cfg_global.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
void demo_hal_uart_case(void);
#endif /* __DEMO_HAL_UART_H__ */

View File

@ -0,0 +1,135 @@
/*******************************************************************************
*
*
* File: demo_hal_wdg.c
* Description watch dog demo源文件
* Version V0.1
* Date 2023-07-27
* Author zzf
*******************************************************************************/
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "hal_wdg.h"
#include "hal_gpio.h"
#include "tau_delay.h"
#include "tau_log.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "wdg-log"
#define WDG_CASE_RST 0 //复位模式
#define WDG_CASE_INTR 1 //中断模式
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
#if WDG_CASE_INTR
static io_pad_e sg_wdg_io_pad = IO_PAD_GPIO1;
static gpio_level_e sg_wdg_io_lvl = IO_LVL_LOW;
/* 循环喂狗 */
static uint8_t sg_feed_cnt = 0;
#endif
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
#if WDG_CASE_RST
/**
* @brief
* @param
* @retval
*/
static void demo_wdg_case_rst_mode(void)
{
TAU_LOGI("reset start...\n");
/* WDG初始化复位模式 */
hal_wdg_init();
/* 启动 */
hal_wdg_start(WDG_MODE_RESET, 5000);
}
#endif
#if WDG_CASE_INTR
/**
* @brief
* @param
* @retval
*/
static void demo_wdg_callback(void *data)
{
/* 翻转GPIO */
sg_wdg_io_lvl = (sg_wdg_io_lvl ? IO_LVL_LOW : IO_LVL_HIGH);
hal_gpio_set_output_data(sg_wdg_io_pad, sg_wdg_io_lvl);
sg_feed_cnt++;
if (sg_feed_cnt > 10)
{
hal_wdg_stop();
}
}
/**
* @brief
* @param
* @retval
*/
static void demo_wdg_case_int_mode(void)
{
TAU_LOGI("int start...\n");
/* WDG初始化 */
hal_wdg_init();
/* 设置循环超时 */
hal_wdg_set_repeat(true);
/* 设置回调函数 */
hal_wdg_register_callback(demo_wdg_callback, NULL);
/*初始化GPIO低状态*/
hal_gpio_init_output(sg_wdg_io_pad, sg_wdg_io_lvl);
/* 设置中断模式 */
hal_wdg_start(WDG_MODE_INTERRUPT, 200);
while (sg_feed_cnt < 6)
{
sg_feed_cnt++;
hal_wdg_kick_dog();
delayMs(150);
TAU_LOGI("feed [%d]th done\n", sg_feed_cnt);
}
}
#endif
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_wdg_case(void)
{
TAU_LOGI("demo_wdg_case\r\n");
#if WDG_CASE_RST
demo_wdg_case_rst_mode();
#elif WDG_CASE_INTR
demo_wdg_case_int_mode();
#endif
}

View File

@ -0,0 +1,40 @@
/*******************************************************************************
*
*
* File: demo_hal_wdg.h
* Description: watch dog demo头文件
* Version: V0.1
* Date: 2023-07-27
* Author: zzf
*******************************************************************************/
#ifndef __DEMO_WDG_H__
#define __DEMO_WDG_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief demo测试接口函数
* @param None
* @retval None
*/
void demo_wdg_case(void);
#endif /* __DEMO_WDG_H__ */

View File

@ -0,0 +1,69 @@
/*******************************************************************************
*
* File: ap_demo_main.c
* Description: ap demo main file
* Version: V0.1
* Date: 2022-04-15
* Author: Jaya
*******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "module_demo_main.h"
void module_demo_main()
{
#if _MODULE_DEMO_DSI_TX_EN
demo_dsi_tx_case();
#endif
#if _MODULE_DEMO_DSI_RX_EN
demo_hal_dsi_rx_case();
#endif
#if _MODULE_DEMO_TIMER_EN
demo_timer_case();
#endif
#if _MODULE_DEMO_WDG_EN
demo_wdg_case();
#endif
#if _MODULE_DEMO_GPIO_EN
demo_gpio_case();
#endif
#if _MODULE_DEMO_SWIRE_EN
demo_hal_swire();
#endif
#if _MODULE_DEMO_SPI_EN
demo_hal_spi();
#endif
#if _MODULE_DEMO_I2C_EN
demo_hal_i2c();
#endif
#if _MODULE_DEMO_FLASH_EN
demo_hal_flash();
#endif
#if _MODULE_DEMO_PWM_EN
demo_hal_pwm();
#endif
#if _MODULE_DEMO_PWR_EN
demo_hal_pwr();
#endif
#if _MODULE_DEMO_UART_EN
demo_hal_uart_case();
#endif
#if _MODULE_DEMO_CRC_EN
demo_hal_crc_case();
#endif
}

View File

@ -0,0 +1,68 @@
/*******************************************************************************
*
* File: module_demo_main.h
* Description: module demo main file
* Version: V0.1
* Date: 2023-07-27
* Author: Jaya
*******************************************************************************/
#ifndef __MODULE_DEMO_MAIN_H__
#define __MODULE_DEMO_MAIN_H__
#include "test_cfg_global.h"
#if _MODULE_DEMO_DSI_TX_EN
#include "demo_hal_dsi_tx.h"
#endif
#if _MODULE_DEMO_DSI_RX_EN
#include "demo_hal_dsi_rx.h"
#endif
#if _MODULE_DEMO_TIMER_EN
#include "demo_hal_timer.h"
#endif
#if _MODULE_DEMO_WDG_EN
#include "demo_hal_wdg.h"
#endif
#if _MODULE_DEMO_GPIO_EN
#include "demo_hal_gpio.h"
#endif
#if _MODULE_DEMO_SWIRE_EN
#include "demo_hal_swire.h"
#endif
#if _MODULE_DEMO_SPI_EN
#include "demo_hal_spi.h"
#endif
#if _MODULE_DEMO_I2C_EN
#include "demo_hal_i2c.h"
#endif
#if _MODULE_DEMO_FLASH_EN
#include "demo_hal_flash.h"
#endif
#if _MODULE_DEMO_PWM_EN
#include "demo_hal_pwm.h"
#endif
#if _MODULE_DEMO_PWR_EN
#include "demo_hal_pwr.h"
#endif
#if _MODULE_DEMO_UART_EN
#include "demo_hal_uart.h"
#endif
#if _MODULE_DEMO_CRC_EN
#include "demo_hal_crc.h"
#endif
void module_demo_main(void);
#endif /* __MODULE_DEMO_MAIN_H__ */

39
src/app/test_cfg_global.h Normal file
View File

@ -0,0 +1,39 @@
/*******************************************************************************
*
* File: test_cfg_global.h
* Description
* Version V0.1
* Date 2021-05-01
* Author kevin
*******************************************************************************/
#ifndef __TEST_GLOBAL_CONFIG_H__
#define __TEST_GLOBAL_CONFIG_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/* 模块demo 宏定义 */
#define _MODULE_DEMO_ENABLE 0
#define _MODULE_DEMO_TIMER_EN 0
#define _MODULE_DEMO_DSI_TX_EN 0
#define _MODULE_DEMO_DSI_RX_EN 0
#define _MODULE_DEMO_PWM_EN 0
#define _MODULE_DEMO_SWIRE_EN 0
#define _MODULE_DEMO_WDG_EN 0
#define _MODULE_DEMO_GPIO_EN 0
#define _MODULE_DEMO_I2C_EN 0
#define _MODULE_DEMO_SPI_EN 0
#define _MODULE_DEMO_PWR_EN 0
/* ap demo 宏定义 */
#define _DEMO_GOOGLE_P8P_EN 1
#if _DEMO_GOOGLE_P8P_EN
#include "p8p_demo.h"
#endif
#endif

31
src/board/board.c Normal file
View File

@ -0,0 +1,31 @@
/*******************************************************************************
*
*
* File: board.c
* Description
* Version V0.1
* Date 2023-07-23
* Author lzy
*******************************************************************************/
#include "board.h"
#include "hal_system.h"
#include "hal_gpio.h"
#include "ArmCM0.h"
#include "tau_log.h"
/**
* @brief ,,log输出
* @param none
* @retval none
*/
void board_Init(void)
{
/* system init ,配置MCU时钟 */
hal_system_init(HAL_SYSCLK_80M);
/* 使用SWD口作为Debug Log输出,可配置成Uart方式 */
tau_log_init(115200, LOG_PORT_UART0);
/* systick init,根据需要配置 */
//hal_system_enable_systick(1);
}

21
src/board/board.h Normal file
View File

@ -0,0 +1,21 @@
/*******************************************************************************
*
*
* File: board.h
* Description: baord
* Version: V0.1
* Date: 2020-01-08
* Author: lzy
*******************************************************************************/
#ifndef __BOARD_H__
#define __BOARD_H__
/**
* @brief ,,log输出
* @param none
* @retval none
*/
void board_Init(void);
#endif

View File

@ -0,0 +1,226 @@
;/**************************************************************************//**
; * @file startup_ARMCM0.s
; * @brief CMSIS Core Device Startup File for
; * ARMCM0 Device
; * @version V5.4.0
; * @date 12. December 2018
; ******************************************************************************/
;/*
; * Copyright (c) 2009-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.
; */
;//-------- <<< Use Configuration Wizard in Context Menu >>> ------------------
;<h> Stack Configuration
; <o> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
;</h>
Stack_Size EQU 0x00001000
AREA STACK, NOINIT, READWRITE, ALIGN=3
__stack_limit
Stack_Mem SPACE Stack_Size
__initial_sp
;<h> Heap Configuration
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
;</h>
Heap_Size EQU 0x00000C00
IF Heap_Size != 0 ; Heap is provided
AREA HEAP, NOINIT, READWRITE, ALIGN=3
__heap_base
Heap_Mem SPACE Heap_Size
__heap_limit
ENDIF
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
EXPORT __Vectors_End
EXPORT __Vectors_Size
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
DCD NMI_Handler ; -14 NMI Handler
DCD HardFault_Handler ; -13 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 ; -5 SVCall Handler
DCD 0 ; Reserved
DCD 0 ; Reserved
DCD PendSV_Handler ; -2 PendSV Handler
DCD SysTick_Handler ; -1 SysTick Handler
; Interrupts
DCD VIDC_IRQn_Handler ; 0 Interrupt 0
DCD LCDC_IRQn_Handler ; 1 Interrupt 1
DCD MIPI_RX_IRQn_Handler ; 2 Interrupt 2
DCD MIPI_TX_IRQn_Handler ; 3 Interrupt 3
DCD MEMC_IRQn_Handler ; 4 Interrupt 4
DCD VPRE_IRQn_Handler ; 5 Interrupt 5
DCD FLSCTRL_IRQn_Handler ; 6 Interrupt 6
DCD DMA_IRQn_Handler ; 7 Interrupt 7
DCD TIMER0_IRQn_Handler ; 8 Interrupt 8
DCD TIMER1_IRQn_Handler ; 9 Interrupt 9
DCD TIMER2_IRQn_Handler ; 10 Interrupt 10
DCD TIMER3_IRQn_Handler ; 11 Interrupt 11
DCD WDG_IRQn_Handler ; 12 Interrupt 12
DCD UART_IRQn_Handler ; 13 Interrupt 13
DCD I2C0_IRQn_Handler ; 14 Interrupt 14
DCD I2C1_IRQn_Handler ; 15 Interrupt 15
DCD SPIS_IRQn_Handler ; 16 Interrupt 16
DCD SPIM_IRQn_Handler ; 17 Interrupt 17
DCD VPRE1_IRQn_Handler ; 18 Interrupt 18
DCD I2C2_IRQn_Handler ; 19 Interrupt 19
DCD OTP_IRQn_Handler ; 20 Interrupt 20
DCD SWIRE_IRQn_Handler ; 21 Interrupt 21
DCD PVD_IRQn_Handler ; 22 Interrupt 22
DCD AP_NRESET_IRQn_Handler ; 23 Interrupt 23
DCD EXTI_INT0_IRQn_Handler ; 24 Interrupt 24
DCD EXTI_INT1_IRQn_Handler ; 25 Interrupt 25
DCD EXTI_INT2_IRQn_Handler ; 26 Interrupt 26
DCD EXTI_INT3_IRQn_Handler ; 27 Interrupt 27
DCD EXTI_INT4_IRQn_Handler ; 28 Interrupt 28
DCD EXTI_INT5_IRQn_Handler ; 29 Interrupt 29
DCD EXTI_INT6_IRQn_Handler ; 30 Interrupt 30
DCD EXTI_INT7_IRQn_Handler ; 31 Interrupt 31
SPACE ( 0 * 4) ; Interrupts 10 .. 31 are left out
__Vectors_End
__Vectors_Size EQU __Vectors_End - __Vectors
_NVIC_ICER0 EQU 0xE000E180 ;清中断使能寄存器地址
_NVIC_ICPR0 EQU 0xE000E280 ;清中断pending寄存器地址
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
IMPORT __main
;清中断使能和pending ——开始——
CPSID I ; 屏蔽中断
LDR R0, =_NVIC_ICER0
LDR R1, =_NVIC_ICPR0
LDR R2, =0xFFFFFFFF
MOVS R3, #1 ; 设置循环次数 M0只有1组(32个)中断故只需要循环1次
_irq_clear
;CBZ R3, _irq_clear_end
CMP R3,#0 ; 循环次数等于0跳转到_irq_clear_end
BNE _irq_clear_end
STR R2, [R0] ;,#4 ; NVIC_ICER0 - 清 enable IRQ 寄存器
STR R2, [R1] ;,#4 ; NVIC_ICPR0 - 清 pending IRQ 寄存器
SUBS R3, #1 ; 循环数自减1
B _irq_clear
_irq_clear_end
;清中断使能和pending ——结束——
CPSIE I ; 开启中断
LDR R0, =__main
BX R0
ENDP
; Macro to define default exception/interrupt handlers.
; Default handler are weak symbols with an endless loop.
; They can be overwritten by real handlers.
MACRO
Set_Default_Handler $Handler_Name
$Handler_Name PROC
EXPORT $Handler_Name [WEAK]
B .
ENDP
MEND
; Default exception/interrupt handler
Set_Default_Handler NMI_Handler
Set_Default_Handler HardFault_Handler
Set_Default_Handler SVC_Handler
Set_Default_Handler PendSV_Handler
Set_Default_Handler SysTick_Handler
Set_Default_Handler VIDC_IRQn_Handler
Set_Default_Handler LCDC_IRQn_Handler
Set_Default_Handler MIPI_RX_IRQn_Handler
Set_Default_Handler MIPI_TX_IRQn_Handler
Set_Default_Handler MEMC_IRQn_Handler
Set_Default_Handler VPRE_IRQn_Handler
Set_Default_Handler FLSCTRL_IRQn_Handler
Set_Default_Handler DMA_IRQn_Handler
Set_Default_Handler TIMER0_IRQn_Handler
Set_Default_Handler TIMER1_IRQn_Handler
Set_Default_Handler TIMER2_IRQn_Handler
Set_Default_Handler TIMER3_IRQn_Handler
Set_Default_Handler WDG_IRQn_Handler
Set_Default_Handler UART_IRQn_Handler
Set_Default_Handler I2C0_IRQn_Handler
Set_Default_Handler I2C1_IRQn_Handler
Set_Default_Handler SPIS_IRQn_Handler
Set_Default_Handler SPIM_IRQn_Handler
Set_Default_Handler VPRE1_IRQn_Handler
Set_Default_Handler I2C2_IRQn_Handler
Set_Default_Handler OTP_IRQn_Handler
Set_Default_Handler SWIRE_IRQn_Handler
Set_Default_Handler PVD_IRQn_Handler
Set_Default_Handler AP_NRESET_IRQn_Handler
Set_Default_Handler EXTI_INT0_IRQn_Handler
Set_Default_Handler EXTI_INT1_IRQn_Handler
Set_Default_Handler EXTI_INT2_IRQn_Handler
Set_Default_Handler EXTI_INT3_IRQn_Handler
Set_Default_Handler EXTI_INT4_IRQn_Handler
Set_Default_Handler EXTI_INT5_IRQn_Handler
Set_Default_Handler EXTI_INT6_IRQn_Handler
Set_Default_Handler EXTI_INT7_IRQn_Handler
ALIGN
; User setup Stack & Heap
IF :LNOT::DEF:__MICROLIB
IMPORT __use_two_region_memory
ENDIF
EXPORT __stack_limit
EXPORT __initial_sp
IF Heap_Size != 0 ; Heap is provided
EXPORT __heap_base
EXPORT __heap_limit
ENDIF
END

222
src/common/tau_common.h Normal file
View File

@ -0,0 +1,222 @@
/*******************************************************************************
*
*
* File: tau_common.h
* Description
* Version V0.1
* Date 2020-09-07
* Author lzy
*******************************************************************************/
#ifndef __TAU_COMMON_H
#define __TAU_COMMON_H
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "stdint.h"
#include "math.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/**
* \name
* @{
*/
//#define ENABLE 1
//#define DISABLE 0
#define ON 1
#define OFF 0
#define NONE 0
#define EOS '\0'
/*
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
*/
#ifndef __cplusplus
#define true 1
#define false 0
#define bool _Bool
#endif /* ifndef __cplusplus */
#ifndef NULL
#define NULL ((void *)0)
#endif
#define TAU_LITTLE_ENDIAN 1234 /**< \brief 小端模式 */
#define TAU_BIG_ENDIAN 3412 /**< \brief 大端模式 */
/** @} */
/******************************************************************************/
/**
* \name
* @{
*/
#ifdef __cplusplus
#define __I volatile /*!< Defines 'read only' permissions */
#else
#define __I volatile const /*!< Defines 'read only' permissions */
#endif
#define __O volatile /*!< Defines 'write only' permissions */
#define __IO volatile /*!< Defines 'read / write' permissions */
#define TAU_INLINE inline
#define TAU_STATIC_INLINE static inline
#define TAU_STATIC static
#define TAU_CONST const
#define TAU_EXTERN extern
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
/**
* \brief
* \attention
*
*
* \par
* \code
* struct my_struct {
* int m1;
* char m2;
* };
* int offset_m2;
*
* offset_m2 = TAU_OFFSET(struct my_struct, m2);
* \endcode
*/
#define TAU_OFFSET(structure, member) ((uint32_t)(&(((structure *)0)->member)))
/** @} */
/**
* \brief
*
* \param ptr
* \param type
* \param member
*
* \par
* \code
* struct my_struct = {
* int m1;
* char m2;
* };
* struct my_struct my_st;
* char *p_m2 = &my_st.m2;
* struct my_struct *p_st = TAU_CONTAINER_OF(p_m2, struct my_struct, m2);
* \endcode
*/
#define TAU_CONTAINER_OF(ptr, type, member) \
((type *)((char *)(ptr)-TAU_OFFSET(type, member)))
/**
* \brief
*
* \code
* struct a = {
* uint32_t m1;
* uint32_t m2;
* };
* int size_m2;
*
* size_m2 = TAU_MEMBER_SIZE(a, m2); //size_m2 = 4
* \endcode
*/
#define TAU_MEMBER_SIZE(structure, member) (sizeof(((structure *)0)->member))
/**
* \brief
*
* \code
* int a[] = {0, 1, 2, 3};
* int element_a = TAU_NELEMENTS(a); // element_a = 4
* \endcode
*/
#define TAU_NELEMENTS(array) (sizeof(array) / sizeof((array)[0]))
/**
* \brief
*
* \param x
* \param align
*
* \code
* int size = TAU_ROUND_UP(15, 4); // size = 16
* \endcode
*/
#define TAU_ROUND_UP(x, align) (((int)(x)/(align))*(align) + (((int)(x)%(align)) ? (align) : 0))
/**
* \brief
*
* \param x
* \param align
*
* \code
* int size = TAU_ROUND_DOWN(15, 4); // size = 12
* \endcode
*/
#define TAU_ROUND_DOWN(x, align) (((int)(x)/(align))*(align))
/** \brief 倍数向上舍入 */
#define TAU_DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
/**
* \brief
*
* \param x
* \param align 2
*
* \code
* if (TAU_ALIGNED(x, 4) {
* ; // x对齐
* } else {
* ; // x不对齐
* }
* \endcode
*/
#define TAU_ALIGNED(x, align) (((int)(x) & (align - 1)) == 0)
/** \brief 将1字节BCD数据转换为16进制数据 */
#define TAU_BCD_TO_HEX(val) (((val)&0x0f) + ((val) >> 4) * 10)
/** \brief 将1字节16进制数据转换为BCD数据 */
#define TAU_HEX_TO_BCD(val) ((((val) / 10) << 4) + (val) % 10)
/**
* \brief
*/
#define TAU_CEIL(val) ceil(val)
/*! @brief Construct the version number for drivers. */
#define MAKE_VERSION(major, minor, bugfix) (((major) << 16) | ((minor) << 8) | (bugfix))
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*!< @brief 用于返回状态和错误 */
typedef uint32_t status_t;
/* \brief 通用回调函数指针定义 */
typedef void (*fcb_type)(void *data);
typedef void (*uart_trans_cb)(status_t status, void *user_data);
typedef void (*flash_trans_cb)(status_t status, void *user_data);
#endif /* __TAU_COMMON_H */

34
src/common/tau_delay.h Normal file
View File

@ -0,0 +1,34 @@
/**
* File Name: tau_delay.h
*
*
*
* Author: Fortsense 3D Firmware Team
*
* Date: 2020/12/04
*
* Project: Taurus
*
* Description:
*
* HISTORY:
**/
#ifndef _DELAY_H_
#define _DELAY_H_
#include "stdint.h"
/**
* @brief delay ms ,2%
* @param ms:delay时长
* @retval none
*/
void delayMs(uint32_t ms);
/**
* @brief delay us ,2%
* @param us:delay时长
* @retval none
*/
void delayUs(uint32_t us);
#endif

View File

@ -0,0 +1,229 @@
/*******************************************************************************
*
*
* File: tau_device_datatype.h
* Description device datatype
* Version V0.1
* Date 2020-12-04
* Author kevin
*******************************************************************************/
#ifndef _TAU_DEVICE_DATATYPE_H_
#define _TAU_DEVICE_DATATYPE_H_
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "stdint.h"
#include "tau_common.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*! @brief 计算组状态码 */
#define MAKE_STATUS(group, code) ((((group)*100) + (code)))
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*! @brief 分组状态值 */
enum _status_groups
{
STATUS_GROUP_GENERIC = 0,
STATUS_GROUP_I2C = 1,
STATUS_GROUP_UART = 2,
STATUS_GROUP_SPI = 3,
STATUS_GROUP_TIMER = 4,
};
/*! @brief 常用状态码 */
enum _generic_status
{
STATUS_SUCCESS = MAKE_STATUS(STATUS_GROUP_GENERIC, 0),
STATUS_FAIL = MAKE_STATUS(STATUS_GROUP_GENERIC, 1),
STATUS_READ_ONLY = MAKE_STATUS(STATUS_GROUP_GENERIC, 2),
STATUS_OUT_OF_RANGE = MAKE_STATUS(STATUS_GROUP_GENERIC, 3),
STATUS_INVALID_ARGUMENT = MAKE_STATUS(STATUS_GROUP_GENERIC, 4),
STATUS_TIME_OUT = MAKE_STATUS(STATUS_GROUP_GENERIC, 5),
STATUS_NO_TRANSFER_IN_PROGRESS = MAKE_STATUS(STATUS_GROUP_GENERIC, 6),
};
/**
* @brief UART状态枚举定义
*
*/
typedef enum
{
STATUS_UART_TX_BUSY = MAKE_STATUS(STATUS_GROUP_UART, 0), /*!< Transmitter is busy. */
STATUS_UART_RX_BUSY = MAKE_STATUS(STATUS_GROUP_UART, 1), /*!< Receiver is busy. */
STATUS_UART_TX_IDLE = MAKE_STATUS(STATUS_GROUP_UART, 2), /*!< USART transmitter is idle. */
STATUS_UART_RX_IDLE = MAKE_STATUS(STATUS_GROUP_UART, 3), /*!< USART receiver is idle. */
STATUS_UART_TX_ERR = MAKE_STATUS(STATUS_GROUP_UART, 7), /*!< Error happens on txFIFO. */
STATUS_UART_RX_ERR = MAKE_STATUS(STATUS_GROUP_UART, 9), /*!< Error happens on rxFIFO. */
STATUS_UART_RX_RING_BUFF_OVERRUN = MAKE_STATUS(STATUS_GROUP_UART, 8), /*!< Error happens on rx ring buffer */
STATUS_UART_NOISE_ERR = MAKE_STATUS(STATUS_GROUP_UART, 10), /*!< USART noise error. */
STATUS_UART_FRAMING_ERR = MAKE_STATUS(STATUS_GROUP_UART, 11), /*!< USART framing error. */
STATUS_UART_PARITY_ERR = MAKE_STATUS(STATUS_GROUP_UART, 12), /*!< USART parity error. */
STATUS_UART_BAUDRATE_NOT_SPT = MAKE_STATUS(STATUS_GROUP_UART, 13), /*!< Baudrate is not support in current clock source */
} uart_status_e;
/*!
* @brief timer状态
*/
typedef enum
{
STATUS_TIMER_IDLE = MAKE_STATUS(STATUS_GROUP_TIMER, 0), /*!< 空闲 */
STATUS_TIMER_RUNNING = MAKE_STATUS(STATUS_GROUP_TIMER, 1), /*!< 运行中 */
STATUS_TIMER_TIMEOUT = MAKE_STATUS(STATUS_GROUP_TIMER, 2), /*!< 超时 */
} timer_status_e;
/*!
* @brief system触发事件(/)
*/
typedef enum
{
DETECT_HIGH_LVL = 0,
DETECT_LOW_LVL,
DETECT_RISING_EDGE,
DETECT_FALLING_EDGE,
DETECT_DOUBLE_EDGE
} sys_cfg_trigger_e;
/**
* @brief GPIO interrupt type
*/
typedef enum
{
TIMER_NUM0 = 0,
TIMER_NUM1,
TIMER_NUM2,
TIMER_NUM3,
TIMER_NUM_MAX
} timer_num_e;
/**
* @brief GPIO interrupt type
*/
typedef enum
{
GPIO_INT_EXTI_INT0 = 0,
GPIO_INT_EXTI_INT1,
GPIO_INT_EXTI_INT2,
GPIO_INT_EXTI_INT3,
GPIO_INT_EXTI_INT4,
GPIO_INT_EXTI_INT5,
GPIO_INT_EXTI_INT6,
GPIO_INT_EXTI_INT7,
GPIO_INT_MAX
} gpio_int_e;
/*! @brief PWMI中断类型 */
typedef enum _pwm_int_type
{
PWM_INT_HIGH_OVERFLOW = 0,
PWM_INT_LOW_OVERFLOW,
PWM_INT_TOTAL_OVERFLOW,
PWM_INT_HIGH_DONE,
PWM_INT_LOW_DONE,
PWM_INT_TOTAL_DONE,
PWM_INT_MAX
} pwm_int_type_e;
/**
* @brief I2C chose
*/
typedef enum
{
I2C_SELECT_0 = 0, //常用slave
I2C_SELECT_1, //常用master
} i2c_select_e;
/*!
* @brief
* @note
*/
typedef enum _i2c_rate
{
I2C_RATE_STANDARD = 1, //100kHz
I2C_RATE_FAST, //400kHz
I2C_RATE_HIGH, //1MHz
} i2c_rate_e;
/*!
* @brief I2C Index
* @note
*/
typedef enum
{
I2C_INDEX_0,
I2C_INDEX_1,
I2C_INDEX_2,
I2C_INDEX_MAX
} i2c_index_e;
/*!
* @brief DMA channel type
* @note
*/
typedef enum
{
AHB_DMA_CH0,
AHB_DMA_CH1,
AHB_DMA_CH2,
AHB_DMA_CH3,
AHB_DMA_CH4,
AHB_DMA_CH5,
AHB_DMA_CH6,
AHB_DMA_CH7,
AHB_DMA_CH_NUM
} dma_channel_type_e;
/*! @brief Type used for all status and error return values. */
typedef enum
{
DISABLE = 0,
ENABLE = !DISABLE
} function_state_e;
/**
* @brief The reversal types of the bit order of the input/output data
*/
typedef enum
{
CRC_REV_NO_TRANSPOSE = 0, /*!< No transposition */
CRC_REV_ONLY_BITS_TRANSPOSE, /*!< Bits in bytes are transposed; bytes are not transposed */
CRC_REV_BOTH_TRANSPOSE, /*!< Both bits in bytes and bytes are transposed */
CRC_REV_ONLY_BYTES_TRANSPOSE, /*!< Only bytes are transposed; no bits in a byte are transposed */
} crc_reversal_type_e;
/**
* @brief Complement Read Of CRC Data Register
*/
typedef enum
{
CRC_FXOR_DISABLE = 0, /*!< No XOR on reading */
CRC_FXOR_ENABLE, /*!< Invert or complement the read value of the CRC Data register */
} crc_fxor_function_e;
/**
* @brief width of CRC protocol (polynomial)
*/
typedef enum
{
CRC_16_BIT_PROTOCOL = 0, /*!< 0: 16-bit CRC protocol */
CRC_32_BIT_PROTOCOL, /*!< 1: 32-bit CRC protocol */
} crc_protocol_type_e;
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
#endif

View File

@ -0,0 +1,405 @@
/*******************************************************************************
*
*
* File: tau_dsi_datatype.h
* Description: mipi dsi
* Version: V0.1
* Date: 2021-01-13
* Author: lzy
*******************************************************************************/
#ifndef __MIPI_DSI_COMMON_H__
#define __MIPI_DSI_COMMON_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "tau_common.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#define DSC_PPS_SIZE 128
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/**
* @brief Data Types for Peripheral-sourced Packets,From Mipi DSI Spec
*/
typedef enum
{
DSI_ACK_DT_ERROR = 0x02,
DSI_ACK_DT_EOTP = 0x08,
DSI_ACK_DT_GEN_SHORT_RESPONSE_1B = 0x11,
DSI_ACK_DT_GEN_SHORT_RESPONSE_2B = 0x12,
DSI_ACK_DT_GEN_LONG_RESPONSE = 0x1A,
DSI_ACK_DT_DCS_LONG_RESPONSE = 0x1C,
DSI_ACK_DT_DCS_SHORT_RESPONSE_1B = 0x21,
DSI_ACK_DT_DCS_SHORT_RESPONSE_2B = 0x22,
DSI_ACK_DT_MAX
} dsi_ack_data_type_e;
/**
* @brief Software handle data types
*/
typedef enum
{
DSI_RECV_DT_PPS = 0x0A, //Picture Parameter Set
DSI_RECV_DT_GEN_WRITE_1B = 0x13, //Generic Short WRITE, 1 parameter
DSI_RECV_DT_GEN_WRITE_2B = 0x23, //Generic Short WRITE, 2 parameters
DSI_RECV_DT_GEN_READ_0B = 0x04, //Generic READ, no parameters
DSI_RECV_DT_GEN_READ_1B = 0x14, //Generic READ, 1 parameter
DSI_RECV_DT_GEN_READ_2B = 0x24, //Generic READ, 2 parameters
DSI_RECV_DT_DCS_WRITE_0B = 0x05, //DCS Short WRITE, no parameters
DSI_RECV_DT_DCS_WRITE_1B = 0x15, //DCS Short WRITE, 1 parameter
DSI_RECV_DT_DCS_READ_0B = 0x06, //DCS READ, no parameters
DSI_RECV_DT_GEN_WRITE_LONG = 0x29, //Generic Long Write
DSI_RECV_DT_DCS_WRITE_LONG = 0x39, //DCS Long Write/write_LUT Command Packet
DSI_RECV_DT_MAX
} dsi_data_type_e;
typedef enum
{
DCS_ENTER_IDLE_MODE = 0x39,
DCS_ENTER_INVERT_MODE = 0x21,
DCS_ENTER_NORMAL_MODE = 0x13,
DCS_ENTER_PARTIAL_MODE = 0x12,
DCS_ENTER_SLEEP_MODE = 0x10,
DCS_EXIT_IDLE_MODE = 0x38,
DCS_EXIT_INVERT_MODE = 0x20,
DCS_EXIT_SLEEP_MODE = 0x11,
DCS_GET_3D_CONTROL = 0x3F,
DCS_GET_ADDRESS_MODE = 0x0B,
DCS_GET_BLUE_CHANNEL = 0x08,
DCS_GET_COMPRESSION_MODE = 0x03,
DCS_GET_DIAGNOSTIC_RESULT = 0x0F,
DCS_GET_DISPLAY_MODE = 0x0D,
DCS_GET_GREEN_CHANNEL = 0x07,
DCS_GET_PIXEL_FORMAT = 0x0C,
DCS_GET_POWER_MODE = 0x0A,
DCS_GET_RED_CHANNEL = 0x06,
DCS_GET_SCANLINE = 0x45,
DCS_GET_SIGNAL_MODE = 0x0E,
DCS_NOP = 0x00,
DCS_READ_DDB_CONTINUE = 0xA8,
DCS_READ_DDB_START = 0xA1,
DCS_READ_MEMORY_CONTINUE = 0x3E,
DCS_READ_MEMORY_START = 0x2E,
DCS_SET_3D_CONTROL = 0x3D,
DCS_SET_ADDRESS_MODE = 0x36,
DCS_SET_COLUMN_ADDRESS = 0x2A,
DCS_SET_DISPLAY_OFF = 0x28,
DCS_SET_DISPLAY_ON = 0x29,
DCS_SET_GAMMA_CURVE = 0x26,
DCS_SET_PAGE_ADDRESS = 0x2B,
DCS_SET_PARTIAL_COLUMNS = 0x31,
DCS_SET_PARTIAL_ROWS = 0x30,
DCS_SET_PIXEL_FORMAT = 0x3A,
DCS_SET_SCROLL_AREA = 0x33,
DCS_SET_SCROLL_START = 0x37,
DCS_SET_TEAR_OFF = 0x34,
DCS_SET_TEAR_ON = 0x35,
DCS_SET_TEAR_SCANLINE = 0x44,
DCS_SET_VSYNC_TIMING = 0x40,
DCS_SOFT_RESET = 0x01,
DCS_WRITE_LUT = 0x2D,
DCS_WRITE_MEMORY_CONTINUE = 0x3C,
DCS_WRITE_MEMORY_START = 0x2C
} dsi_dcs_cmd_type_e;
/**
* @brief video data transfer mode
*/
typedef enum
{
DSI_DATA_VIDEO_MODE = 0,
DSI_DATA_CMD_MODE = 1,
DSI_DATA_MODE_MAX
} dsi_video_data_mode_e;
/**
* @brief dsi virtual channel
*/
typedef enum
{
DSI_VC_0 = 0,
DSI_VC_1 = 1,
DSI_VC_2 = 2,
DSI_VC_3 = 3,
DSI_VC_MAX
} dsi_virtual_channel_e;
/**
* @brief video data mode
*/
typedef enum
{
DSI_FRAME_RATE_60HZ = 0,
DSI_FRAME_RATE_90HZ = 1,
DSI_FRAME_RATE_120HZ = 2,
DSI_FRAME_RATE_144HZ = 3,
DSI_FRAME_RATE_160HZ = 4,
DSI_FRAME_RATE_MAX
} dsi_video_frame_rate_e;
/**
* @brief dsi rx color coding
*/
typedef enum
{
DSI_RGB565 = 1,
DSI_RGB666 = 2, /*!< 18 bbp(18bits per pixel) */
DSI_RGB666_LOOSELY = 3, /*!< 24 bbp(24bits per pixel) */
DSI_RGB888 = 4, /*!< 24 bbp(24bits per pixel) */
DSI_RGB10_10_10 = 5,
DSI_RGB12_12_12 = 6,
DSI_YCbCr422_16 = 7,
DSI_PENTILE_16 = DSI_YCbCr422_16,
DSI_YCbCr422_20_LOOSELY = 8,
DSI_YCbCr422_24 = 9,
DSI_YCbCr420_12 = 10,
DSI_DSC_STREAM = 11,
DSI_COLOR_CODE_MAX
} dsi_color_code_e;
/**
* @brief dsi endianness type
*/
typedef enum
{
DPI_ENDIAN_RGB = 0,
DPI_ENDIAN_BGR
} dsi_endianness_e;
/**
* @brief mipi lane number
*/
typedef enum
{
DSI_LANE_1 = 1,
DSI_LANE_2 = 2,
DSI_LANE_3 = 3,
DSI_LANE_4 = 4,
DSI_LANE_NUME_MAX
} dsi_lane_nume_e;
/**
* @brief video mode
*/
typedef enum
{
DSI_NONBURST_PULSE = 0,
DSI_NONBURST_EVENT = 1,
DSI_BURST_MODE = 2,
DSI_VIDEO_MODE_MAX
} dsi_video_mode_type_e;
/**
* @brief panel init cmd transfer type
*/
typedef enum
{
DSI_CMD_TX_HS = 0,
DSI_CMD_TX_LP = 1
} dsi_tx_cmd_tx_type_e;
/**
* @brief angle of rotation
*/
typedef enum
{
VIDOE_ROT_ANGLE_0 = 0, /* 不旋转 */
VIDOE_ROT_ANGLE_90 = 1, /* 旋转90度 */
VIDOE_ROT_ANGLE_180 = 2, /* 旋转180度 */
VIDOE_ROT_ANGLE_270 = 3, /* 转转270度 */
VIDOE_ROT_ANGLE_MAX
} video_rotate_angle_e;
/**
* @brief mipi rx lane swap
PIN28&PIN27 PIN26&PIN25 PIN24&PIN23 PIN22&PIN21 PIN20&PIN19
RX_LANE_SWAP_0123 D0P&D0N D1P&D1N CLKP&CLKN D2P&D2N D3P&D3N
RX_LANE_SWAP_3210 D3P&D3N D2P&D2N CLKP&CLKN D1P&D1N D0P&D0N
RX_LANE_SWAP_2103(default) D2P&D2N D1P&D1N CLKP&CLKN D0P&D0N D3P&D3N
RX_LANE_SWAP_3012 D3P&D3N D0P&D0N CLKP&CLKN D1P&D1N D2P&D2N
*/
typedef enum
{
RX_LANE_SWAP_0123 = 0x0,
RX_LANE_SWAP_3210 = 0x1,
RX_LANE_SWAP_2103 = 0x2,
RX_LANE_SWAP_DEFAULT_ORDER = 0x2, /* 默认原理图为2103顺序 */
RX_LANE_SWAP_3012 = 0x3,
RX_LANE_SWAP_MAX
} dsi_rx_lane_swap_e;
/**
* @brief mipi P/N lane swap flag
* eg: pn_swap = RX_LANE_0_PN_SWAP | RX_LANE_CLK_PN_SWAP;
* lane0 CLK P跟N交换lane不变
* lane表示的是进行完lane swap的lane,lane swap配置RX_LANE_SWAP_3012,RX_LANE_0_PN_SWAP则表示PIN26&PIN25进行PN交换,D0P&D0N变成D0N&D0P
*/
typedef enum
{
RX_LANE_0_PN_SWAP = 0x1,
RX_LANE_1_PN_SWAP = 0x2,
RX_LANE_2_PN_SWAP = 0x4,
RX_LANE_3_PN_SWAP = 0x8,
RX_LANE_CLK_PN_SWAP = 0x10
} dsi_rx_lane_pn_swap_e;
/**
* @brief error processing level
*/
typedef enum
{
ERR_HANDLE_NONE = 0,
ERR_HANDLE_L1 = 1,
ERR_HANDLE_L2 = 2,
ERR_HANDLE_L3 = 3,
ERR_HANDLE_MAX
} hal_err_handle_level_e;
/**
* @brief flow control mode
*/
typedef enum
{
FC_AUTO_MODE = 0, /* 自动匹配模式,根据base info配置匹配1-4 */
FC_V2V_NORMAL_MODE = 1, /* Video to Video 模式转换 */
FC_V2C_NORMAL_MODE = 2, /* Video to Command 模式转换 */
FC_C2V_NORMAL_MODE = 3, /* Command to Video 模式转换 */
FC_C2C_NORMAL_MODE = 4, /* Command to Command 模式转换 */
FC_PRO_MOTION_MODE = 6, /* 自适应帧率转换(LTPO模式) */
FC_PRO_MOTION_MODE_2 = 5, /* 自适应帧率转换(LTPO模式) */
FC_PRO_MOTION_WITH_PU_MODE = 7, /* 自适应帧率带PU */
FC_V2V_AUTO_SYCN_MODE = 8, /* Video to Video 软件同步 */
FC_V2V_DIRECT_MODE = 9, /* Video to Video 直通模式 */
FC_MODE_MAX
} flow_control_mode_e;
/**
* @brief transform
*/
typedef struct
{
uint16_t top;
uint16_t bottom;
uint16_t left;
uint16_t right;
bool enable;
} pic_edge_info_t;
/**
* @brief transform
*/
typedef struct
{
uint32_t src_w; /* mipi rx 接收的 width */
uint32_t src_h; /* mipi rx 接收的 height */
uint32_t dst_w; /* mipi tx 发送的 width */
uint32_t dst_h; /* mipi tx 发送的 height */
dsi_video_frame_rate_e src_frate; /* mipi rx 接收的frame rate */
dsi_video_data_mode_e src_mode; /* mipi rx 接收video 数据传输模式(video/cmd mode) */
dsi_video_data_mode_e dst_mode; /* mipi tx 输出video 数据传输模式(video/cmd mode) */
uint16_t pn_swap; /* mipi P/N swap标志位, rx可配置/tx暂不支持 */
} dsi_base_trans_info_t;
/**
* @brief transform
*/
typedef struct
{
bool mirror_en; /* 对video 做水平镜像标志位 */
bool pu_optimize; /* 用于优化PU显示效果默认为false;true:优化PU显示显示效果,高功耗;false:普通PU模式,低功耗 */
video_rotate_angle_e rot_angle; /* 对video 做旋转的角度 */
flow_control_mode_e flow_control_mode; /* 图像数据流控制模式 */
pic_edge_info_t crop_info; /* 图像边缘裁剪配置 not impletmented */
pic_edge_info_t blank_info; /* 图像边缘补黑配置 not impletmented */
bool bw_optimize; /* 带宽自动检查,默认打开 */
uint8_t pq_type; /* picture quality,参数为 pq_type_e */
} dsi_base_extra_info_t;
/**
* @brief ccm系数
*/
typedef struct
{
uint32_t coef_c00;
uint32_t coef_c01;
uint32_t coef_c02;
uint32_t coef_c10;
uint32_t coef_c11;
uint32_t coef_c12;
uint32_t coef_c20;
uint32_t coef_c21;
uint32_t coef_c22;
} ccm_coef_t;
/**
* @brief hight performan mode level
*/
typedef enum
{
HIGHT_PERFORMAN_NONE = 0,
HIGHT_PERFORMAN_L1 = 1,
HIGHT_PERFORMAN_L2 = 2,
HIGHT_PERFORMAN_MAX
} hight_performan_mode_e;
/**
* @brief TX False color去伪彩参数结构体
*/
typedef struct
{
uint16_t edgemedslope;
uint16_t desatslope;
} dsi_tx_fc_t;
/**
* @brief TX
*/
typedef struct
{
bool y_enh_method;
uint8_t enhance_str;
uint16_t enhance_slope;
uint16_t boundscale_low;
uint16_t boundscale_high;
} dsi_tx_edge_enh_t;
/**
* @brief TX
*/
typedef struct
{
uint8_t edge_thr;
bool use_large_kernel;
} dsi_tx_edge_dect_t;
/**
* @brief TX bcsa
*/
typedef struct
{
int8_t brightness; /* 亮度调整, 范围-127 - 127 */
uint16_t contrast; /* 对比度调整,范围0 - 4095 */
uint16_t saturation; /* 饱和度调整,范围0 - 4095 */
} dsi_tx_bcs_t;
/**
* @brief partial display
*/
typedef struct
{
uint32_t st_line; /*部分显示起始行位置*/
uint32_t st_col; /*部分显示起始列位置*/
uint32_t end_line; /*部分显示结束行位置*/
uint32_t end_col; /*部分显示结束列位置*/
uint8_t value_r; /*部分显示背景色R值*/
uint8_t value_g; /*部分显示背景色G值*/
uint8_t value_b; /*部分显示背景色B值*/
} dsi_tx_par_dis_t;
#endif //__MIPI_DSI_COMMON_H__

100
src/common/tau_log.h Normal file
View File

@ -0,0 +1,100 @@
/*******************************************************************************
*
*
* File: tau_log.h
* Description log file
* Version V0.1
* Date 2020-12-08
* Author linyw
*******************************************************************************/
#ifndef _TAU_LOG_H_
#define _TAU_LOG_H_
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
#include "ArmCM0.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define LOG_TAG "tau_log"
#define LOG_CURREN_LEVEL kLOG_LEVEL_DBG /* 配置打印等级 TODO:每个模块可配置打印等级 */
#define LOG_BUF_SIZE (256) /* 配置打印缓存的大小 */
/*
* Using the following three macros for conveniently logging.
*/
#define TAU_LOGD(format,...) \
do { \
tau_log_printf(kLOG_LEVEL_DBG, "[%s] (%04d) " format, LOG_TAG, __LINE__, ##__VA_ARGS__); \
} while (0)
#define TAU_LOGI(format,...) \
do { \
tau_log_printf(kLOG_LEVEL_INF, "[%s] (%04d) " format, LOG_TAG, __LINE__, ##__VA_ARGS__); \
} while (0)
#define TAU_LOGE(format,...) \
do { \
tau_log_printf(kLOG_LEVEL_ERR, "[%s] (%04d) " format, LOG_TAG, __LINE__, ##__VA_ARGS__); \
} while (0)
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/**
* @brief log打印等级枚举
*
*/
typedef enum
{
kLOG_LEVEL_DBG = 0,
kLOG_LEVEL_INF,
kLOG_LEVEL_ERR,
kLOG_LEVEL_NONE /* 不打印任何参数 */
} log_level_e;
/**
* @brief log打印端口枚举
*
*/
typedef enum
{
LOG_PORT_UART0, /* 使用串口输出打印 */
LOG_PORT_UART1, /* 使用串口输出打印 */
LOG_PORT_SWD, /* 使用swd输出打印 */
LOG_PORT_UNKNOWN
} log_port_e;
/*******************************************************************************
* 4.Global variable extern declarations
*******************************************************************************/
/*******************************************************************************
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief log系统
* @param baud_rate
* @param log_port
* @retval none
*/
void tau_log_init(uint32_t baud_rate, log_port_e log_port);
/**
* @brief log系统
* @param baud_rate
* @param log_port
* @retval none
*/
void tau_log_printf(log_level_e log_lv, const char *fmt, ...);
#endif

229
src/common/tau_operations.h Normal file
View File

@ -0,0 +1,229 @@
/*******************************************************************************
*
*
* File: tau_operations.h
* Description
* Version V0.1
* Date 2020-09-07
* Author lzy
*******************************************************************************/
#ifndef __TAU_BYTEOPS_H
#define __TAU_BYTEOPS_H
/**
* \name
* @{
*/
/** \brief 长整数位数 */
#ifndef TAU_BITS_PER_LONG
#define TAU_BITS_PER_LONG 32
#endif
/** \brief 字节位数 */
#define TAU_BITS_PER_BYTE 8
/** @} */
/******************************************************************************/
/**
* \name
* @{
*/
/** \brief bit移位
* TAU_BIT(2) is 0x4
*/
#define TAU_BIT(bit) (1u << (bit))
/** \brief 值移位
* TAU_SBF(0xFF, 8) is 0xff00
*/
#define TAU_SBF(value, field) ((value) << (field))
/** \brief bit置位
* TAU_BIT_SET(0, 8) is 0x100
*/
#define TAU_BIT_SET(data, bit) ((data) |= TAU_BIT(bit))
/** \brief bit清零
* TAU_BIT_CLR(0xFF, 2) is 0xfb
*/
#define TAU_BIT_CLR(data, bit) ((data) &= ~TAU_BIT(bit))
/** \brief bit置位, 根据 mask 指定的位
* TAU_BIT_SET_MASK(0xF0F0, 0xF00) is 0xfff0
*/
#define TAU_BIT_SET_MASK(data, mask) ((data) |= (mask))
/** \brief bit清零, 根据 mask 指定的位
* TAU_BIT_CLR_MASK(0xFFFF, 0xFF00) is 0xff
*/
#define TAU_BIT_CLR_MASK(data, mask) ((data) &= ~(mask))
/** \brief bit翻转
* TAU_BIT_TOGGLE(0xFFFF, 0) is 0xfffe
* TAU_BIT_TOGGLE(0x0000, 1) is 0x2
*/
#define TAU_BIT_TOGGLE(data, bit) ((data) ^= TAU_BIT(bit))
/** \brief bit修改
* TAU_BIT_MODIFY(0, 8, 1) is 0x100
* TAU_BIT_MODIFY(0xFFFF, 1, 0) is 0xfffd
*/
#define TAU_BIT_MODIFY(data, bit, value) \
((value) ? TAU_BIT_SET(data, bit) : TAU_BIT_CLR(data, bit))
/** \brief 测试bit是否置位
* TAU_BIT_ISSET(0xF0F1, 1) is 0
* TAU_BIT_ISSET(0xF0F2, 1) is 2
*/
#define TAU_BIT_ISSET(data, bit) ((data) & TAU_BIT(bit))
/** \brief 获取bit值
* TAU_BIT_GET(0xF0F1, 1) is 0
* TAU_BIT_GET(0xF0F2, 1) is 1
*/
#define TAU_BIT_GET(data, bit) (TAU_BIT_ISSET(data, bit) ? 1 : 0)
/** \brief 检测bit值
* TAU_BIT_CHECK(0xF5FF, 4) is 1
*/
#define TAU_BIT_CHECK(data, bit) \
(((data) & TAU_BIT(bit)) ? 1 : 0)
/** \brief 获取 n bits 掩码值
* TAU_BITS_MASK(2) is 0x3
*/
#define TAU_BITS_MASK(n) (~((~0u) << (n)))
/** \brief 获取位段值
* TAU_BITS_GET(0xF5FF, 0x0F00, 8) is 0x5
*/
#define TAU_BITS_GET(data, mask, pos) \
(((data) & (mask)) >> (pos))
/** \brief 获取位段值
* TAU_BITS_CHECK(0xF5FF, 0x0F00) is 1
*/
#define TAU_BITS_CHECK(data, mask) \
(((data) & (mask)) ? 1 : 0)
/** \brief 修改位段值
* TAU_BITS_MODIFY(0xF5FF, 0x0FF0, 0x8A0) is 0xF8AF
*/
#define TAU_BITS_MODIFY(data, clear_mask, set_mask) \
(data) = (((data) & (~(clear_mask))) | (set_mask))
/** \brief 设置位段值
* TAU_WRITE_REG32(0x05FF, 0xFFFA) is 0xFFFA
*/
#define TAU_WRITE_REG32(data, value) ((data) = (value))
/** \brief 设置位段值
* TAU_RAED_REG32(0x05FF) is 0x05FF
*/
#define TAU_RAED_REG32(data) (data)
/** @} */
/******************************************************************************/
/**
* \brief 2-byte整数的高位byte
*
* \par
* \code
* uint16_t a = 0x1234;
* uint16_t b;
*
* b = TAU_MSB(a); //b=0x12
* \endcode
*/
#define TAU_MSB(x) (((x) >> 8) & 0xff)
/**
* \brief 2-byte整数的低位byte
*
* \par
* \code
* uint16_t a = 0x1234;
* uint16_t b;
*
* b = TAU_LSB(a); //b=0x34
* \endcode
*/
#define TAU_LSB(x) ((x) & 0xff)
/**
* \brief 2-word整数的高位word
*
* \par
* \code
* uint32_t a = 0x12345678;
* uint32_t b;
*
* b = TAU_MSW(a); //b=0x1234
* \endcode
*/
#define TAU_MSW(x) (((x) >> 16) & 0xffff)
/**
* \brief 2-word整数的低位word
*
* \par
* \code
* uint32_t a = 0x12345678;
* uint32_t b;
*
* b = TAU_LSW(a); //b=0x5678
* \endcode
*/
#define TAU_LSW(x) ((x) & 0xffff)
/**
* \brief 32-bit整数的高位word和低位word
*
* \par
* \code
* uint32_t a = 0x12345678;
* uint32_t b;
*
* b = TAU_WORDSWAP(a); //b=0x56781234
* \endcode
*/
#define TAU_WORDSWAP(x) (TAU_MSW(x) | (TAU_LSW(x) << 16))
/**
* \brief 32-bit整数的字节顺序
*
* \par
* \code
* uint32_t a = 0x12345678;
* uint32_t b;
*
* b = TAU_LONGSWAP(a); //b=0x78563412
* \endcode
*/
#define TAU_LONGSWAP(x) ((TAU_LLSB(x) << 24) | \
(TAU_LNLSB(x) << 16) | \
(TAU_LNMSB(x) << 8) | \
(TAU_LMSB(x)))
#define TAU_LLSB(x) ((x) & 0xff) /**< \brief 取32bit整数第1个字节 */
#define TAU_LNLSB(x) (((x) >> 8) & 0xff) /**< \brief 取32bit整数第2个字节 */
#define TAU_LNMSB(x) (((x) >> 16) & 0xff) /**< \brief 取32bit整数第3个字节 */
#define TAU_LMSB(x) (((x) >> 24) & 0xff) /**< \brief 取32bit整数第4个字节 */
#define TAU_LNSB(x,n) (((x) >> ((n) * 8) ) & 0xff) /**< \brief 取32bit整数第n个字节 ,参数 0 - 3*/
/**
* @}
*/
#endif /* __TAU_BYTEOPS_H */
/* end of file */

Some files were not shown because too many files have changed in this diff Show More