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
d312a3c3
Commit
d312a3c3
authored
May 06, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:背光点亮,按键调通
parent
abd6e7ae
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
51 deletions
+52
-51
HaoJin.uvprojx
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/HaoJin.uvprojx
+7
-7
userdefine.h
...BAT32A239/MDK_ARM/RTE/Device/BAT32A239KK64FB/userdefine.h
+1
-1
BackLight.c
Firmware/Source/Application/BackLight/BackLight.c
+25
-24
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+4
-4
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+8
-8
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+1
-1
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+6
-6
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/HaoJin.uvprojx
View file @
d312a3c3
...
...
@@ -16,7 +16,7 @@
<TargetCommonOption>
<Device>
BAT32A239KK64FB
</Device>
<Vendor>
Cmsemicon
</Vendor>
<PackID>
Cmsemicon.BAT32A239.1.0.
3
</PackID>
<PackID>
Cmsemicon.BAT32A239.1.0.
5
</PackID>
<PackURL>
http://www.mcu.com.cn/pack/
</PackURL>
<Cpu>
IRAM(0x20000000,0x08000) IROM(0x00000000,0x40000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE
</Cpu>
<FlashUtilSpec></FlashUtilSpec>
...
...
@@ -275,8 +275,8 @@
</OCR_RVCT3>
<OCR_RVCT4>
<Type>
1
</Type>
<StartAddress>
0x
800
0
</StartAddress>
<Size>
0x
38
000
</Size>
<StartAddress>
0x0
</StartAddress>
<Size>
0x
40
000
</Size>
</OCR_RVCT4>
<OCR_RVCT5>
<Type>
1
</Type>
...
...
@@ -1156,7 +1156,7 @@
<file
attr=
"config"
category=
"source"
name=
"Device\Source\isr_BAT32A239.c"
version=
"1.0.0"
>
<instance
index=
"0"
>
RTE\Device\BAT32A239KK64FB\isr_BAT32A239.c
</instance>
<component
Cclass=
"Device"
Cgroup=
"ISR"
Cvendor=
"Cmsemicon"
Cversion=
"1.0.0"
condition=
"BAT32A239 CMSIS-CORE"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
3
"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
5
"
/>
<targetInfos>
<targetInfo
name=
"HaoJin232"
/>
</targetInfos>
...
...
@@ -1164,7 +1164,7 @@
<file
attr=
"config"
category=
"source"
condition=
"Startup ARM"
name=
"Device\Source\ARM\startup_BAT32A239.s"
version=
"1.0.0"
>
<instance
index=
"0"
>
RTE\Device\BAT32A239KK64FB\startup_BAT32A239.s
</instance>
<component
Cclass=
"Device"
Cgroup=
"Startup"
Cvendor=
"Cmsemicon"
Cversion=
"1.0.0"
condition=
"BAT32A239 CMSIS-CORE"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
3
"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
5
"
/>
<targetInfos>
<targetInfo
name=
"HaoJin232"
/>
</targetInfos>
...
...
@@ -1172,7 +1172,7 @@
<file
attr=
"config"
category=
"source"
name=
"Device\Source\system_BAT32A239.c"
version=
"1.0.0"
>
<instance
index=
"0"
>
RTE\Device\BAT32A239KK64FB\system_BAT32A239.c
</instance>
<component
Cclass=
"Device"
Cgroup=
"Startup"
Cvendor=
"Cmsemicon"
Cversion=
"1.0.0"
condition=
"BAT32A239 CMSIS-CORE"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
3
"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
5
"
/>
<targetInfos>
<targetInfo
name=
"HaoJin232"
/>
</targetInfos>
...
...
@@ -1180,7 +1180,7 @@
<file
attr=
"config"
category=
"header"
name=
"Device\Source\userdefine.h"
version=
"1.0.0"
>
<instance
index=
"0"
>
RTE\Device\BAT32A239KK64FB\userdefine.h
</instance>
<component
Cclass=
"Device"
Cgroup=
"Startup"
Cvendor=
"Cmsemicon"
Cversion=
"1.0.0"
condition=
"BAT32A239 CMSIS-CORE"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
3
"
/>
<package
name=
"BAT32A239"
schemaVersion=
"1.4"
url=
"http://www.mcu.com.cn/pack/"
vendor=
"Cmsemicon"
version=
"1.0.
5
"
/>
<targetInfos>
<targetInfo
name=
"HaoJin232"
/>
</targetInfos>
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RTE/Device/BAT32A239KK64FB/userdefine.h
View file @
d312a3c3
...
...
@@ -18,7 +18,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 (0x00008000ul)
/* Status list definition */
...
...
Firmware/Source/Application/BackLight/BackLight.c
View file @
d312a3c3
...
...
@@ -19,31 +19,32 @@ 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
;
// 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);
// }
// }
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
);
}
}
}
else
{
g_Light
.
Light_Day
=
0
;
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
d312a3c3
...
...
@@ -1646,7 +1646,7 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM)
{
IC1_SEG059
=
IC_SEG_ON
;
IC1_SEG058
=
IC_SEG_ON
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_29_MPH
,
100
);
//
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100);
}
else
...
...
@@ -1655,7 +1655,7 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM)
{
IC1_SEG059
=
IC_SEG_ON
;
IC1_SEG058
=
IC_SEG_ON
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_29_MPH
,
100
);
//
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100);
//LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100);
}
else
...
...
@@ -1664,14 +1664,14 @@ _Fun_Res SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM)
{
IC1_SEG059
=
IC_SEG_OFF
;
IC1_SEG058
=
IC_SEG_ON
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_29_MPH
,
100
);
//
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 100);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 0);
}
else
{
IC1_SEG059
=
IC_SEG_ON
;
IC1_SEG058
=
IC_SEG_OFF
;
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_29_MPH
,
0
);
//
LED_Driver_Channel_Set(LampChannel_0, LampCh0_29_MPH, 0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_30_KM_H, 100);
}
}
...
...
Firmware/Source/Component/Key/Key_user.c
View file @
d312a3c3
...
...
@@ -76,14 +76,14 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//Set
Key_Status_en_t
Key_Status_Read_Left
(
void
)
{
Key_Status_en_t
enKeyReal
=
KEY_REALTIME_LOOSEN
;
//if (RTE_GPIO_Get_Level(MODE_P
_IN))
//
{
//
enKeyReal = KEY_REALTIME_LOOSEN;
//
}
//
else
//
{
//
enKeyReal = KEY_REALTIME_PRESS;
//
}
if
(
RTE_GPIO_Get_Level
(
Key_MCU
_IN
))
{
enKeyReal
=
KEY_REALTIME_LOOSEN
;
}
else
{
enKeyReal
=
KEY_REALTIME_PRESS
;
}
return
enKeyReal
;
}
Key_Status_en_t
Key_Status_Read_Right
(
void
)
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
d312a3c3
...
...
@@ -78,7 +78,7 @@ static void Power_KL30_Init(void)
g_stRTCInformation
.
u8RTCDayOfMonth
=
1
;
g_stRTCInformation
.
u8RTCMonth
=
1
;
g_stRTCInformation
.
u8RTCYear
=
20
;
RTE_RTC_Init
(
g_stRTCInformation
);
//
RTE_RTC_Init(g_stRTCInformation);
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
}
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
d312a3c3
...
...
@@ -69,12 +69,12 @@ void Sys_50ms_Tasks(void)
uint8_t
u8LEDDriverCheckCount
=
0U
;
void
Sys_100ms_Tasks
(
void
)
{
if
((
PageType
!=
Page_Time_Hour
)
&&
(
PageType
!=
Page_Time_Minute
))
{
RTE_RTC_Get_CounterValue
(
&
counter_val
);
counter_val
.
time
.
RTC_Hours
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Hours
);
counter_val
.
time
.
RTC_Minutes
=
RTC_Bcd2ToByte
(
counter_val
.
time
.
RTC_Minutes
);
}
//
if((PageType != Page_Time_Hour)&&(PageType != Page_Time_Minute))
//
{
//
RTE_RTC_Get_CounterValue(&counter_val);
//
counter_val.time.RTC_Hours = RTC_Bcd2ToByte(counter_val.time.RTC_Hours);
//
counter_val.time.RTC_Minutes = RTC_Bcd2ToByte(counter_val.time.RTC_Minutes);
//
}
Fuel_Cal_Sevice
(
100u
);
BackLight_Process
();
Services_Mileage_Callback
();
...
...
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