1、解决部分模组无法点亮问题:增加两个版本的时序调整

2、博创修改最新版本代码
This commit is contained in:
“苏飞源” 2023-08-02 15:12:17 +08:00
parent 93d626249a
commit bab12e8ac1
39 changed files with 19285 additions and 2887 deletions

View File

@ -50,7 +50,7 @@
<InvalidFlash>1</InvalidFlash>
</TargetStatus>
<OutputDirectory>.\Objects\</OutputDirectory>
<OutputName>CVWL568_MI10PRO_V100_20230714</OutputName>
<OutputName>CVWL568_MI10PRO_HX667</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>1</CreateHexFile>
@ -408,6 +408,62 @@
<FileType>5</FileType>
<FilePath>..\..\WL568_MI10PRO_NT37800_20230419\src\app\demo\demo_version.txt</FilePath>
</File>
<File>
<FileName>app_tp_for_custom_s8.c</FileName>
<FileType>1</FileType>
<FilePath>..\src\app\demo\app_tp_for_custom_s8.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
<PublicsOnly>2</PublicsOnly>
<StopOnExitCode>11</StopOnExitCode>
<CustomArgument></CustomArgument>
<IncludeLibraryModules></IncludeLibraryModules>
<ComprImg>1</ComprImg>
</CommonProperty>
<FileArmAds>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>
<uGnu>2</uGnu>
<useXO>2</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>2</vShortEn>
<vShortWch>2</vShortWch>
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
</File>
</Files>
</Group>
<Group>
@ -419,9 +475,9 @@
<FilePath>..\src\sdk\ISP_568\lib\CVWL568.lib</FilePath>
</File>
<File>
<FileName>CVWL568_MI10PRO_TP.lib</FileName>
<FileName>CVWL568_MI10PRO_HX667_TP.lib</FileName>
<FileType>4</FileType>
<FilePath>..\src\sdk\ISP_568\lib\CVWL568_MI10PRO_TP.lib</FilePath>
<FilePath>..\src\sdk\ISP_568\lib\CVWL568_MI10PRO_HX667_TP.lib</FilePath>
</File>
</Files>
</Group>

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

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,147 +0,0 @@
/*******************************************************************************
*
*
* File: app_tp_transfer_data.h
* Description
* Version V0.1
* Date 2021-10-14
* Author zhanghz
*******************************************************************************/
#ifndef __APP_TP_PHONE_TRANSFER_DATA_S8_H__
#define __APP_TP_PHONE_TRANSFER_DATA_S8_H__
#include "tau_common.h"
#include "ap_demo.h"
/***************send to phone***************/
const uint8_t phone_b6_00_28_data[] = {0xB6, 0x00, 0x28, 0x80};
const uint8_t phone_b6_00_28_back[] = {0x10, 0x00, 0x00, 0x00, 0x00, 0x26, 0x0D, 0x01};
const uint8_t phone_b6_00_08_data[] = {0xB6, 0x00, 0x08};
const uint8_t phone_b6_00_08_back[] = {0x00, 0x26, 0x23};
const uint8_t phone_b6_00_04_data[] = {0xB6, 0x00, 0x04};
const uint8_t phone_b6_00_04_back[] = {0x00, 0x36, 0x70, 0x01, 0x00, 0x26, 0x23};
const uint8_t phone_b8_00_08_data[] = {0xB8, 0x00, 0x08};
const uint8_t phone_b8_00_08_back[] = {0x13, 0x00, 0x08, 0x05, 0x07, 0x06, 0x00, 0x00}; //// becareful 理论一致
const uint8_t phone_ac_data[] = {0xAC};
const uint8_t phone_ac_back[] = {0x16, 0x06, 0x23, 0x00, 0x00, 0x00, 0x00, 0x00};
const uint8_t phone_a7_data[] = {0xA7};
const uint8_t phone_a7_back[] = {0x0F, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
const uint8_t phone_84_data[] = {0x84};
const uint8_t phone_84_back[] = {0x00, 0x00, 0x00, 0x00};
const uint8_t phone_aa_00_data[] = {0xaa, 0x00};
const uint8_t phone_aa_00_back[] = {0x19, 0x01, 0x01, 0x23, 0x26, 0x26, 0x0D, 0x00};
const uint8_t phone_aa_01_data[] = {0xaa, 0x01};
const uint8_t phone_aa_01_back[] = {0x1A, 0x9D, 0x9B, 0x00, 0x00, 0x00, 0x00, 0x00};
const uint8_t phone_d0_00_5a_data[] = {0xD0, 0x00, 0x5A};
const uint8_t phone_d0_00_5a_back[] = {0x00, 0x20, 0x00, 0x10};
const uint8_t phone_d0_00_5c_data[] = {0xD0, 0x00, 0x5C};
const uint8_t phone_d0_00_5c_back[] = {0x00, 0x10, 0x00, 0x3D};
const uint8_t phone_d0_00_64_data[] = {0xD0, 0x00, 0x64};
const uint8_t phone_d0_00_64_back[] = {0x00, 0x01, 0x00};
const uint8_t phone_d0_00_88_data[] = {0xD0, 0x00, 0x88};
const uint8_t phone_d0_00_88_back[] = {0x00, 0x8F, 0x0B, 0x9F, 0x05};
const uint8_t phone_d0_00_7a_data[] = {0xD0, 0x00, 0x7A};
const uint8_t phone_d0_00_7a_back[] = {0x06, 0x04, 0x76, 0x00, 0x00, 0x05, 0x00, 0x24, 0x00, 0x00, 0x30, 0x00, 0x00, 0x20, 0x00};
const uint8_t phone_d0_76_04_data[] = {0xD0, 0x76, 0x04};
const uint8_t phone_d0_76_04_back[] = {0x8F, 0x47, 0x39, 0x35, 0x35};
const uint8_t phone_d0_00_50_data[] = {0xD0, 0x00, 0x50};
const uint8_t phone_d0_00_50_back[] = {0x06, 0x5C, 0x1F, 0x01, 0x06, 0x00, 0x00, 0x09}; //// becareful
const uint8_t phone_d0_1f_6e_data[] = {0xD0, 0x1F, 0x6E};
const uint8_t phone_d0_1f_6e_back[] = {0x00, 0x01, 0x9D, 0x90, 0x00};
const uint8_t phone_d0_1f_b3_data[] = {0xD0, 0x1F, 0xB3};
const uint8_t phone_d0_1f_b3_back[] = {0x00, 0x01, 0x01, 0x01, 0x00};
const uint8_t phone_d0_1f_6c_data[] = {0xD0, 0x1F, 0x6C};
const uint8_t phone_d0_1f_6c_back[] = {0x00, 0x09, 0x00};
const uint8_t phone_d0_1f_b2_data[] = {0xD0, 0x1F, 0xB2};
const uint8_t phone_d0_1f_b2_back[] = {0x00, 0x02};
const uint8_t phone_d0_1f_72_data[] = {0xD0, 0x1F, 0x72};
const uint8_t phone_d0_1f_72_back[] = {0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
const uint8_t phone_d0_00_06_data[] = {0xD0, 0x00, 0x06};
const uint8_t phone_d0_00_06_back[] = {0x00, 0x6C, 0x23, 0x00};
const uint8_t phone_d0_23_ac_data[] = {0xD0, 0x23, 0xAC};
const uint8_t phone_d0_23_ac_back[] = {0x00, 0x42, 0x0A, 0x71, 0x0A, 0x28, 0x0A, 0xDE, 0x09, 0x05, 0x0A, 0xDE, 0x09, 0xCA, 0x09, 0x11, 0x0A, 0x50, 0x0A, 0xF5, 0x09, 0xF1, 0x09, 0x40, 0x0A, 0xF5, 0x09, 0x8E, 0x0A, 0x04, 0x0A, 0x54, 0x0A, 0x14, 0x0A, 0xBE, 0x09, 0x4E, 0x0A, 0x35, 0x0A, 0xB0, 0x0A, 0x6F, 0x0A, 0x00, 0x0B, 0xA6, 0x0A, 0x62, 0x0A, 0x62, 0x0A, 0x5E, 0x0A, 0xEA, 0x0A, 0xB5, 0x0A, 0x7B, 0x0B, 0x97, 0x0B, 0x82, 0x0B, 0xE1, 0x09, 0x5D, 0x0A, 0xF6, 0x09, 0xF3, 0x09, 0x10, 0x0A, 0x07, 0x0A, 0xBA, 0x09, 0x27, 0x0A, 0xC8, 0x09, 0x2C, 0x0A, 0xF0, 0x09, 0xAF, 0x09, 0x02, 0x0A, 0xC9, 0x09, 0xF7, 0x09, 0x7E, 0x0A, 0x94, 0x0A, 0xC7, 0x0A, 0x57, 0x0B, 0xCF, 0x0A, 0x4F, 0x0B, 0xF1, 0x0A, 0x5B, 0x0B, 0x07, 0x0B, 0x17, 0x0B, 0x9C, 0x0A, 0x57, 0x0A, 0xE7, 0x0A, 0xBE, 0x0A, 0x03, 0x0B, 0x69, 0x0B, 0x82, 0x0B};
const uint8_t phone_d0_24_2c_data[] = {0xD0, 0x24, 0x2C};
const uint8_t phone_d0_24_2c_back[] = {0xEF, 0xEF, 0x09, 0xCE, 0x09, 0xD6, 0x09, 0xD4, 0x09, 0xEF, 0x09, 0xDE, 0x09, 0xD6, 0x09, 0x91, 0x09, 0x03, 0x0A, 0x88, 0x09, 0x16, 0x0A, 0xC9, 0x09, 0x1F, 0x0A, 0xD7, 0x09, 0xFB, 0x09, 0xBD, 0x09, 0x14, 0x0A, 0x38, 0x0A, 0xE2, 0x09, 0x22, 0x0A, 0x86, 0x0A, 0x2E, 0x0A, 0x64, 0x0A, 0xDF, 0x09, 0x0E, 0x0A, 0x53, 0x0A, 0x24, 0x0A, 0xBE, 0x0A, 0x94, 0x0A, 0xD7, 0x0A, 0x64, 0x0B, 0xD7, 0x0A, 0x6F, 0x0A, 0x3B, 0x0A, 0x44, 0x0A, 0x7D, 0x09, 0x9C, 0x09, 0x91, 0x09, 0x98, 0x09, 0x0A, 0x0A, 0x14, 0x0A, 0x25, 0x0A, 0xF5, 0x09, 0x7C, 0x09, 0xBC, 0x09, 0x76, 0x09, 0xA1, 0x09, 0x06, 0x0A, 0x7D, 0x09, 0xEA, 0x09, 0x9B, 0x09, 0xEA, 0x09, 0x3B, 0x0A, 0xE9, 0x09, 0x46, 0x0A, 0xD9, 0x09, 0x1D, 0x0A, 0x71, 0x0A, 0x3C, 0x0A, 0x09, 0x0A, 0xA3, 0x0A, 0xAC, 0x0A, 0xAD, 0x0B, 0x06, 0x0B};
const uint8_t phone_d0_24_ac_data[] = {0xD0, 0x24, 0xAC};
const uint8_t phone_d0_24_ac_back[] = {0x28, 0x28, 0x0A, 0xE8, 0x09, 0xF1, 0x09, 0xE9, 0x09, 0x03, 0x0A, 0xEF, 0x09, 0xD5, 0x09, 0xC2, 0x09, 0xA4, 0x09, 0xF2, 0x09, 0x11, 0x0A, 0xF3, 0x09, 0x3F, 0x0A, 0xF2, 0x09, 0xF4, 0x09, 0x47, 0x0A, 0xA5, 0x09, 0x3A, 0x0A, 0xC3, 0x09, 0x04, 0x0A, 0x95, 0x09, 0x0E, 0x0A, 0x9B, 0x09, 0xED, 0x09, 0x2C, 0x0A, 0xDB, 0x09, 0x5A, 0x0A, 0x11, 0x0A, 0xAA, 0x0A, 0xA4, 0x0A, 0xA8, 0x0B, 0x65, 0x0B, 0xC6, 0x09, 0x99, 0x09, 0x9F, 0x09, 0x93, 0x09, 0xBC, 0x09, 0xB0, 0x09, 0x8C, 0x09, 0x62, 0x09, 0x70, 0x09, 0x95, 0x09, 0x12, 0x0A, 0xB7, 0x09, 0xED, 0x09, 0xEF, 0x09, 0xA9, 0x09, 0xE9, 0x09, 0x05, 0x0A, 0x00, 0x0A, 0x55, 0x0A, 0x77, 0x09, 0xD5, 0x09, 0x4C, 0x0A, 0xFC, 0x09, 0x3E, 0x0A, 0x94, 0x0A, 0xF6, 0x09, 0xA2, 0x0A, 0x71, 0x0A, 0xD5, 0x0A, 0xC0, 0x0A, 0xE4, 0x0A, 0x49, 0x0B};
const uint8_t phone_d0_25_2c_data[] = {0xD0, 0x25, 0x2C};
const uint8_t phone_d0_25_2c_back[] = {0x21, 0x21, 0x0A, 0xE4, 0x09, 0xE9, 0x09, 0xE7, 0x09, 0x3F, 0x09, 0x2D, 0x09, 0xD6, 0x09, 0x91, 0x09, 0xA7, 0x09, 0xA1, 0x09, 0xB5, 0x09, 0xDC, 0x09, 0x6A, 0x09, 0xB1, 0x09, 0x34, 0x09, 0x79, 0x09, 0x0E, 0x0A, 0x11, 0x0A, 0x25, 0x0A, 0xD1, 0x09, 0xFE, 0x09, 0x9C, 0x09, 0xFE, 0x09, 0xED, 0x09, 0x05, 0x0A, 0x30, 0x0A, 0x1F, 0x0A, 0x9C, 0x0A, 0x15, 0x0A, 0xEC, 0x0A, 0xCE, 0x0A, 0x29, 0x0B, 0xCC, 0x09, 0x88, 0x09, 0x91, 0x09, 0x92, 0x09, 0xAC, 0x09, 0x9E, 0x09, 0x8F, 0x09, 0x3D, 0x09, 0x53, 0x09, 0x80, 0x09, 0xD6, 0x09, 0x3D, 0x09, 0xAC, 0x09, 0x9E, 0x09, 0x9F, 0x09, 0xE9, 0x09, 0xAA, 0x09, 0x0B, 0x0A, 0xE4, 0x09, 0x63, 0x0A, 0x94, 0x0A, 0x68, 0x0A, 0xC9, 0x09, 0x12, 0x0A, 0x0A, 0x0A, 0x98, 0x0A, 0x7F, 0x0A, 0xC5, 0x0A, 0x62, 0x0A, 0xB7, 0x0A, 0x4A, 0x0B, 0x52, 0x0B};
const uint8_t phone_d0_25_ac_data[] = {0xD0, 0x25, 0xAC};
const uint8_t phone_d0_25_ac_back[] = {0xCF, 0xCF, 0x09, 0xCB, 0x09, 0xD5, 0x09, 0xDD, 0x09, 0x3F, 0x09, 0x35, 0x09, 0xEE, 0x09, 0x8E, 0x09, 0xAB, 0x09, 0xEF, 0x09, 0xC0, 0x09, 0x9B, 0x09, 0xE3, 0x09, 0xCC, 0x09, 0xBB, 0x09, 0x64, 0x09, 0xA6, 0x09, 0x0C, 0x0A, 0xB2, 0x09, 0x10, 0x0A, 0xE3, 0x09, 0x71, 0x0A, 0xD6, 0x0A, 0x1F, 0x0A, 0x02, 0x0A, 0x63, 0x0B, 0x7C, 0x0A, 0xE9, 0x09, 0x6F, 0x0A, 0xBF, 0x0A, 0x1A, 0x0B, 0x75, 0x0B, 0x6B, 0x09, 0xEA, 0x09, 0x76, 0x09, 0x91, 0x09, 0x9F, 0x09, 0x9B, 0x09, 0xCE, 0x09, 0xF5, 0x09, 0x4E, 0x09, 0x94, 0x09, 0xE7, 0x09, 0x52, 0x09, 0x94, 0x09, 0x90, 0x09, 0x86, 0x09, 0xBF, 0x09, 0x07, 0x0A, 0x99, 0x09, 0x06, 0x0A, 0x98, 0x09, 0xDD, 0x09, 0x2F, 0x0A, 0x47, 0x0B, 0x17, 0x0B, 0x24, 0x0A, 0xD3, 0x09, 0x96, 0x0A, 0x47, 0x0A, 0x8A, 0x0A, 0xAC, 0x0A, 0x95, 0x0B, 0x2B, 0x0B};
const uint8_t phone_d0_26_2c_data[] = {0xD0, 0x26, 0x2C};
const uint8_t phone_d0_26_2c_back[] = {0xBC, 0xBC, 0x09, 0x74, 0x09, 0x85, 0x09, 0x92, 0x09, 0xB0, 0x09, 0xAE, 0x09, 0x4B, 0x09, 0x8E, 0x09, 0xA3, 0x09, 0x89, 0x09, 0x59, 0x09, 0xB4, 0x09, 0x5D, 0x09, 0x8A, 0x09, 0xCD, 0x09, 0x05, 0x0A, 0x0E, 0x0A, 0xA2, 0x09, 0x31, 0x0A, 0x90, 0x09, 0xD4, 0x09, 0xAE, 0x09, 0x4D, 0x0A, 0x4E, 0x0B, 0x74, 0x0A, 0xA6, 0x0A, 0x99, 0x0A, 0x46, 0x0A, 0x47, 0x0B, 0x99, 0x0A, 0x2D, 0x0B, 0x55, 0x0B, 0x50, 0x09, 0xCE, 0x09, 0x20, 0x09, 0x2D, 0x09, 0x56, 0x09, 0x4D, 0x09, 0x6D, 0x09, 0xB6, 0x09, 0x47, 0x09, 0xAC, 0x09, 0xCC, 0x09, 0x92, 0x09, 0xEB, 0x09, 0x82, 0x09, 0x9C, 0x09, 0xA2, 0x09, 0xCE, 0x09, 0x28, 0x0A, 0xCB, 0x09, 0xD1, 0x09, 0x11, 0x0A, 0x92, 0x0A, 0x2F, 0x0B, 0xF0, 0x09, 0x55, 0x0B, 0x25, 0x0A, 0x93, 0x0A, 0x50, 0x0A, 0xE7, 0x0A, 0xE5, 0x0A, 0x4B, 0x0B, 0xE9, 0x0A};
const uint8_t phone_d0_26_ac_data[] = {0xD0, 0x26, 0xAC};
const uint8_t phone_d0_26_ac_back[] = {0xC5, 0xC5, 0x09, 0x88, 0x09, 0xA3, 0x09, 0xB4, 0x09, 0xDE, 0x09, 0xD7, 0x09, 0x9A, 0x09, 0x74, 0x09, 0x9E, 0x09, 0x65, 0x09, 0x7F, 0x09, 0xCF, 0x09, 0x64, 0x09, 0xB6, 0x09, 0x4E, 0x09, 0x93, 0x09, 0x45, 0x0A, 0x58, 0x0B, 0xFE, 0x0A, 0x3B, 0x0B, 0xA7, 0x0A, 0xA9, 0x0B, 0x36, 0x0B, 0xD4, 0x0A, 0xA2, 0x0A, 0x89, 0x0A, 0x2E, 0x0A, 0xA5, 0x0A, 0x65, 0x0A, 0xFB, 0x0A, 0xB4, 0x0A, 0xD2, 0x0A, 0x8C, 0x09, 0x4C, 0x09, 0x6D, 0x09, 0x83, 0x09, 0xB3, 0x09, 0xAB, 0x09, 0x58, 0x09, 0x5C, 0x09, 0x78, 0x09, 0xC1, 0x09, 0x5F, 0x09, 0xB0, 0x09, 0x46, 0x09, 0xA8, 0x09, 0xFC, 0x09, 0x93, 0x09, 0xB1, 0x0A, 0x72, 0x0A, 0x79, 0x0A, 0x5D, 0x0A, 0x2F, 0x0B, 0x82, 0x0B, 0x22, 0x0B, 0xD6, 0x0A, 0xB8, 0x0A, 0xE3, 0x0A, 0xA2, 0x0A, 0xD9, 0x0A, 0xAC, 0x0A, 0x32, 0x0B, 0xF8, 0x0A, 0xE7, 0x0A};
const uint8_t phone_d0_27_2c_data[] = {0xD0, 0x27, 0x2C};
const uint8_t phone_d0_27_2c_back[] = {0x20, 0x20, 0x09, 0xC7, 0x09, 0x2E, 0x09, 0x4C, 0x09, 0x7C, 0x09, 0x6F, 0x09, 0xD7, 0x09, 0xEA, 0x09, 0x42, 0x09, 0x92, 0x09, 0xBD, 0x09, 0x8B, 0x09, 0xE8, 0x09, 0x6F, 0x09, 0xD7, 0x09, 0x05, 0x0A, 0x37, 0x0A, 0x78, 0x0A, 0x60, 0x0A, 0xA9, 0x0A, 0x2C, 0x0B, 0x27, 0x0B, 0xDF, 0x0A, 0x2C, 0x0B, 0x20, 0x0B, 0x8E, 0x0B, 0x4A, 0x0B, 0x40, 0x0B, 0x0D, 0x0B, 0xEB, 0x0A, 0x72, 0x0B, 0x57, 0x0B, 0x37, 0x09, 0x29, 0x09, 0x6C, 0x09, 0x8E, 0x09, 0xBF, 0x09, 0xBD, 0x09, 0x58, 0x09, 0x77, 0x09, 0x90, 0x09, 0xDC, 0x09, 0x48, 0x09, 0x8F, 0x09, 0xEA, 0x09, 0xB3, 0x09, 0x27, 0x0A, 0x97, 0x09, 0x0E, 0x0A, 0x25, 0x0A, 0x6E, 0x0A, 0xB3, 0x0A, 0xCA, 0x0A, 0x88, 0x0A, 0x8C, 0x0A, 0xB8, 0x0A, 0xCD, 0x0A, 0xDF, 0x0A, 0x2A, 0x0B, 0xE6, 0x0A, 0x63, 0x0B, 0x06, 0x0B, 0x83, 0x0B, 0xD5, 0x0A};
/*******************************************/
#ifdef USE_FOR_MI10_PRO
const uint8_t phone_data_86_1[]={0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
const uint8_t phone_data_86_2[]={0x43,0x01,0xA4,0x06,0x70,0x00,0x00,0x00};
const uint8_t phone_data_86_3[]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
const uint8_t phone_data_86_4[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
const uint8_t phone_data_A6_1[]={0xA5,0x01,0x01,0x00,0x00,0x00,0x00,0x02,0x03,0x00,0x39,0x36,0x00,0x00,0x00,0x00,0x23,0x01,0x56,0x39,0x4F,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x08,0x08,\
0x08,0x00,0x30,0x32,0x00,0x4D,0x50,0x52,0x47,0x42,0x04,0x00,0x00,0x00,0x01,0x07,0x00,0x00,0x4F,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0xC1,0x78,0xFE,0x50,\
0x24,0x7B,0x67,0xEB,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x23,0x09,0x37,0x04,0x10,0x23,0x00,0x00,0xC1,0x78,\
0xFE,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x56,0x00,0x00,0x00,0x00,0x00,0x00,0xB0,0x8A,0x74,0x42,0xB0,0x48,0xF2,0x56,0x14,0x88,0x0E,0x0B,0xFA,0x0B,\
0x1E,0x76,0x3E,0x88,0x38,0x0B,0x24,0x0C,0x48,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
//{0xA5,0x01,0x01,0x00,0x00,0x00,0x00,0x02,0x03,0x00,0x39,0x36,0x00,0x00,0x00,0x00,0x14,0x01,0x28,0x28,0x42,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x08,0x08,\
//0x08,0x00,0x30,0x32,0x00,0x4D,0x50,0x52,0x47,0x42,0x18,0x00,0x00,0x00,0xFC,0x10,0x00,0x00,0x42,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x53,0x1F,0xAA,\
//0xEB,0x60,0xC4,0xF5,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x23,0x09,0x37,0x04,0x10,0x23,0x00,0x00,0x78,0x53,\
//0x1F,0xAA,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x56,0x00,0x00,0x00,0x00,0x00,0x00,0xAC,0x8A,0x70,0x42,0xAC,0x48,0xEE,0x56,0x10,0x88,0x0E,0x0B,0xFA,0x0B,\
//0x1A,0x76,0x3A,0x88,0x38,0x0B,0x24,0x0C,0x44,0x76,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\
//0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
const uint8_t phone_data_A6_2[]={0xA5,0x70,0x02,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x6F,0x70,0xA6,0x32,0x38,0x32,0x01,0x74,0x01,0x32,0x00};
const uint8_t phone_data_FA[]={0xC0};
const uint8_t phone_data_C105[]={0x00,0x00,0x50,0x0F,0x02,0x0E,0x01};
const uint8_t phone_data_C112_0[]={0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
const uint8_t phone_data_C112_22[]={0x00,0x00,0x00,0x00,0x23,0x09,0x05,0x00};
const uint8_t phone_data_C112_23[]={0x00,0x00,0x32,0x04,0x23,0x09,0x37,0x04};
const uint8_t phone_data_C112_12[]={0x00,0x00,0x00,0x00,0x23,0x09,0x27,0x00};
const uint8_t phone_data_C112_13[]={0x00,0x00,0x19,0x04,0x23,0x09,0x37,0x04};
const uint8_t phone_data_C112_02[]={0xF7,0x07,0x00,0x00,0x23,0x09,0x96,0x00};
const uint8_t phone_data_C112_03[]={0xF7,0x07,0xA1,0x03,0x23,0x09,0x37,0x04};
uint8_t phone_data_B1[]={0x00,0x082};
#endif
#endif

View File

@ -29,8 +29,6 @@ static uint8_t s_phone_read_buffer[BUFFER_SIZE_MAX];
uint8_t s_screen_read_MI10Pro[8];
uint8_t s_screen_read_MI10Pro_1[100];
static bool s_spim_write = false; //记录SPI主机是否配置发送是的话需要清除RXFIFO
static bool s_screen_int_flag = false; //记录是否接收到屏幕的报点中断
static bool s_phone_reset_flag = false; //记录是否接收到手机的开机复位信号
@ -165,8 +163,6 @@ void app_tp_screen_init(void)
hal_gpio_set_output_data(g_screen_input_rst_pad, IO_LVL_HIGH);
}
/**************************************************************************
* @name : app_tp_init
* @brief :
@ -183,21 +179,19 @@ void app_tp_init(void)
// hal_gpio_set_mode(IO_PAD_TD_SPIM_CLK,IO_MODE_I2C1_SCL);
// hal_gpio_set_mode(IO_PAD_TD_SPIM_CSN,IO_MODE_I2C1_SDA);
return;
#else
hal_gpio_set_pull_state(IO_PAD_TD_SPIM_CLK, ENABLE, DISABLE);
hal_gpio_set_pull_state(IO_PAD_TD_SPIM_CSN, ENABLE, DISABLE);
#endif
app_tp_screen_init(); //初始化手机复位的IO口
// app_tp_screen_int_init(); //配置screen中断输入引脚
app_tp_screen_init(); //初始化手机复位的IO口
// app_tp_screen_int_init(); //配置screen中断输入引脚
#ifdef G_PHONE_INT_DEFAULT_LOW
hal_gpio_init_output(g_phone_output_int_pad, IO_LVL_LOW); //配置phone报点输出中断IO口
#else
hal_gpio_init_output(g_phone_output_int_pad, IO_LVL_HIGH); //配置phone报点输出中断IO口
// hal_gpio_init_input(g_phone_output_int_pad);
// hal_gpio_init_input(g_phone_output_int_pad);
hal_gpio_set_pull_state(g_screen_input_int_pad, ENABLE, DISABLE);
hal_gpio_init_input(g_screen_input_int_pad);
#endif
@ -210,21 +204,21 @@ void app_tp_init(void)
#endif
#if PHONE_SLAVE_TRANSFER_I2C
hal_i2c_s_init(CHIP_I2C_ADDRESS, CHIP_I2C_ADDR_BITS);
hal_i2c_s_set_transfer(app_tp_i2cs_callback);
hal_i2c_s_nonblocking_read(s_phone_read_buffer, BUFFER_SIZE_MAX); //先配置接收 buffer
hal_i2c_s_init(CHIP_I2C_ADDRESS, CHIP_I2C_ADDR_BITS);
hal_i2c_s_set_transfer(app_tp_i2cs_callback);
hal_i2c_s_nonblocking_read(s_phone_read_buffer, BUFFER_SIZE_MAX); //先配置接收 buffer
#elif PHONE_SLAVE_TRANSFER_SPI
hal_spi_slave_init(PHONE_SPI_CPHA, PHONE_SPI_CPOL, true); // 初始化spi以及dma
hal_spi_slave_register_callback(app_tp_spis_callback); // 注册回调
hal_spi_slave_auto_transfer_abort(); // 停止传输
hal_spi_slave_flush_fifo(); // Flush FIFO
hal_spi_slave_init(PHONE_SPI_CPHA, PHONE_SPI_CPOL, true); // 初始化spi以及dma
hal_spi_slave_register_callback(app_tp_spis_callback); // 注册回调
hal_spi_slave_auto_transfer_abort(); // 停止传输
hal_spi_slave_flush_fifo(); // Flush FIFO
/* 每个packet自动接收, circle mode 为false, 即收到buffer max size数据后buffer不再更新, packet完成后调用回调 */
hal_spi_slave_set_auto_rx_buffer(s_phone_read_buffer, BUFFER_SIZE_MAX, false); // 设置auto rx buffer
hal_spi_slave_set_auto_tx_buffer(phone_reg_const_data[0].write_back, phone_reg_const_data[0].write_back_size, false); // 配置TX BUFFER
/* 每个packet自动接收, circle mode 为false, 即收到buffer max size数据后buffer不再更新, packet完成后调用回调 */
hal_spi_slave_set_auto_rx_buffer(s_phone_read_buffer, BUFFER_SIZE_MAX, false); // 设置auto rx buffer
hal_spi_slave_set_auto_tx_buffer(phone_reg_const_data[0].write_back, phone_reg_const_data[0].write_back_size, false); // 配置TX BUFFER
hal_spi_slave_enable(); // 启动spis
hal_spi_slave_auto_transfer_start(); // 启动rx自动接收
hal_spi_slave_enable(); // 启动spis
hal_spi_slave_auto_transfer_start(); // 启动rx自动接收
#endif
}
@ -418,7 +412,7 @@ static void app_tp_reset_callback(void *data)
**************************************************************************/
static void app_tp_transfer_screen_const(void)
{
// static bool screen_const_transfer_buffer_ready = true; //发送 buffer 是否已准备好
// static bool screen_const_transfer_buffer_ready = true; //发送 buffer 是否已准备好
uint8_t ii;
uint8_t len=0;
/**** 1. 判断当前状态通信已结束, 状态通信已结束,并且开机初始化流程还未走完****/
@ -556,8 +550,8 @@ void app_tp_transfer_screen_int(void)
if (!s_screen_init_complate) //TP 初始化还未完成,则先进行初始化操作
{
app_tp_transfer_screen_const();
// TAU_LOGD("tp screen init"); //debug
return;
}

View File

@ -1,3 +1,8 @@
/////////////////////////////////////////////////////////////////////////////////
WL568_MI10PRO_NT37800_V101_20230801
1、解决部分模组无法点亮问题增加两个版本的时序调整
/////////////////////////////////////////////////////////////////////////////////

View File

@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (C) 2019-2022, 518/568 Systems (R),All Rights Reserved.
* Copyright (C) 2019-2022, CVA Systems (R),All Rights Reserved.
*
* File: board.h
* Description: baord

View File

@ -2,7 +2,7 @@
*
*
* File: tau_common.h
* Description
* Description
* Version V0.1
* Date 2020-09-07
* Author lzy
@ -21,7 +21,7 @@
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/**
* \name
* \name
* @{
*/
//#define ENABLE 1
@ -53,15 +53,15 @@
#define NULL ((void *)0)
#endif
#define TAU_LITTLE_ENDIAN 1234 /**< \brief 小端模式 */
#define TAU_BIG_ENDIAN 3412 /**< \brief 大端模式 */
#define TAU_LITTLE_ENDIAN 1234 /**< \brief 小端模式 */
#define TAU_BIG_ENDIAN 3412 /**< \brief 大端模式 */
/** @} */
/******************************************************************************/
/**
* \name
* \name
* @{
*/
@ -83,11 +83,11 @@
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
/**
* \brief
* \attention
*
* \brief
* \attention
*
*
* \par
* \par
* \code
* struct my_struct {
* int m1;
@ -103,13 +103,13 @@
/** @} */
/**
* \brief
* \brief
*
* \param ptr
* \param type
* \param member
* \param ptr
* \param type
* \param member
*
* \par
* \par
* \code
* struct my_struct = {
* int m1;
@ -124,7 +124,7 @@
((type *)((char *)(ptr)-TAU_OFFSET(type, member)))
/**
* \brief
* \brief
*
* \code
* struct a = {
@ -139,7 +139,7 @@
#define TAU_MEMBER_SIZE(structure, member) (sizeof(((structure *)0)->member))
/**
* \brief
* \brief
*
* \code
* int a[] = {0, 1, 2, 3};
@ -149,10 +149,10 @@
#define TAU_NELEMENTS(array) (sizeof(array) / sizeof((array)[0]))
/**
* \brief
* \brief
*
* \param x
* \param align
* \param x
* \param align
*
* \code
* int size = TAU_ROUND_UP(15, 4); // size = 16
@ -161,10 +161,10 @@
#define TAU_ROUND_UP(x, align) (((int)(x)/(align))*(align) + (((int)(x)%(align)) ? (align) : 0))
/**
* \brief
* \brief
*
* \param x
* \param align
* \param x
* \param align
*
* \code
* int size = TAU_ROUND_DOWN(15, 4); // size = 12
@ -172,33 +172,33 @@
*/
#define TAU_ROUND_DOWN(x, align) (((int)(x)/(align))*(align))
/** \brief 倍数向上舍入 */
/** \brief 倍数向上舍入 */
#define TAU_DIV_ROUND_UP(n, d) (((n) + (d)-1) / (d))
/**
* \brief
* \brief
*
* \param x
* \param align 2
* \param x
* \param align 2
*
* \code
* if (TAU_ALIGNED(x, 4) {
* ; // x对齐
* ; // x对齐
* } else {
* ; // x不对齐
* ; // x不对齐
* }
* \endcode
*/
#define TAU_ALIGNED(x, align) (((int)(x) & (align - 1)) == 0)
/** \brief 将1字节BCD数据转换为16进制数据 */
/** \brief 将1字节BCD数据转换为16进制数据 */
#define TAU_BCD_TO_HEX(val) (((val)&0x0f) + ((val) >> 4) * 10)
/** \brief 将1字节16进制数据转换为BCD数据 */
/** \brief 将1字节16进制数据转换为BCD数据 */
#define TAU_HEX_TO_BCD(val) ((((val) / 10) << 4) + (val) % 10)
/**
* \brief
* \brief
*/
#define TAU_CEIL(val) ceil(val)
@ -210,7 +210,7 @@
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/* \brief 通用回调函数指针定义 */
/* \brief 通用回调函数指针定义 */
typedef void (*fcb_type)(void *data);
#endif /* __TAU_COMMON_H */

View File

@ -18,15 +18,15 @@
#include "stdint.h"
/**
* @brief delay ms ,2%
* @param ms:delay时长
* @brief delay ms ,2%
* @param ms:delay时长
* @retval none
*/
void delayMs(uint32_t ms);
/**
* @brief delay us ,2%
* @param us:delay时长
* @brief delay us ,2%
* @param us:delay时长
* @retval none
*/
void delayUs(uint32_t us);

View File

@ -26,13 +26,13 @@
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*! @brief 计算组状态码 */
/*! @brief 计算组状态码 */
#define MAKE_STATUS(group, code) ((((group)*100) + (code)))
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*! @brief 分组状态值 */
/*! @brief 分组状态值 */
enum _status_groups
{
STATUS_GROUP_GENERIC = 0,
@ -42,7 +42,7 @@ enum _status_groups
kStatusGroup_Timer = 4,
};
/*! @brief 常用状态码 */
/*! @brief 常用状态码 */
enum _generic_status
{
STATUS_SUCCESS = MAKE_STATUS(STATUS_GROUP_GENERIC, 0),
@ -55,17 +55,17 @@ enum _generic_status
};
/*!
* @brief timer状态
* @brief timer状态
*/
typedef enum
{
TIMER_STATUS_IDLE = MAKE_STATUS(kStatusGroup_Timer, 0), /*!< 空闲 */
TIMER_STATUS_RUNNING = MAKE_STATUS(kStatusGroup_Timer, 1), /*!< 运行中 */
TIMER_STATUS_TIMEOUT = MAKE_STATUS(kStatusGroup_Timer, 2), /*!< 超时 */
TIMER_STATUS_IDLE = MAKE_STATUS(kStatusGroup_Timer, 0), /*!< 空闲 */
TIMER_STATUS_RUNNING = MAKE_STATUS(kStatusGroup_Timer, 1), /*!< 运行中 */
TIMER_STATUS_TIMEOUT = MAKE_STATUS(kStatusGroup_Timer, 2), /*!< 超时 */
} timer_status_e;
/*!
* @brief system触发事件(/)
* @brief system触发事件(/)
*/
typedef enum
{
@ -103,7 +103,7 @@ typedef enum
GPIO_INT_MAX
} gpio_int_e;
/*! @brief PWMI中断类型 */
/*! @brief PWMI中断类型 */
typedef enum _pwm_int_type
{
PWM_INT_HIGH_OVERFLOW = 0,
@ -120,12 +120,12 @@ typedef enum _pwm_int_type
*/
typedef enum
{
I2C_SELECT_0 = 0, //常用slave
I2C_SELECT_1, //常用master
I2C_SELECT_0 = 0, //常用slave
I2C_SELECT_1, //常用master
} i2c_select_e;
/*!
* @brief
* @brief
* @note
*/
typedef enum _i2c_rate
@ -154,7 +154,7 @@ typedef enum
DISABLE = 0,
ENABLE = !DISABLE
} function_state_e;
/*!< @brief 用于返回状态和错误 */
/*!< @brief 用于返回状态和错误 */
typedef int32_t status_t;

View File

@ -2,7 +2,7 @@
*
*
* File: tau_dsi_datatype.h
* Description: mipi dsi
* Description: mipi dsi
* Version: V0.1
* Date: 2021-01-13
* Author: lzy
@ -217,9 +217,11 @@ typedef enum
*/
typedef enum
{
TX_VPG_V_COLOR = 0,
TX_VPG_H_COLOR = 1,
TX_VPG_V_BER = 2,
TX_VPG_V_COLOR = 0,
TX_VPG_H_COLOR = 1,
TX_VPG_V_BER = 2,
TX_VPG_FLICKER = 3,
TX_VPG_CHESSBOARD = 4,
TX_VPG_MAX
} dsi_tx_vpg_style_e;
@ -229,10 +231,10 @@ typedef enum
*/
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_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;
@ -248,14 +250,25 @@ typedef enum
} dsi_rx_lane_swap_e;
/**
* @brief transform
* @brief LTPO mode
*/
typedef enum
{
LTPO_MODE_NONE = 0,
LTPO_MODE_1 = 1,
LTPO_MODE_2 = 2,
LTPO_MODE_MAX
} ltpo_mode_e;
/**
* @brief transform
*/
typedef struct
{
bool ltpo; /* ltpo 标志位 */
bool mirror_en; /* 对video 做水平镜像标志位 */
video_rotate_angle_e rot_angle; /* 对video 做旋转的角度 */
dsi_video_data_mode_e dst_mode; /* mipi tx 输出video 数据传输模式(video/cmd mode) */
ltpo_mode_e ltpo; /* ltpo 模式 */
bool mirror_en; /* 对video 做水平镜像标志位 */
video_rotate_angle_e rot_angle; /* 对video 做旋转的角度 */
dsi_video_data_mode_e dst_mode; /* mipi tx 输出video 数据传输模式(video/cmd mode) */
dsi_rx_lane_swap_e rx_lane_swap; /* rx lane swap */
} dsi_base_extra_info_t;
#endif
@ -263,7 +276,7 @@ typedef struct
/**
* @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不变
* lane0 CLK P跟N交换lane不变
*/
typedef enum
{
@ -283,28 +296,29 @@ typedef enum
ERR_HANDLE_L1 = 1,
ERR_HANDLE_L2 = 2,
ERR_HANDLE_L3 = 3,
ERR_HANDLE_L4 = 4,
ERR_HANDLE_MAX
} hal_err_handle_level_e;
/**
* @brief transform
* @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) */
uint16_t pn_swap; /* mipi rx P/N swap标志位 */
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) */
uint16_t pn_swap; /* mipi rx P/N swap标志位 */
#if defined(ISP_568) || defined(ISP_368)
dsi_base_extra_info_t extra_info; /* ISP_568/ISP_368 新增功能配置 */
dsi_base_extra_info_t extra_info; /* ISP_568/ISP_368 新增功能配置 */
#endif
} dsi_base_trans_info_t;
/**
* @brief ccm系数
* @brief ccm系数
*/
typedef struct
{
@ -335,14 +349,27 @@ typedef struct
} vid_disp_timing_t;
/**
* @brief dpi极性配置
* @brief dpi极性配置
*/
typedef struct
{
dpi_polarity_e vsync_active_level; //vsync极性
dpi_polarity_e hsync_active_level; //hsync极性
dpi_polarity_e dataen_active_level; //dataen极性
dpi_polarity_e shutdown_active_level; //shutdown极性
dpi_polarity_e colorm_active_level; //colorm极性
dpi_polarity_e vsync_active_level; //vsync极性
dpi_polarity_e hsync_active_level; //hsync极性
dpi_polarity_e dataen_active_level; //dataen极性
dpi_polarity_e shutdown_active_level; //shutdown极性
dpi_polarity_e colorm_active_level; //colorm极性
} dpi_polarity_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;
#endif //__MIPI_DSI_COMMON_H__

View File

@ -18,7 +18,9 @@
#include <string.h>
#include <stdarg.h>
#include "ArmCM0.h"
#if LOG_MODE_RTT
#include "SEGGER_RTT.h"
#endif
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
@ -27,7 +29,7 @@
#undef LOG_TAG
#endif
#define LOG_TAG "tau_log"
#define LOG_CURREN_LEVEL kLOG_LEVEL_DBG /* 配置打印等级 TODO:每个模块可配置打印等级 */
#define LOG_CURREN_LEVEL kLOG_LEVEL_DBG /* 配置打印等级 TODO:每个模块可配置打印等级 */
/*
* Using the following three macros for conveniently logging.
@ -37,6 +39,29 @@
#define TAU_LOGI(format,...)
#define TAU_LOGE(format,...)
#else
#if LOG_MODE_RTT
#define TAU_LOGD(format,...) \
do { \
if (LOG_CURREN_LEVEL <= kLOG_LEVEL_DBG) { \
SEGGER_RTT_printf(0,"[%s] (%04d) " format, LOG_TAG, __LINE__, ##__VA_ARGS__); \
}; \
} while (0)
#define TAU_LOGI(format,...) \
do { \
if (LOG_CURREN_LEVEL <= kLOG_LEVEL_INF) { \
SEGGER_RTT_printf(0,"[%s] (%04d) " format, LOG_TAG, __LINE__, ##__VA_ARGS__); \
}; \
} while (0)
#define TAU_LOGE(format,...) \
do { \
if (LOG_CURREN_LEVEL <= kLOG_LEVEL_ERR) { \
SEGGER_RTT_printf(0,"error [%s] (%04d) " format, LOG_TAG, __LINE__, ##__VA_ARGS__); \
}; \
} while (0)
#else
#define TAU_LOGD(format,...) \
do { \
if (LOG_CURREN_LEVEL <= kLOG_LEVEL_DBG) { \
@ -59,7 +84,7 @@
}; \
} while (0)
#endif
#endif
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
@ -68,7 +93,7 @@ typedef enum
kLOG_LEVEL_DBG = 0,
kLOG_LEVEL_INF,
kLOG_LEVEL_ERR,
kLOG_LEVEL_NONE /* 不打印任何参数 */
kLOG_LEVEL_NONE /* 不打印任何参数 */
} log_level_t;
/*******************************************************************************

Binary file not shown.

Binary file not shown.

View File

@ -125,6 +125,8 @@ typedef enum IRQn
#define EXTERN_24M 0
#define CPU_CLK_100M 0
#define LOG_MODE_RTT 0 /* 0:UART MODE 1: rtt MODE */
#include "core_cm0.h" /* Processor and core peripherals */
#include "system_ARMCM0.h" /* System Header */

View File

@ -69,10 +69,17 @@ typedef struct hal_dsi_rx_ctrl_handle_t
hal_dsi_rx_ctrl_pps_entry pps_update_entry; /* PPS Update 时回调函数,用于分辨率切换更新PPS,为NULL时内部处理 */
bool used; /* handle使用标志位 */
uint8_t pq_marginal; /* picture quality,参数为hal_rx_pq_marginal_type_e */
bool direct_mode; /* video mode 直通模式,预留,仅debug使用 */
bool direct_mode; /* video mode 直通模式,支持60hz同帧率且porch相等或者相近时使用 */
hal_dsi_rx_ctrl_dbg_entry rx_debug_cb; /* rx debug 回调函数,目前为收到frame start之后回调预留其他debug功能 */
hal_err_handle_level_e err_handler_level; /* RX接收错误的时候对模块做reset等级, 等级越高reset模块越多 */
bool draw_mode; /* 画点模式,仅debug使用 */
#if defined(ISP_568) || defined(ISP_368)
uint8_t rx_strength; /* 用于调节RX信号强度仅适用于开启内阻校准模式档位0~7默认3 */
hight_performan_mode_e hight_performan_mode; /* 高性能模式等级,参考hight_performan_mode_e */
bool pu_optimize; /* 用于优化PU显示效果默认为false;true:优化PU显示显示效果,高功耗;false:普通PU模式,低功耗 */
#endif
bool video_auto_sync; /* Video mode 自动同步开关 */
uint8_t rx_debug_status; /* rx debug status用于debug表示rx的状态 */
} hal_dsi_rx_ctrl_handle_t;
/**
@ -456,6 +463,23 @@ bool hal_dsi_rx_ctrl_toggle_input_frame_rate(hal_dsi_rx_ctrl_handle_t *rx_ctrl_h
*/
bool hal_dsi_rx_ctrl_set_tear_mode_ex(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, uint32_t line_num, te_mode_e te_mode);
/**
* @brief
* @param rx_ctrl_handle: dsi rx handle
* @retval true/false
*/
bool hal_dsi_rx_ctrl_toggle_resolution_ex(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle);
/*
* @brief ,.
hal_dsi_rx_ctrl_set_auto_hw_filter关闭hw filter用于获取所有软件CMD
* @param rx_ctrl_handle: dsi rx handle
* @param
* @retval none
*/
void hal_dsi_rx_ctrl_register_write_cmd_entry(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, hal_dsi_rx_ctrl_dcs_execute execute_func);
#if !defined(ISP_568) && !defined(ISP_368)
/* ISP_518/ISP_308 接口 */
/**
@ -528,6 +552,18 @@ bool hal_dsi_rx_ctrl_set_tear_mode_ex(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle,
* @retval none
*/
void hal_dsi_rx_ctrl_set_pixel_data(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, int x, int y, uint8_t red_data, uint8_t green_data, uint8_t blue_data);
/*
* @brief
* @param rx_ctrl_handle: dsi rx handle
* @param x1,y1:
* @param x2,y2:
* @param red_data: R分量
* @param green_data: G分量
* @param blue_data: B分量
* @retval none
*/
void hal_dsi_rx_ctrl_set_rect_pixel_data(hal_dsi_rx_ctrl_handle_t *rx_ctrl_handle, int x1, int x2, int y1, int y2, uint8_t red_data, uint8_t green_data, uint8_t blue_data);
#endif
#endif //__HAL_DSI_RX_CTRL_H__

View File

@ -27,30 +27,34 @@
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/**
* @brief MIPI TX参数结构体
*/
typedef struct
{
bool used; /* handle使用标志位 */
uint8_t lane_num;
dsi_virtual_channel_e channel_id;
dsi_video_mode_type_e vid_mode;
dsi_tx_cmd_tx_type_e cmd_tx_type; /* 初始化模式传输命令方式0:HS; 1:LP */
uint8_t pclk_offset; /* 增加lane byte clk以增大HFP适配LONG H的TP */
uint32_t dpi_vsa;
uint32_t dpi_vbp;
uint32_t dpi_vfp;
uint32_t dpi_hsa;
uint32_t dpi_hbp;
uint32_t dpi_hfp;
dsi_base_trans_info_t base_info; /* mipi video 转换基本信息 */
uint32_t tx_line_delay; /* tx 发送至屏端显示的延迟行数,由屏端决定,用于分辨率切换时确认切换时间点 */
float tx_frame_rate; /* 默认60Hz输出,不建议配置为其他,仅作为debug使用 */
bool tx_clkawayshs; /* 默认为false, 配置为true时video mode消隐行期间clk不进入LP */
uint8_t blank_rows; /* 默认为0, 针对特殊屏使用大于0时生效表示向下补黑blank_rows行 */
uint8_t blank_columns; /* 默认为0, 针对特殊屏使用大于0时生效表示向右补黑blank_columns列 */
bool lp_exit_lpdt; /* 每一条LP CMD都退出LPDT */
bool used; /* handle使用标志位 */
uint8_t lane_num;
dsi_virtual_channel_e channel_id;
dsi_video_mode_type_e vid_mode;
dsi_tx_cmd_tx_type_e cmd_tx_type; /* 初始化模式传输命令方式0:HS; 1:LP */
uint8_t pclk_offset; /* 增加lane byte clk以增大HFP适配LONG H的TP */
uint32_t dpi_vsa;
uint32_t dpi_vbp;
uint32_t dpi_vfp;
uint32_t dpi_hsa;
uint32_t dpi_hbp;
uint32_t dpi_hfp;
dsi_base_trans_info_t base_info; /* mipi video 转换基本信息 */
uint32_t tx_line_delay; /* tx 发送至屏端显示的延迟行数,由屏端决定,用于分辨率切换时确认切换时间点 */
float tx_frame_rate; /* 默认60Hz输出,不建议配置为其他,仅作为debug使用 */
bool tx_clkawayshs; /* 默认为false, 配置为true时video mode消隐行期间clk不进入LP */
uint8_t blank_rows; /* 默认为0, 针对特殊屏使用大于0时生效表示向下补黑blank_rows行 */
uint8_t blank_columns; /* 默认为0, 针对特殊屏使用大于0时生效表示向右补黑blank_columns列 */
bool lp_exit_lpdt; /* 每一条LP CMD都退出LPDT */
#if defined(ISP_568) || defined(ISP_368)
bool tx_cmd_mode_sync; /* TX command mode 输出同步 */
#endif
} hal_dsi_tx_ctrl_handle_t;
/**
@ -137,9 +141,9 @@ void hal_dsi_tx_ctrl_read_cmd(uint8_t data_type, uint8_t vc, uint8_t cmd, uint8_
* @param vc: dsi_virtual_channel_e
* @param cmd_count:
* @param ...:
* @retval
* @retval true-command发送正常false-TX当前状态不能发送command
*/
void hal_dsi_tx_ctrl_write_cmd(uint8_t data_type, uint8_t vc, uint8_t cmd_count, ...);
bool hal_dsi_tx_ctrl_write_cmd(uint8_t data_type, uint8_t vc, uint8_t cmd_count, ...);
/**
* @brief MIPI TX发送命令
@ -147,9 +151,9 @@ void hal_dsi_tx_ctrl_write_cmd(uint8_t data_type, uint8_t vc, uint8_t cmd_count,
* @param vc: dsi_virtual_channel_e
* @param size: data个数
* @param data: data数组
* @retval
* @retval true-command发送正常false-TX当前状态不能发送command
*/
void hal_dsi_tx_ctrl_write_array_cmd(uint8_t data_type, uint8_t vc, uint8_t size, const uint8_t *data);
bool hal_dsi_tx_ctrl_write_array_cmd(uint8_t data_type, uint8_t vc, uint8_t size, const uint8_t *data);
/**
* @brief TX溢出时钟分频系统
@ -270,6 +274,13 @@ void hal_dsi_tx_crop_pic(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle, hal_dsi_tx_cr
* @retval true/false
*/
bool hal_dsi_tx_ctrl_set_cus_pq_filter(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle, uint32_t filter[32]);
/**
* @brief TX command mode ,TE信号后调用
* @param tx_ctrl_handle: dsi tx handle
* @retval true/false
*/
bool hal_dsi_tx_ctrl_cmd_mode_rcv_te(hal_dsi_tx_ctrl_handle_t *tx_ctrl_handle);
#endif
#endif //__HAL_DSI_TX_CTRL_H__

