Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
haoJin750TFT
Commits
be05f0a7
Commit
be05f0a7
authored
Aug 01, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加common初始化函数,休眠能唤醒
parent
30182ce7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+10
-5
No files found.
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
be05f0a7
...
...
@@ -44,6 +44,7 @@ static void Power_KL30_Init(void)
loc_config
.
pfnUARTConfirmCallBack
=
NULL
;
loc_config
.
pfnUARTReadMsgCallBack
=
Amt630hUartRecvData
;
RTE_UART_Init
(
UART_CH2
,
&
loc_config
);
Common_DataInit
();
Analog_Signal_Conv_Init
();
Sys_KL30_Init
();
Data_Vehicle_Speed_KL30_Wakeup_Init
();
...
...
@@ -66,11 +67,12 @@ static void Power_KL30_Init(void)
Menu_User_Init
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
//
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
}
static
void
Power_Wakeup_Init
(
void
)
{
Common_DataInit
();
Gpio_Init
(
Gpio_WakeUp_Init
);
eeprom_StoreInfo_Init
();
Analog_Signal_Conv_Init
();
...
...
@@ -90,7 +92,7 @@ static void Power_Wakeup_Init(void)
Menu_User_WAKEUP
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
//
RTE_DEEPSLEEP_GPIO_Interrupt_Enable(KL15_AD_IN, Trigger_Rising);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
}
static
void
Power_LVP_Init
(
void
)
...
...
@@ -128,7 +130,10 @@ static void Power_Sleep_Init(void)
Gpio_Init
(
Gpio_Sleep_Init
);
AMT630H_Sleep
();
Analog_Signal_Conv_Stop
();
RTE_DEEPSLEEP_Enable
();
if
(
RTE_GPIO_Get_Level
(
KL15_AD_IN
)
==
0
)
/* KL15 */
{
RTE_DEEPSLEEP_Enable
();
}
}
static
Power_Status_em
Power_Stay_ON
(
void
)
...
...
@@ -159,7 +164,7 @@ static Power_Status_em Power_Stay_OFF(void)
}
else
{
if
((
Common_GetIgnOffTime
()
<
1000
0
))
if
((
Common_GetIgnOffTime
()
<
1000
))
{
u8PowerSts
=
EM_IGN_OFF
;
}
...
...
@@ -168,7 +173,7 @@ static Power_Status_em Power_Stay_OFF(void)
//igoff大于1s且下15电才进休眠,否则一直保持在igoff状态
//if(Sys_Read_KL15_Voltage() < 5000)
{
//
u8PowerSts = EM_IGN_Sleep_Init;
u8PowerSts
=
EM_IGN_Sleep_Init
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment