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
e0e05b88
Commit
e0e05b88
authored
Aug 13, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:修改背光初始化,和背光函数调用
parent
86dd5796
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
18 deletions
+8
-18
userdefine.h
...BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
+1
-1
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+5
-17
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+2
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A279/MDK_ARM/RTE/Device/BAT32A279KM64FB/userdefine.h
View file @
e0e05b88
...
...
@@ -20,7 +20,7 @@ User definitions
typedef
unsigned
short
MD_STATUS
;
#define HAS_BOOTLOADER (
1
u) // 仅仿真App时设置为0
#define HAS_BOOTLOADER (
0
u) // 仅仿真App时设置为0
#define APP_BASE (0x0000C400ul)
/* Status list definition */
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
e0e05b88
...
...
@@ -67,6 +67,7 @@ static void Power_KL30_Init(void)
Menu_User_Init
();
Can_Init
();
Protocol_KL30_Wakeup_Init
();
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
100
);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
KL15_AD_IN
,
Trigger_Rising
);
}
...
...
@@ -107,7 +108,7 @@ static void Power_OVP_Init(void)
static
void
Power_IG_OFF_Init
(
void
)
{
Line_In_KL15_OFF_Init
();
RTE_GPIO_Set_Level
(
Blacklight_PWM
,
0
);
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
}
static
void
Power_IG_ON_Init
(
void
)
...
...
@@ -164,18 +165,10 @@ static Power_Status_em Power_Stay_OFF(void)
}
else
{
if
((
Common_GetIgnOffTime
()
<
1
000
))
if
((
Common_GetIgnOffTime
()
<
20
000
))
{
u8PowerSts
=
EM_IGN_OFF
;
}
else
{
//igoff大于1s且下15电才进休眠,否则一直保持在igoff状态
//if(Sys_Read_KL15_Voltage() < 5000)
{
u8PowerSts
=
EM_IGN_Sleep_Init
;
}
}
}
return
u8PowerSts
;
...
...
@@ -191,7 +184,7 @@ static Power_Status_em Power_Stay_Protect(void)
/* 关闭所有外设,坪保留AD采集,电溝状思切�? */
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
0
);
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Disable
);
//
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Disable);
}
u8PowerSts
=
EM_IGN_OFF_Init
;
/* 电溝模弝正常 */
...
...
@@ -204,15 +197,10 @@ static Power_Status_em Power_Stay_Protect(void)
if
(
SYS_OPR_STAT_RUN
)
{
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
//
CAN_TX_SetEnable(&CAN_CH0_CanMsgTxOp, CAN_N_TX_Enable);
return
u8PowerSts
;
}
//进入异常电压,电源库里直接将15电等于0,则直接退出,状态是igoff,下15则进入休眠
// if ( SYS_OPR_STAT_IGN_OFF )
// {
// break;
// }
}
}
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
e0e05b88
...
...
@@ -80,6 +80,8 @@ void Sys_100ms_Tasks(void)
//Data_Mileage_Clear();
RTE_GPIO_Config
(
RTE_GPIO_PORT05_PIN04
,
GpioOut_High
);
BackLight_Process
();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
// aaa = Menu_Item_Select_Get(MENU_ITEM_SELECT_AUTO);
}
...
...
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