109
src/sdk/include/hal_flash.h Normal file
View File

@ -0,0 +1,109 @@
/*******************************************************************************
*
*
* File: hal_system.h
* Description hal
* Version V0.1
* Date 2023-03-03
* Author kevin
*******************************************************************************/
#ifndef __HAL_FLASH_H__
#define __HAL_FLASH_H__
/*******************************************************************************
* 1.Included files
*******************************************************************************/
#include "tau_common.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
*******************************************************************************/
/**
* @brief flash ,使flash模块后需要deinit用于节省功耗
* @param
* @retval bool
*/
void hal_flash_init(void);
/**
* @brief flash
* @param
* @retval bool
*/
void hal_flash_deinit(void);
/**
* @brief flash ctl读取flash-uid操作
* @param UID[16] UID的数组,UID最大长度为16
* @param UID (16)
* @retval
*/
void hal_flash_read_uid(uint8_t *UID, uint8_t size);
/**
* @brief
* @param flash_block:0-13block进行擦除,block写之前需要先擦除对应64K数据
* @retval
*/
bool hal_flash_erase(uint8_t flash_block);
/**
* @brief flash读取数据,1024
* @param *usr_cfg_t_addr(),
usr_cfg_t_size(1024,1024)
flash_block:block(0-13,0-3TDDI Flash区域)
flash_page :(block 0~63)
page_offset_addr:block = 64K
* @retval bool
*/
bool hal_flash_normal_read(uint8_t *usr_cfg_t_addr,
uint16_t usr_cfg_t_size,
uint8_t flash_block,
uint16_t flash_page,
uint16_t page_offset_addr);
/**
* @brief flash(),1024
:block前确认使用hal_flash_erase进行擦除整个blocK,block的0-63page进行写入
* @param *usr_cfg_t_addr(),
usr_cfg_t_size(1024,1024)
flash_block:block(0-13,0-3TDDI Flash区域)
flash_page block 0~63
page_offset_addr:0-1023 byte
* @retval bool size是否超出
*/
bool hal_flash_normal_write(uint8_t *usr_cfg_t_addr,
uint16_t usr_cfg_t_size,
uint8_t flash_block,
uint16_t flash_page,
uint16_t page_offset_addr);
/**
* @brief 0xABflash退出deep sleep power mode
* @param none
* @retval null
*/
void hal_flash_release_power_down(void);
/**
* @brief 0xB9flash进入deep sleep power mode
* @param none
* @retval null
*/
void hal_flash_power_down(void);
#endif //__HAL_FLASH_H__

