1、增加打电话息屏功能
This commit is contained in:
parent
aa2ea6e2c8
commit
c63f3fac35
|
@ -50,7 +50,7 @@
|
|||
<InvalidFlash>1</InvalidFlash>
|
||||
</TargetStatus>
|
||||
<OutputDirectory>.\Objects\</OutputDirectory>
|
||||
<OutputName>WL568_S21_NT37701_V100_20230907</OutputName>
|
||||
<OutputName>WL568_S21_NT37701_CST_V100_20240530</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>1</CreateHexFile>
|
||||
|
@ -403,6 +403,11 @@
|
|||
<FileType>1</FileType>
|
||||
<FilePath>..\src\app\demo\app_tp_st_touch.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>demo_version.txt</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\src\app\demo\demo_version.txt</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -138,6 +138,9 @@ static bool s_in_aod_mode_flag = false;
|
|||
|
||||
static bool s_in_bule_mode_flag = false;
|
||||
|
||||
/* 通话息屏 */
|
||||
#define TOUCH_PHONE_DIS_OFF_PIN ( IO_PAD_TD_TPRSTN ) // 通话熄屏响应管脚
|
||||
|
||||
|
||||
/* 屏初始化完成标志位 */
|
||||
static bool panel_display_done = false;
|
||||
|
@ -4888,6 +4891,53 @@ void tp_power_up_restart(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/* 通话熄屏功能 */
|
||||
// 注意,函数在主循环函数中调用,board Init 中打开 systick定时器为1ms,本机制是识别高电平变化进入熄屏处理流程,其它触发形式按实际触摸规定来。熄屏管脚若开机时刻异常触发,考虑加上拉或下拉电阻!!!
|
||||
|
||||
static void PhoneDisOffDeal(void)
|
||||
{
|
||||
static unsigned char Flag = 0; // 状态标志,防止反复执行函数状态
|
||||
static unsigned int ExitDelay = 0;
|
||||
|
||||
if(0 == Flag)
|
||||
{
|
||||
/* 引脚初始化 */
|
||||
hal_gpio_set_pull_state(TOUCH_PHONE_DIS_OFF_PIN, ENABLE, DISABLE); // 设定初始上拉状态
|
||||
hal_gpio_init_input(TOUCH_PHONE_DIS_OFF_PIN);
|
||||
Flag = 1; // 更新标志,防止反复执行, 并进入到下个状态
|
||||
}
|
||||
else if((IO_LVL_HIGH == hal_gpio_get_input_data(TOUCH_PHONE_DIS_OFF_PIN)) && (1 == Flag))
|
||||
{
|
||||
/* 高电平,刷黑操作 */
|
||||
hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x22);
|
||||
Flag = 2; // 更新标志,防止反复执行
|
||||
printf("all pixel off");
|
||||
}
|
||||
else if((IO_LVL_LOW == hal_gpio_get_input_data(TOUCH_PHONE_DIS_OFF_PIN)) && (2 == Flag))
|
||||
{
|
||||
/* 低电平, 退出操作 */
|
||||
ExitDelay = hal_system_get_tick(); // 更新计时时间
|
||||
//hal_dsi_tx_ctrl_write_cmd( 0x05, 0, 1, 0x13 );
|
||||
//Flag = 1; // 更新标志,防止反复执行
|
||||
Flag = 3;
|
||||
}
|
||||
else if(3 == Flag)
|
||||
{
|
||||
if(hal_system_get_tick() - ExitDelay > 1000) // 延时 1S 退出黑屏状态
|
||||
{
|
||||
hal_dsi_tx_ctrl_write_cmd(0x05, 0, 1, 0x13);
|
||||
Flag = 1; // 更新标志,防止反复执行
|
||||
printf("normal disp");
|
||||
}
|
||||
else if(IO_LVL_HIGH == hal_gpio_get_input_data(TOUCH_PHONE_DIS_OFF_PIN)) // 倒计时阶段又挡住了屏幕,继续更新时间
|
||||
{
|
||||
ExitDelay = hal_system_get_tick(); // 更新计时时间
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ap_demo(void)
|
||||
{
|
||||
hal_gpio_init_output(IO_PAD_TD_SPIM_MISO, IO_LVL_LOW);
|
||||
|
@ -4931,6 +4981,9 @@ void ap_demo(void)
|
|||
panel_display_done = true;
|
||||
}
|
||||
|
||||
/* 通话息屏功能处理 */
|
||||
PhoneDisOffDeal();
|
||||
|
||||
if (s_in_bule_mode_flag == true )
|
||||
{
|
||||
if (panel_mode ==00)
|
||||
|
|
|
@ -14,6 +14,17 @@
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISP568_S21_NT37701AH_HX628_CST6656S_20240530
|
||||
|
||||
1、新增打电话触摸上半部分息屏功能
|
||||
|
||||
2、
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ISP568_S21_NT37701AH_HX628_20230824
|
||||
|
|
Loading…
Reference in New Issue