Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
b21e326f
Commit
b21e326f
authored
May 06, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:背光变化逻辑
parent
a7401f4e
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
35 deletions
+21
-35
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+0
-3
BackLight.c
Firmware/Source/Application/BackLight/BackLight.c
+10
-26
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+6
-6
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+4
-0
Telltales_user.h
Firmware/Source/Component/Telltales/Telltales_user.h
+1
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
b21e326f
SET PATH=C:\Keil_v5\ARM\ARMCC\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Users\tyw05\AppData\Local\Microsoft\WindowsApps;
SET ARMCC5_ASMOPT=--diag_suppress=9931
SET ARMCC5_CCOPT=--diag_suppress=9931
SET ARMCC5_LINKOPT=--diag_suppress=9931
SET CPU_TYPE=BAT32G139GK64FB
SET CPU_VENDOR=Cmsemicon
SET UV2_TARGET=TianYing200
...
...
Firmware/Source/Application/BackLight/BackLight.c
View file @
b21e326f
...
...
@@ -6,7 +6,7 @@
#define BACK_LIGHT_DAY 600
#define BACK_LIGHT_NIGHT
20
0
#define BACK_LIGHT_NIGHT
42
0
_Light
g_Light
;
void
BackLight_Init
(
void
)
...
...
@@ -19,32 +19,16 @@ void BackLight_Process(void)
{
if
(
SYS_OPR_STAT_IGN_ON
)
{
// if(ALS_Get_Data1() > 200)//data1 500以内,data0 3000以内
// {
// if (g_Light.Light_Day < 15)//1.5s 1500ms
// {
// g_Light.Light_Day++;//100ms
// }
// else
// {
// g_Light.Light_Night = 0;
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_DAY);
// }
// }
// else
// {
// if (g_Light.Light_Night < 15)
// {
// g_Light.Light_Night++;
// }
// else
// {
// g_Light.Light_Day = 0;
// TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, BACK_LIGHT_NIGHT);
// }
// }
if
(
HighBeam_Timer
.
LED_Turnon
==
5
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_NIGHT
);
}
else
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_DAY
);
}
}
else
{
g_Light
.
Light_Day
=
0
;
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
b21e326f
...
...
@@ -50,7 +50,6 @@ static void Power_KL30_Init(void)
DFlash_init
();
Analog_Signal_Conv_Init
();
BU98R10_Init
();
BackLight_Init
();
Sys_KL30_Init
();
Checkself_Init
();
Data_Vehicle_Speed_KL30_Init
();
...
...
@@ -71,6 +70,7 @@ static void Power_KL30_Init(void)
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
Telltales_Init
();
Telltales_UserInit
();
MenuData_Unit_Init
();
g_stRTCInformation
.
u8RTCSecond
=
0
;
g_stRTCInformation
.
u8RTCMinute
=
0
;
...
...
@@ -93,7 +93,6 @@ static void Power_Wakeup_Init(void)
Analog_Signal_Conv_Init
();
Data_User_Mileage_WakeupInit
();
BU98R10_Init
();
BackLight_Init
();
Sys_WakeUp_Init
();
Data_Vehicle_Speed_KL30_Init
();
Data_Vehicle_Speed_Wakeup_Init
();
...
...
@@ -113,6 +112,7 @@ static void Power_Wakeup_Init(void)
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER0
,
TIMERM_CHD
,
ActiveLevel_High
);
TimerM_PWM_CH_Output_init
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
ActiveLevel_High
);
Telltales_Init
();
Telltales_UserInit
();
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
}
...
...
@@ -134,10 +134,10 @@ static void Power_IG_OFF_Init(void)
static
void
Power_IG_ON_Init
(
void
)
{
ClearODO_Flag
=
0
;
BackLight_Init
();
Checkself_Init
();
Line_In_KL15_ON_Init
();
Telltales_KL15_Init
();
Telltales_UserInit
();
Fuel_KL15_Init
();
}
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
b21e326f
...
...
@@ -75,6 +75,10 @@ void Telltales_Init(void)
m_ExtPara
.
LED_PowerON_TimerCbk
=
Common_GetIgnOnTime
;
m_ExtPara
.
LED_PowerCbk
=
Common_Get_IG_Sts
;
Telltales_KL30_Wakeup_Init
(
Tel_Mem
,
LED_Attribute
,
&
m_ExtPara
);
}
void
Telltales_UserInit
(
void
)
{
HighBeam_Timer
.
LED_Turnon
=
0
;
HighBeam_Timer
.
LED_Turnoff
=
0
;
LED_Battery_Voltage
=
0
;
...
...
Firmware/Source/Component/Telltales/Telltales_user.h
View file @
b21e326f
...
...
@@ -32,6 +32,7 @@ extern Led_HighBeam_Count HighBeam_Timer;
void
Telltales_Init
(
void
);
void
Telltales_UserInit
(
void
);
#endif
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