View File

@ -2,10 +2,10 @@
*
*
* File: hal_gpio.h
* Description gpio HAL层头文件
* Version V0.1
* Date 2021-03-17
* Author wuc
* Description gpio HAL层头文件
* Version V0.1
* Date 2021-03-17
* Author wuc
*******************************************************************************/
#ifndef __HAL_GPIO_H__
#define __HAL_GPIO_H__
@ -24,7 +24,7 @@
*/
typedef enum
{
/*以GPIO命名PIN*/
/*以GPIO命名PIN*/
IO_PAD_GPIO0 = 0,
IO_PAD_GPIO1,
IO_PAD_GPIO2,
@ -48,7 +48,7 @@ typedef enum
IO_PAD_GPIO20,
IO_PAD_GPIO21,
/*以实际PAD NAME命名PIN*/
/*以实际PAD NAME命名PIN*/
IO_PAD_AP_SPIS_MISO = IO_PAD_GPIO0,
IO_PAD_AP_SPIS_MOSI = IO_PAD_GPIO1,
IO_PAD_AP_INT = IO_PAD_GPIO2,
@ -81,7 +81,7 @@ typedef enum
IO_PAD_MAX,
/*以实际BALL编号命名PIN*/
/*以实际BALL编号命名PIN*/
IO_PIN_A1 = IO_PAD_TD_TPRSTN,
IO_PIN_A2 = IO_PAD_TD_FC_CSN,
IO_PIN_A3 = IO_PAD_TD_SPIM_MISO,
@ -109,7 +109,7 @@ typedef enum
} io_pad_e;
/**
* @brief PAD_AP_SPIS_CLK可选的mode
* @brief PAD_AP_SPIS_CLK可选的mode
*/
typedef enum
{
@ -119,7 +119,7 @@ typedef enum
} pad_ap_spis_clk_mode_e;
/**
* @brief PAD_AP_SPIS_CSN可选的mode
* @brief PAD_AP_SPIS_CSN可选的mode
*/
typedef enum
{
@ -129,7 +129,7 @@ typedef enum
} pad_ap_spis_csn_mode_e;
/**
* @brief PAD_AP_SPIS_MISO可选的mode
* @brief PAD_AP_SPIS_MISO可选的mode
*/
typedef enum
{
@ -141,7 +141,7 @@ typedef enum
} pad_ap_spis_miso_mode_e;
/**
* @brief PAD_AP_SPIS_MOSI可选的mode
* @brief PAD_AP_SPIS_MOSI可选的mode
*/
typedef enum
{
@ -153,7 +153,7 @@ typedef enum
} pad_ap_spis_mosi_mode_e;
/**
* @brief PAD_AP_TPRSTN可选的mode
* @brief PAD_AP_TPRSTN可选的mode
*/
typedef enum
{
@ -162,7 +162,7 @@ typedef enum
} pad_ap_tprstn_mode_e;
/**
* @brief PAD_AP_INT可选的mode
* @brief PAD_AP_INT可选的mode
*/
typedef enum
{
@ -170,7 +170,7 @@ typedef enum
} pad_ap_int_mode_e;
/**
* @brief PAD_AP_TE可选的mode
* @brief PAD_AP_TE可选的mode
*/
typedef enum
{
@ -179,7 +179,7 @@ typedef enum
} pad_ap_te_mode_e;
/**
* @brief PAD_AP_SWIRE可选的mode
* @brief PAD_AP_SWIRE可选的mode
*/
typedef enum
{
@ -189,7 +189,7 @@ typedef enum
} pad_ap_swire_mode_e;
/**
* @brief PAD_TD_SPIM_CLK可选的mode
* @brief PAD_TD_SPIM_CLK可选的mode
*/
typedef enum
{
@ -198,7 +198,7 @@ typedef enum
} pad_td_spim_clk_mode_e;
/**
* @brief PAD_TD_SPIM_CSN可选的mode
* @brief PAD_TD_SPIM_CSN可选的mode
*/
typedef enum
{
@ -207,7 +207,7 @@ typedef enum
} pad_td_spim_csn_mode_e;
/**
* @brief PAD_TD_SPIM_MISO可选的mode
* @brief PAD_TD_SPIM_MISO可选的mode
*/
typedef enum
{
@ -219,7 +219,7 @@ typedef enum
} pad_td_spim_miso_mode_e;
/**
* @brief PAD_TD_SPIM_MOSI可选的mode
* @brief PAD_TD_SPIM_MOSI可选的mode
*/
typedef enum
{
@ -228,7 +228,7 @@ typedef enum
} pad_td_spim_mosi_mode_e;
/**
* @brief PAD_TD_TPRSTN可选的mode
* @brief PAD_TD_TPRSTN可选的mode
*/
typedef enum
{
@ -236,7 +236,7 @@ typedef enum
} pad_td_tprstn_mode_e;
/**
* @brief PAD_TD_INT可选的mode
* @brief PAD_TD_INT可选的mode
*/
typedef enum
{
@ -245,7 +245,7 @@ typedef enum
} pad_td_int_mode_e;
/**
* @brief PAD_TD_LEDPWM可选的mode
* @brief PAD_TD_LEDPWM可选的mode
*/
typedef enum
{
@ -257,7 +257,7 @@ typedef enum
} pad_td_ledpwm_mode_e;
/**
* @brief PAD_TD_FC_CLK可选的mode
* @brief PAD_TD_FC_CLK可选的mode
*/
typedef enum
{
@ -266,7 +266,7 @@ typedef enum
} pad_td_fc_clk_mode_e;
/**
* @brief PAD_TD_FC_CSN可选的mode
* @brief PAD_TD_FC_CSN可选的mode
*/
typedef enum
{
@ -275,7 +275,7 @@ typedef enum
} pad_td_fc_csn_mode_e;
/**
* @brief PAD_TD_FC_MISO可选的mode
* @brief PAD_TD_FC_MISO可选的mode
*/
typedef enum
{
@ -284,7 +284,7 @@ typedef enum
} pad_td_fc_miso_mode_e;
/**
* @brief PAD_TD_FC_MOSI可选的mode
* @brief PAD_TD_FC_MOSI可选的mode
*/
typedef enum
{
@ -293,7 +293,7 @@ typedef enum
} pad_td_fc_mosi_mode_e;
/**
* @brief PAD_UART_RX可选的mode
* @brief PAD_UART_RX可选的mode
*/
typedef enum
{
@ -302,7 +302,7 @@ typedef enum
} pad_uart_rx_mode_e;
/**
* @brief PAD_UART_TX可选的mode
* @brief PAD_UART_TX可选的mode
*/
typedef enum
{
@ -311,7 +311,7 @@ typedef enum
} pad_uart_tx_mode_e;
/**
* @brief PAD_PWMEN可选的mode
* @brief PAD_PWMEN可选的mode
*/
typedef enum
{
@ -319,7 +319,7 @@ typedef enum
} pad_pwmen_mode_e;
/**
* @brief PAD_ADCIN可选的mode
* @brief PAD_ADCIN可选的mode
*/
typedef enum
{
@ -327,7 +327,7 @@ typedef enum
} pad_adcin_mode_e;
/**
* @brief PAD_SFC_CLK可选的mode
* @brief PAD_SFC_CLK可选的mode
*/
typedef enum
{
@ -336,7 +336,7 @@ typedef enum
} pad_sfc_clk_mode_e;
/**
* @brief PAD_SFC_CSN可选的mode
* @brief PAD_SFC_CSN可选的mode
*/
typedef enum
{
@ -345,7 +345,7 @@ typedef enum
} pad_sfc_csn_mode_e;
/**
* @brief PAD_SFC_IO0可选的mode
* @brief PAD_SFC_IO0可选的mode
*/
typedef enum
{
@ -354,7 +354,7 @@ typedef enum
} pad_sfc_io0_mode_e;
/**
* @brief PAD_SFC_IO1可选的mode
* @brief PAD_SFC_IO1可选的mode
*/
typedef enum
{
@ -363,7 +363,7 @@ typedef enum
} pad_sfc_io1_mode_e;
/**
* @brief PAD电压转换速率
* @brief PAD电压转换速率
*/
typedef enum
{
@ -375,7 +375,7 @@ typedef enum
* IOE
*******************************************************************************/
/**
* @brief GPIO io方向
* @brief GPIO io方向
*/
typedef enum
{
@ -404,133 +404,133 @@ typedef enum
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief PAD为GPIO modeinput
* @param padGPIO序号gpio_pad_e
* @param trig4sys_cfg_trigger_e
* @retval
* @brief PAD为GPIO modeinput
* @param padGPIO序号gpio_pad_e
* @param trig4sys_cfg_trigger_e
* @retval
*/
void hal_gpio_init_eint(io_pad_e pad, sys_cfg_trigger_e trig);
/**
* @brief GPIO中断回调函数
* @param padGPIO序号gpio_pad_e
* @param cb_func
* @param data
* @retval
* @brief GPIO中断回调函数
* @param padGPIO序号gpio_pad_e
* @param cb_func
* @param data
* @retval
*/
void hal_gpio_reg_eint_cb(io_pad_e pad, fcb_type cb_func);
/**
* @brief GPIO中断
* @param padGPIO序号gpio_pad_e
* @param state
* @retval
* @brief GPIO中断
* @param padGPIO序号gpio_pad_e
* @param state
* @retval
*/
void hal_gpio_ctrl_eint(io_pad_e pad, function_state_e state);
/**
* @brief GPIO中断类型
* @param padGPIO序号gpio_pad_e
* @retval
* @brief GPIO中断类型
* @param padGPIO序号gpio_pad_e
* @retval
*/
gpio_int_e hal_gpio_get_int_type(io_pad_e pad);
/**
* @brief PAD为GPIO modeoutput
* @param padGPIO序号gpio_pad_e
* @param lvlgpio_level_e
* @retval
* @brief PAD为GPIO modeoutput
* @param padGPIO序号gpio_pad_e
* @param lvlgpio_level_e
* @retval
*/
void hal_gpio_init_output(io_pad_e pad, gpio_level_e lvl);
/**
* @brief
* @param padGPIO序号gpio_pad_e
* @param lvlgpio_level_e
* @retval
* @brief
* @param padGPIO序号gpio_pad_e
* @param lvlgpio_level_e
* @retval
*/
void hal_gpio_set_output_data(io_pad_e pad, gpio_level_e lvl);
/**
* @brief IO输出电平
* @param pad1GPIO序号gpio_pad_e
* @param pad1_lvlgpio_level_e
* @param pad2GPIO序号gpio_pad_e
* @param pad2_lvlgpio_level_e
* @retval
* @brief IO输出电平
* @param pad1GPIO序号gpio_pad_e
* @param pad1_lvlgpio_level_e
* @param pad2GPIO序号gpio_pad_e
* @param pad2_lvlgpio_level_e
* @retval
*/
void hal_gpio_set_output_data_ex(io_pad_e pad1, gpio_level_e pad1_lvl, io_pad_e pad2, gpio_level_e pad2_lvl);
/**
* @brief PAD为GPIO modeinput
* @param padGPIO序号gpio_pad_e
* @retval
* @brief PAD为GPIO modeinput
* @param padGPIO序号gpio_pad_e
* @retval
*/
void hal_gpio_init_input(io_pad_e pad);
/**
* @brief
* @param padGPIO序号gpio_pad_e
* @retval
* @brief
* @param padGPIO序号gpio_pad_e
* @retval
*/
gpio_level_e hal_gpio_get_input_data(io_pad_e pad);
/**
* @brief io mode
* @param padGPIO序号gpio_pad_e
* @param modePAD对应的mode枚举类型
* @retval
* @brief io mode
* @param padGPIO序号gpio_pad_e
* @param modePAD对应的mode枚举类型
* @retval
*/
void hal_gpio_set_mode(io_pad_e pad, uint8_t mode);
/**
* @brief PAD的默认上拉
* @param padGPIO序号gpio_pad_e
* @param up_enable
* @param down_enable
* @retval
* @brief PAD的默认上拉
* @param padGPIO序号gpio_pad_e
* @param up_enable
* @param down_enable
* @retval
*/
void hal_gpio_get_pull_state(io_pad_e pad, function_state_e *up_enable, function_state_e *down_enable);
/**
* @brief PAD的默认上拉
* @param padGPIO序号gpio_pad_e
* @param up_enable
* @param down_enable
* @retval
* @brief PAD的默认上拉
* @param padGPIO序号gpio_pad_e
* @param up_enable
* @param down_enable
* @retval
*/
void hal_gpio_set_pull_state(io_pad_e pad, function_state_e up_enable, function_state_e down_enable);
/**
* @brief PAD是否为施密特触发
* @param padGPIO序号gpio_pad_e
* @param st_enable10
* @retval
* @brief PAD是否为施密特触发
* @param padGPIO序号gpio_pad_e
* @param st_enable10
* @retval
*/
void hal_gpio_set_schmitt_trigger(io_pad_e pad, function_state_e st_enable);
/**
* @brief PAD的驱动能力
* @param padGPIO序号gpio_pad_e
* @param strength0~3
* @retval
* @brief PAD的驱动能力
* @param padGPIO序号gpio_pad_e
* @param strength0~3
* @retval
*/
void hal_gpio_set_driving_strength(io_pad_e pad, uint8_t strength);
/**
* @brief PAD的电压转换速率
* @param padGPIO序号gpio_pad_e
* @param rate0~3
* @retval
* @brief PAD的电压转换速率
* @param padGPIO序号gpio_pad_e
* @param rate0~3
* @retval
*/
void hal_gpio_set_slew_rate(io_pad_e pad, pad_slew_rate_e rate);
/**
* @brief AP_RSTN引脚中断
* @param enable:
* @param cb_func
* @param trig
* @retval
* @brief AP_RSTN引脚中断
* @param enable:
* @param cb_func
* @param trig
* @retval
*/
void hal_gpio_set_ap_reset_int(bool enable, fcb_type cb_func, sys_cfg_trigger_e trig);

View File

@ -17,10 +17,10 @@
/**************************************************************************
* @name : hal_i2c_m_dma_init
* @brief : i2c master dma
* @param[in] : slave_addr
* @param[in] : addr_bits
* @param[in] : i2c_speed_hz:
* @brief : i2c master dma
* @param[in] : slave_addr
* @param[in] : addr_bits
* @param[in] : i2c_speed_hz:
* @return :
* @retval :
**************************************************************************/
@ -28,46 +28,53 @@ void hal_i2c_m_dma_init(uint8_t slave_addr, uint8_t addr_bits, uint32_t i2c_spee
/**************************************************************************
* @name : hal_i2c_m_dma_write
* @brief : i2c master dma
* @param[in] : txBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESS DMA
* @return :
* @brief : i2c master dma
* @param[in] : txBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESS DMA
* @return :
* @retval :
**************************************************************************/
status_t hal_i2c_m_dma_write(const uint8_t *txBuffer, size_t data_size);
/**************************************************************************
* @name : hal_i2c_m_dma_read
* @brief : i2c master dma
* @param[in] : reg_address
* @param[in] : reg_size
* @param[in] : rxBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESSDMA接收通道
* @return :
* @brief : i2c master dma
* @param[in] : reg_address
* @param[in] : reg_size
* @param[in] : rxBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESSDMA接收通道
* @return :
* @retval :
**************************************************************************/
status_t hal_i2c_m_dma_read(uint32_t reg_address, size_t reg_size, uint8_t *rxBuffer, size_t data_size);
/**************************************************************************
* @name : hal_i2c_m_transfer_complate
* @brief : i2c master
* @brief : i2c master
* @param[in] :
* @return : true
* @return : false
* @return : true
* @return : false
* @retval :
**************************************************************************/
bool hal_i2c_m_transfer_complate(void);
/**************************************************************************
* @name : hal_i2c_m_set_high_impedance
* @brief : I2C IO口设置为高阻态
* @brief : I2C IO口设置为高阻态
* @param[in] :
* @return :
* @retval :
**************************************************************************/
void hal_i2c_m_set_high_impedance(void);
/**************************************************************************
* @name : hal_i2c_m_deinit
* @brief : i2c主机 IP去初始化使
* @param[in] :
* @return :
* @retval :
***************************************************************************/
void hal_i2c_m_deinit(void);
#endif /* __HAL_I2C_MASTER_H__*/

View File

@ -17,18 +17,27 @@
typedef enum
{
I2C_S_INT_READ = 0, //发生 读请求 中断
I2C_S_INT_RX, //发生 接收 中断
I2C_S_INT_STOP //发生 stop 中断
I2C_S_INT_READ = 0, //发生 读请求 中断
I2C_S_INT_RX, //发生 接收 中断
I2C_S_INT_STOP //发生 stop 中断
} e_i2c_s_int_status;
#if defined(ISP_568) || defined(ISP_368)
typedef enum
{
I2C_S_0 = 0,
I2C_S_1,
I2C_S_MAX
} i2c_s_index_e;
#endif
typedef void (*hal_i2c_s_callback_t)(e_i2c_s_int_status int_status, size_t receive_num);
/**************************************************************************
* @name : hal_i2c_s_init
* @brief : i2c slave
* @param[in] : slave_addr
* @param[in] : addr_bits
* @brief : i2c slave
* @param[in] : slave_addr
* @param[in] : addr_bits
* @return :
* @retval :
**************************************************************************/
@ -36,48 +45,48 @@ void hal_i2c_s_init(uint8_t slave_addr, uint8_t addr_bits);
/**************************************************************************
* @name : hal_i2c_s_dma_write
* @brief : i2c slave dma
* @param[in] : txBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESS DMA
* @return :
* @brief : i2c slave dma
* @param[in] : txBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESS DMA
* @return :
* @retval :
**************************************************************************/
status_t hal_i2c_s_dma_write(const uint8_t *txBuffer, size_t data_size);
/**************************************************************************
* @name : hal_i2c_s_nonblocking_read
* @brief : i2c slave
* @param[in] : rxBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESS
* @return :
* @brief : i2c slave
* @param[in] : rxBufferbuffer
* @param[in] : data_size
* @return : STATUS_SUCCESS
* @return :
* @retval :
**************************************************************************/
status_t hal_i2c_s_nonblocking_read(uint8_t *rxBuffer, size_t data_size);
/**************************************************************************
* @name : hal_i2c_s_transfer_complate
* @brief : i2c slave
* @brief : i2c slave
* @param[in] :
* @return : true
* @return : false
* @return : true
* @return : false
* @retval :
**************************************************************************/
bool hal_i2c_s_write_complate(void);
/**************************************************************************
* @name : hal_i2c_s_read_complate
* @brief : i2c slave
* @brief : i2c slave
* @param[in] :
* @return :
* @return :
* @retval :
**************************************************************************/
uint8_t hal_i2c_s_read_complate(void);
/**************************************************************************
* @name : hal_i2c_s_read_complate_clear
* @brief : i2c slave
* @brief : i2c slave
* @param[in] :
* @return :
* @retval :
@ -86,17 +95,17 @@ void hal_i2c_s_read_complate_clear(void);
/**************************************************************************
* @name : hal_i2c_s_set_dma_tx_cycle
* @brief : I2C cycle
* @brief : I2C cycle
* @param[in] :
* @return : ENABLEcycle模式DISABLEcycle模式
* @return : ENABLEcycle模式DISABLEcycle模式
* @retval :
**************************************************************************/
void hal_i2c_s_set_dma_tx_cycle(bool enable);
/**************************************************************************
* @name : hal_i2c_s_set_transfer
* @brief : i2c
* @param[in] :hal_tp_transfer_phone_tmp
* @brief : i2c
* @param[in] :hal_tp_transfer_phone_tmp
* @return :
* @retval :
**************************************************************************/
@ -105,9 +114,9 @@ void hal_i2c_s_set_transfer(hal_i2c_s_callback_t hal_i2c_s_callback_tmp);
/**************************************************************************
* @name : hal_i2c_s_read_data
* @brief :read data
* @param[in] : rx_data:
* @return : 1:
* @return : 0: fifo
* @param[in] : rx_data:
* @return : 1:
* @return : 0: fifo
* @retval :
**************************************************************************/
status_t hal_i2c_s_read_data(uint8_t *rx_data);
@ -115,38 +124,56 @@ status_t hal_i2c_s_read_data(uint8_t *rx_data);
/**************************************************************************
* @name : hal_i2c_s_write_data
* @brief :write data
* @param[in] : tx_data:
* @return : 1:
* @return : 0: fifo
* @param[in] : tx_data:
* @return : 1:
* @return : 0: fifo
* @retval :
**************************************************************************/
status_t hal_i2c_s_write_data(const uint8_t tx_data);
/**************************************************************************
* @name : hal_i2c_s_rxfifo_notempty
* @brief : rxfifo
* @brief : rxfifo
* @param[in] :
* @return : true: rxfifo
* @return : false: rxfifo
* @return : true: rxfifo
* @return : false: rxfifo
* @retval :
**************************************************************************/
bool hal_i2c_s_rxfifo_notempty(void);
/**************************************************************************
* @name : hal_i2c_s_set_high_impedance
* @brief : I2C IO口设置为高阻态
* @brief : I2C IO口设置为高阻态
* @param[in] :
* @return :
* @retval :
**************************************************************************/
void hal_i2c_s_set_high_impedance(void);
/**************************************************************************
* @name : hal_i2c_s_get_tx_byte_num
* @brief : I2C从机发送成功字节数
* @param[in] :
* @return :
* @retval :
**************************************************************************/
/**************************************************************************
* @name : hal_i2c_s_get_tx_byte_num
* @brief : I2C从机发送成功字节数
* @param[in] :
* @return :
* @retval :
**************************************************************************/
int hal_i2c_s_get_tx_byte_num(void);
/**************************************************************************
* @name : hal_i2c_s_deinit
* @brief : i2c IP去初始化使
* @param[in] :slave_num
* @return :
* @retval :
***************************************************************************/
void hal_i2c_s_deinit(void);
#if defined(ISP_568) || defined(ISP_368)
/**************************************************************************
* @name : hal_i2c_s_sel
* @brief : i2c slave
* @param[in] : slaver
* @return :
* @retval :
**************************************************************************/
void hal_i2c_s_sel(i2c_s_index_e slaver);
#endif
#endif /* __HAL_I2C_SLAVE_H__*/

View File

@ -2,10 +2,10 @@
*
*
* File: hal_pwm.h
* Description pwm HAL层头文件
* Version V0.1
* Date 2021-03-17
* Author wuc
* Description pwm HAL层头文件
* Version V0.1
* Date 2021-03-17
* Author wuc
*******************************************************************************/
#ifndef __HAL_PWM_H__
#define __HAL_PWM_H__
@ -24,7 +24,7 @@
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*! @brief PWM触发功能的定义 */
/*! @brief PWM触发功能的定义 */
typedef enum _pwm_out_ctrl_e
{
PWMO_CTRL_KEEP = 0,
@ -42,167 +42,177 @@ typedef enum _pwm_out_ctrl_e
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief PWMO初始化
* @param
* @retval
* @brief PWMO初始化
* @param
* @retval
*/
void hal_pwm_out_init(void);
/**
* @brief PWMO反初始化
* @param
* @retval
* @brief PWMO反初始化
* @param
* @retval
*/
void hal_pwm_out_deinit(void);
/**
* @brief PWMO输出脉冲暂停
* @param state
* @retval
* @brief PWMO输出脉冲暂停
* @param state
* @retval
*/
void hal_pwm_out_pause(function_state_e state);
/**
* @brief PWMO脉冲并开始输出
* @param ctl0thr0时的操作pwm_out_ctrl_e
* @param ctl1thr1时的操作pwm_out_ctrl_e
* @param thr00us
* @param thr11us
* @param periodus
* @retval
* @brief PWMO脉冲并开始输出
* @param ctl0thr0时的操作pwm_out_ctrl_e
* @param ctl1thr1时的操作pwm_out_ctrl_e
* @param thr00us
* @param thr11us
* @param periodus
* @retval
*/
void hal_pwm_out_config_all(pwm_out_ctrl_e ctl0, pwm_out_ctrl_e ctl1, uint32_t thr0, uint32_t thr1, uint32_t period);
/**
* @brief PWMO脉冲所有参数
* @param ctl0thr0时的操作pwm_out_ctrl_e
* @param ctl1thr1时的操作pwm_out_ctrl_e
* @param thr00us
* @param thr11us
* @param periodus
* @retval
* @brief PWMO脉冲所有参数
* @param ctl0thr0时的操作pwm_out_ctrl_e
* @param ctl1thr1时的操作pwm_out_ctrl_e
* @param thr00us
* @param thr11us
* @param periodus
* @retval
*/
void hal_pwm_out_sync_all(pwm_out_ctrl_e ctl0, pwm_out_ctrl_e ctl1, uint32_t thr0, uint32_t thr1, uint32_t period);
/**
* @brief PWMO脉冲的周期
* @param periodus
* @retval
* @brief pwm输出以控制背光
* @param polarity: false:true:
* @param duty_ratio: (0-total_ratio)
* @param total_ratio:
* @param frequency: HZ
* @retval
*/
void hal_pwm_out_config_duty_ratio(bool polarity, uint16_t duty_ratio, uint16_t total_ratio, uint32_t frequency);
/**
* @brief PWMO脉冲的周期
* @param periodus
* @retval
*/
void hal_pwm_out_sync_period(uint32_t period);
/**
* @brief PWMO脉冲的控制
* @param ctl0thr0时的操作pwm_out_ctrl_e
* @param ctl1thr1时的操作pwm_out_ctrl_e
* @retval
* @brief PWMO脉冲的控制
* @param ctl0thr0时的操作pwm_out_ctrl_e
* @param ctl1thr1时的操作pwm_out_ctrl_e
* @retval
*/
void hal_pwm_out_sync_ctl(pwm_out_ctrl_e ctl0, pwm_out_ctrl_e ctl1);
/**
* @brief PWMO脉冲的阈值
* @param thr00us
* @param thr11us
* @retval
* @brief PWMO脉冲的阈值
* @param thr00us
* @param thr11us
* @retval
*/
void hal_pwm_out_sync_thr(uint32_t thr0, uint32_t thr1);
/**
* @brief PWMO脉冲
* @param pause_state
* @retval
* @brief PWMO脉冲
* @param pause_state
* @retval
*/
void hal_pwm_out_sync_pause(function_state_e pause_state);
/**
* @brief PWMI初始化
* @param
* @retval
* @brief PWMI初始化
* @param
* @retval
*/
void hal_pwm_in_init(void);
/**
* @brief PWMI反初始化
* @param
* @retval
* @brief PWMI反初始化
* @param
* @retval
*/
void hal_pwm_in_deinit(void);
/**
* @brief PWMI中断回调函数PWMI中断类型指针pwm_int_type_e
* @param cb_func
* @retval
* @brief PWMI中断回调函数PWMI中断类型指针pwm_int_type_e
* @param cb_func
* @retval
*/
void hal_pwm_in_register_callback(fcb_type cb_func);
/**
* @brief PWMI所有中断的开关
* @param high_overflow_enhigh overflow中断使能开关
* @param low_overflow_enlow overflow中断使能开关
* @param total_overflow_entotal overflow中断使能开关
* @param high_done_enhigh done中断使能开关
* @param low_done_enlow done中断使能开关
* @param total_done_entotal done中断使能开关
* @retval
* @brief PWMI所有中断的开关
* @param high_overflow_enhigh overflow中断使能开关
* @param low_overflow_enlow overflow中断使能开关
* @param total_overflow_entotal overflow中断使能开关
* @param high_done_enhigh done中断使能开关
* @param low_done_enlow done中断使能开关
* @param total_done_entotal done中断使能开关
* @retval
*/
void hal_pwm_in_config_int(function_state_e high_overflow_en, function_state_e low_overflow_en, function_state_e total_overflow_en,
function_state_e high_done_en, function_state_e low_done_en, function_state_e total_done_en);
/**
* @brief PWMI单个中断的开关
* @param pwm_intpwm_int_type_e
* @param enable
* @retval
* @brief PWMI单个中断的开关
* @param pwm_intpwm_int_type_e
* @param enable
* @retval
*/
void hal_pwm_in_set_int(pwm_int_type_e pwm_int, function_state_e enable);
/**
* @brief PWMI所有中断
* @param
* @retval
* @brief PWMI所有中断
* @param
* @retval
*/
void hal_pwm_in_clear_int(void);
/**
* @brief PWMI中断
* @param state
* @retval
* @brief PWMI中断
* @param state
* @retval
*/
void hal_pwm_in_ctrl_int(function_state_e state);
/**
* @brief PWMI脉冲周期时长
* @param
* @retval us
* @brief PWMI脉冲周期时长
* @param
* @retval us
*/
uint32_t hal_pwm_in_get_total_period(void);
/**
* @brief PWMI脉冲高电平时长
* @param
* @retval us
* @brief PWMI脉冲高电平时长
* @param
* @retval us
*/
uint32_t hal_pwm_in_get_high_period(void);
/**
* @brief PWMI脉冲低电平时长
* @param
* @retval us
* @brief PWMI脉冲低电平时长
* @param
* @retval us
*/
uint32_t hal_pwm_in_get_low_period(void);
/**
* @brief PWMI上升沿累积个数
* @param
* @retval 使沿32
* @brief PWMI上升沿累积个数
* @param
* @retval 使沿32
*/
uint32_t hal_pwm_in_get_current_count(void);
#if defined(ISP_568) || defined(ISP_368)
/**
* @brief PWMO输出的IO口
* @param pad: PWMO输出的IO口,IO_PAD_AP_SWIRE,IO_PAD_TD_SPIM_MISOIO_PAD_TD_LEDPWM输出
* @retval
* @brief PWMO输出的IO口
* @param pad: PWMO输出的IO口,IO_PAD_AP_SWIRE,IO_PAD_TD_SPIM_MISOIO_PAD_TD_LEDPWM输出
* @retval
*/
void hal_pwm_out_sel_io(io_pad_e pad);
#endif

View File

@ -17,10 +17,10 @@
/**************************************************************************
* @name : hal_spi_m_dma_init
* @brief : SPIM DMA
* @param[in] :speed
* @param[in] :cpha: 沿沿
* @param[in] :cpol: 线
* @brief : SPIM DMA
* @param[in] :speed
* @param[in] :cpha: 沿沿
* @param[in] :cpol: 线
* @return :
* @retval :
**************************************************************************/
@ -28,40 +28,40 @@ void hal_spi_m_dma_init(uint32_t speed, uint8_t cpha, uint8_t cpol);
/**************************************************************************
* @name : hal_spi_m_dma_write
* @brief : SPIM
* @param[in] :data_buffer: buffer
* @param[in] :data_size: buffer
* @return :STATUS_SUCCESS:
* @return :
* @brief : SPIM
* @param[in] :data_buffer: buffer
* @param[in] :data_size: buffer
* @return :STATUS_SUCCESS:
* @return :
* @retval :
**************************************************************************/
status_t hal_spi_m_dma_write(const uint8_t *data_buffer, size_t data_size);
/**************************************************************************
* @name : hal_spi_m_dma_read
* @brief : SPIM
* @param[in] :cmd: buffer
* @param[in] :cmd_size: buffer
* @param[in] :data_buffer: buffer
* @param[in] :data_size: buffer
* @return :STATUS_SUCCESS:
* @return :
* @brief : SPIM
* @param[in] :cmd: buffer
* @param[in] :cmd_size: buffer
* @param[in] :data_buffer: buffer
* @param[in] :data_size: buffer
* @return :STATUS_SUCCESS:
* @return :
* @retval :
**************************************************************************/
status_t hal_spi_m_dma_read(const uint8_t *cmd, size_t cmd_size, uint8_t *data_buffer, size_t data_size);
/**************************************************************************
* @name : hal_spi_m_get_transfer_complate
* @brief : SPIM
* @brief : SPIM
* @param[in] :
* @return :true
* @return :true
* @retval :
**************************************************************************/
bool hal_spi_m_get_transfer_complate(void);
/**************************************************************************
* @name : hal_spi_m_clear_rxfifo
* @brief : rxfifo
* @brief : rxfifo
* @param[in] :
* @return :
* @retval :
@ -70,13 +70,20 @@ void hal_spi_m_clear_rxfifo(void);
/**************************************************************************
* @name : hal_spi_m_set_high_impedance
* @brief : SPI IO口设置为高阻态
* @brief : SPI IO口设置为高阻态
* @param[in] :
* @return :
* @retval :
**************************************************************************/
void hal_spi_m_set_high_impedance(void);
/**************************************************************************
* @name : hal_spi_m_deinit
* @brief : SPI (SPIM)
* @param[in] :
* @return :true
* @retval :
**************************************************************************/
bool hal_spi_m_deinit(void);
#endif

View File

@ -24,25 +24,25 @@
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
/*
event eg:rx_buffer_size=8, host发送16个byte数据,
8byte数据时产生SPI_EVENT_RCV_FULL事件,,
host拉高CS,SPI_EVENT_RCV_CS_HIGH事件
event eg:rx_buffer_size=8, host发送16个byte数据,
8byte数据时产生SPI_EVENT_RCV_FULL事件,,
host拉高CS,SPI_EVENT_RCV_CS_HIGH事件
*/
typedef enum
{
SPI_EVENT_RCV_DATA = 0, /* 手动模式下SPIS 接受每接收一个数据即产生事件 */
SPI_EVENT_RCV_FULL, /* 自动模式下 SPIS 接收数据等于buffer size后产生事件 */
SPI_EVENT_RCV_CS_HIGH, /* 自动模式下 SPIS 收到CS 拉高的信号 */
SPI_EVENT_RCV_DATA = 0, /* 手动模式下SPIS 接受每接收一个数据即产生事件 */
SPI_EVENT_RCV_FULL, /* 自动模式下 SPIS 接收数据等于buffer size后产生事件 */
SPI_EVENT_RCV_CS_HIGH, /* 自动模式下 SPIS 收到CS 拉高的信号 */
} hal_spis_event_e;
typedef struct hal_spi_packet_info_t
{
uint8_t *rx_buffer; /* 接收buffer */
uint32_t rx_buffer_size; /* 接收buffer size */
bool rx_circle; /* 接收circle mode */
const uint8_t *tx_buffer; /* 发送buffer */
uint32_t tx_buffer_size; /* 发送buffer size */
bool tx_circle; /* 发送circle mode */
uint8_t *rx_buffer; /* 接收buffer */
uint32_t rx_buffer_size; /* 接收buffer size */
bool rx_circle; /* 接收circle mode */
const uint8_t *tx_buffer; /* 发送buffer */
uint32_t tx_buffer_size; /* 发送buffer size */
bool tx_circle; /* 发送circle mode */
uint32_t packet_size; /* packet size */
} hal_spi_packet_info_t;
@ -56,24 +56,24 @@ typedef void (*hal_spi_slave_cb)(hal_spis_event_e event, hal_spi_packet_info_t *
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief spi slave
* @param cpha:
* @param cpol:
* @param dma: DMA enable
* @brief spi slave
* @param cpha:
* @param cpol:
* @param dma: DMA enable
* @retval true/false
*/
bool hal_spi_slave_init(uint8_t cpha, uint8_t cpol, bool dma);
/**
* @brief spi slave
* @brief spi slave
* @param none
* @retval true/false
*/
bool hal_spi_slave_deinit(void);
/**
* @brief spi slave
* @param cbcall back
* @brief spi slave
* @param cbcall back
* @retval true/false
*/
bool hal_spi_slave_register_callback(hal_spi_slave_cb cb);
@ -93,49 +93,49 @@ bool hal_spi_slave_enable(void);
bool hal_spi_slave_disable(void);
/**
* @brief spi slave buffer, callback, buffer为NULL时为自动接收模式
* @param bufferbuffer
* @param size buffer size
* @param circlecircle modepacket size buffer size offset 0()
* @brief spi slave buffer, callback, buffer为NULL时为自动接收模式
* @param bufferbuffer
* @param size buffer size
* @param circlecircle modepacket size buffer size offset 0()
* @retval true/false
*/
bool hal_spi_slave_set_auto_rx_buffer(uint8_t *buffer, uint32_t size, bool circle);
/**
* @brief spi slave buffer
* @param bufferbuffer, buffer为NULL为切换为自动模式
* @param size buffer size
* @param circlecircle modebuffer的数据
* @brief spi slave buffer
* @param bufferbuffer, buffer为NULL为切换为自动模式
* @param size buffer size
* @param circlecircle modebuffer的数据
* @retval true/false
*/
bool hal_spi_slave_set_auto_tx_buffer(const uint8_t *buffer, uint32_t size, bool circle);
/**
* @brief spi slave
* @brief spi slave
* @param none
* @retval true/false
*/
bool hal_spi_slave_auto_transfer_start(void);
/**
* @brief spi slave (circle mode packet结束可使用)
* @brief spi slave (circle mode packet结束可使用)
* @param none
* @retval true/false
*/
bool hal_spi_slave_auto_transfer_abort(void);
/**
* @brief spi slave flush fifo(circle mode packet结束后可使用)
* @brief spi slave flush fifo(circle mode packet结束后可使用)
* @param none
* @retval true/false
*/
bool hal_spi_slave_flush_fifo(void);
/**
* @brief reset spis tx,spis后重新配置输出数据
* @param bufferbuffer
* @param size buffer size
* @param circlecircle modebuffer的数据
* @brief reset spis tx,spis后重新配置输出数据
* @param bufferbuffer
* @param size buffer size
* @param circlecircle modebuffer的数据
* @retval true/false
*/
bool hal_spi_slave_reset_tx(const uint8_t *buffer, uint32_t size, bool circle);
@ -148,21 +148,21 @@ bool hal_spi_slave_reset_tx(const uint8_t *buffer, uint32_t size, bool circle);
bool hal_spi_slave_busy(void);
/**
* @brief rx fifo
* @brief rx fifo
* @param none
* @retval true/false
*/
bool hal_spi_slave_get_rxfifo_notempty(void);
/**
* @brief rx fifo
* @brief rx fifo
* @param none
* @retval true/false
*/
bool hal_spi_slave_read_data(uint32_t *data);
/**
* @brief tx fifo
* @brief tx fifo
* @param none
* @retval true/false
*/
@ -170,7 +170,7 @@ bool hal_spi_slave_write_data(const uint8_t data);
/**************************************************************************
* @name : hal_spi_s_set_high_impedance
* @brief : SPI IO口设置为高阻态
* @brief : SPI IO口设置为高阻态
* @param[in] :
* @return :
* @retval :

View File

@ -2,10 +2,10 @@
*
*
* File: hal_swire.h
* Description swire HAL层头文件
* Version V0.1
* Date 2021-03-17
* Author wuc
* Description swire HAL层头文件
* Version V0.1
* Date 2021-03-17
* Author wuc
*******************************************************************************/
#ifndef __HAL_SWIRE_H__
#define __HAL_SWIRE_H__
@ -32,43 +32,43 @@
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief SWIRE初始化
* @param
* @retval
* @brief SWIRE初始化
* @param
* @retval
*/
void hal_swire_init(void);
/**
* @brief SWIRE反初始化
* @param
* @retval
* @brief SWIRE反初始化
* @param
* @retval
*/
void hal_swire_deinit(void);
/**
* @brief SWIRE脉冲并开始输出
* @param start_timeus
* @param stop_timeus300us
* @param high_timeus
* @param low_timeus
* @param pulse沿
* @retval
* @brief SWIRE脉冲并开始输出
* @param start_timeus
* @param stop_timeus300us
* @param high_timeus
* @param low_timeus
* @param pulse沿
* @retval
*/
void hal_swire_start(uint32_t start_time, uint32_t stop_time,
uint32_t high_time, uint32_t low_time,
uint32_t pulse);
/**
* @brief
* @param state
* @retval
* @brief
* @param state
* @retval
*/
void hal_swire_open(function_state_e state);
/**
* @brief
* @param cb_func
* @retval
* @brief
* @param cb_func
* @retval
*/
void hal_swire_register_callback(fcb_type cb_func);

View File

@ -13,11 +13,81 @@
* 1.Included files
*******************************************************************************/
#include "tau_common.h"
#include "hal_flash.h"
/*******************************************************************************
* 2.Global constant and macro definitions using #define
*******************************************************************************/
/*******************************************************************************
* API兼容宏定义
*******************************************************************************/
/**
* @brief 0xABflash退出deep sleep power mode
* API为hal_flash_release_power_down
* @param none
* @retval null
*/
#define hal_system_flash_release_power_down()\
{\
hal_flash_init();\
hal_flash_release_power_down();\
hal_flash_deinit();\
}
/**
* @brief 0xB9flash进入deep sleep power mode
* API为hal_system_flash_power_down
* @param
* @retval null
*/
#define hal_system_flash_power_down()\
{\
hal_flash_init();\
hal_flash_power_down();\
hal_flash_deinit();\
}
/**
* @brief flash读取数据,1024
* API为hal_flash_normal_read
* @param *usr_cfg_t_addr(),
usr_cfg_t_size(1024)
flash_page 0~63
* @retval bool
*/
#define hal_system_flash_read(usr_cfg_t_addr, usr_cfg_t_size, flash_page)\
({\
bool ret;\
hal_flash_init();\
ret = hal_flash_normal_read(usr_cfg_t_addr, usr_cfg_t_size, 13, flash_page, 0);\
hal_flash_deinit();\
ret;\
})
/**
* @brief flash(),1024
* API为hal_flash_normal_write
* @param *usr_cfg_t_addr(),
usr_cfg_t_size(1024)
01~63
flash_page 0~63
* @retval bool size是否超出
*/
#define hal_system_flash_write(usr_cfg_t_addr, usr_cfg_t_size, flash_page)\
({\
bool ret;\
if(flash_page == 0)\
{\
hal_flash_erase(13);\
}\
hal_flash_init();\
ret = hal_flash_normal_write(usr_cfg_t_addr, usr_cfg_t_size, 13, flash_page, 0);\
hal_flash_deinit();\
ret;\
})
/*******************************************************************************
* 3.Global structures, unions and enumerations using typedef
*******************************************************************************/
@ -122,24 +192,6 @@ void hal_system_set_pvd(bool enable);
*/
void hal_system_set_vcc(bool enable);
/**
* @brief flash读取数据,1024
* @param *usr_cfg_t_addr(),
usr_cfg_t_size(1024)
flash_page 0~63
* @retval bool
*/
bool hal_system_flash_read(uint8_t *usr_cfg_t_addr, uint16_t usr_cfg_t_size, uint8_t flash_page);
/**
* @brief flash(),1024
* @param *usr_cfg_t_addr(),
usr_cfg_t_size(1024)
01~63
flash_page 0~63
* @retval bool size是否超出
*/
bool hal_system_flash_write(uint8_t *usr_cfg_t_addr, uint16_t usr_cfg_t_size, uint8_t flash_page);
#if defined(ISP_568) || defined(ISP_368)
/**
@ -150,4 +202,18 @@ bool hal_system_flash_write(uint8_t *usr_cfg_t_addr, uint16_t usr_cfg_t_size, u
void hal_system_set_phy_calibration(bool en);
#endif
/**
* @brief debug state
* @param none
* @retval debug state
*/
uint32_t hal_system_get_debug_state(void);
/**
* @brief clear debug state(debug only)
* @param none
* @retval none
*/
void hal_system_clear_debug_state(void);
#endif //__HAL_SYSTEM_H__

View File

@ -56,6 +56,17 @@ void hal_timer_deinit(timer_num_e index);
*/
void hal_timer_start(timer_num_e index, uint32_t ms, fcb_type cb_func, void *data);
/**
* @brief
* @param index(0~3)timer_num_e
* @param ususus级别的
* @param cb_funcNULL
* @param dataNULL
* @retval
*/
void hal_timer_start_ex(timer_num_e index, uint32_t us, fcb_type cb_func, void *data);
/**
* @brief
* @param index(0~3)timer_num_e

View File

@ -79,51 +79,51 @@ typedef enum
* 5.Global function prototypes
*******************************************************************************/
/**
* @brief uart
* @brief uart
* @param hal_uart_handle_t
* @retval hal_uart_status
*/
hal_uart_status hal_uart_init(hal_uart_handle_t *huart);
/**
* @brief uart口
* @brief uart口
* @param hal_uart_handle_t
* @retval hal_uart_status
*/
hal_uart_status hal_uart_deinit(hal_uart_handle_t *huart);
/**
* @brief
* @brief
* @param hal_uart_handle_t
* @param pdata:
* @param size:
* @param pdata:
* @param size:
* @retval hal_uart_status
*/
hal_uart_status hal_uart_transmit_blocking(hal_uart_handle_t *huart, uint8_t *pdata, uint16_t size);
/**
* @brief
* @brief
* @param hal_uart_handle_t
* @param pdata:
* @param size:
* @param pdata:
* @param size:
* @retval hal_uart_status
*/
hal_uart_status hal_uart_receive_blocking(hal_uart_handle_t *huart, uint8_t *pdata, uint16_t size);
/**
* @brief 使DMA发送数据TX和RX共用一个DMA TX/RX传输完后才能进行RX/TX的传输
* @brief 使DMA发送数据TX和RX共用一个DMA TX/RX传输完后才能进行RX/TX的传输
* @param hal_uart_handle_t
* @param pdata:
* @param size:
* @param pdata:
* @param size:
* @retval hal_uart_status
*/
hal_uart_status hal_uart_transmit_dma(hal_uart_handle_t *huart, uint8_t *pdata, uint16_t size);
/**
* @brief 使DMA发送数据TX和RX共用一个DMA TX/RX传输完后才能进行RX/TX的传输
* @brief 使DMA发送数据TX和RX共用一个DMA TX/RX传输完后才能进行RX/TX的传输
* @param hal_uart_handle_t
* @param pdata:
* @param size:
* @param pdata:
* @param size:
* @retval hal_uart_status
*/
hal_uart_status hal_uart_receive_dma(hal_uart_handle_t *huart, uint8_t *pdata, uint16_t size);

View File

@ -1 +1 @@
#define SDK_REVISION 3496
#define SDK_REVISION 4644