Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
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
时昊
RT_RMR42E
Commits
bd0ff563
Commit
bd0ff563
authored
Feb 24, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:混动车型增加蜂鸣器相关功能逻辑
parent
2dad489e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
34 deletions
+70
-34
Buzzer.c
Firmware/Source/Application/Buzzer/Buzzer.c
+66
-33
Buzzer.h
Firmware/Source/Application/Buzzer/Buzzer.h
+1
-0
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+1
-1
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+1
-0
Sys_Task_List.c
Firmware/Source/System/Sys_Task_List.c
+1
-0
No files found.
Firmware/Source/Application/Buzzer/Buzzer.c
View file @
bd0ff563
...
@@ -3,9 +3,13 @@
...
@@ -3,9 +3,13 @@
uint8_t
BUZZER_ON
=
0
;
uint8_t
BUZZER_ON
=
0
;
uint16_t
Buzzer_time
=
0
;
uint16_t
Buzzer_time
=
0
;
uint8_t
BuzzerReadyCount
=
0U
;
void
Buzzer_KL30_Init
(
void
)
void
Buzzer_KL30_Init
(
void
)
{
{
BUZZER_ON
=
0
;
Buzzer_time
=
0
;
BuzzerReadyCount
=
0U
;
}
}
...
@@ -16,60 +20,89 @@ void Buzzer_KL15_Init(void)
...
@@ -16,60 +20,89 @@ void Buzzer_KL15_Init(void)
void
BUZZER_Init
(
void
)
void
BUZZER_Init
(
void
)
{
{
Buzzer_time
=
0
;
#if (PART_NUMBER == RMR42E_60)
BUZZER_ON
=
0
;
Buzzer_time
=
0
;
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
BUZZER_ON
=
0
;
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
#endif
}
}
void
Buzzer_Service
(
void
)
void
Buzzer_Service
(
void
)
{
{
#if (PART_NUMBER == RMR42E_60)
if
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
))
if
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
))
{
if
(
g_u8TYWClearEepromFlag
>=
1
)
{
{
;
if
(
g_u8TYWClearEepromFlag
>=
1
)
{
;
}
else
{
BUZZER_Init
();
}
}
}
else
else
if
(
Get_CAN_Power_State
()
==
PKEY_ON
)
{
if
(
Buzzer_time
==
0
)
{
;
}
if
(
FLASH_SYNC_05Hz
)
{
if
(
Buzzer_time
<=
6000
)
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_HIGH
);
// OUT_EN_1
BUZZER_ON
=
1
;
}
else
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
BUZZER_ON
=
0
;
}
}
else
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
BUZZER_ON
=
0
;
}
if
(
Buzzer_time
<
0xFFFF
)
{
Buzzer_time
++
;
}
}
else
{
{
BUZZER_Init
();
BUZZER_Init
();
}
}
}
#else
else
if
(
Get_CAN_Power_State
()
==
PKEY_ON
)
if
(
Get_TelltalesLedSts
(
em_LED_Grass_Full_R
)
==
1U
)
{
if
(
Buzzer_time
==
0
)
{
{
;
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_HIGH
);
BUZZER_ON
=
1U
;
}
}
else
if
(
Get_TelltalesLedSts
(
em_LED_READY_G
)
==
1U
)
if
(
FLASH_SYNC_05Hz
)
{
{
if
(
Buzzer
_time
<=
6000
)
if
(
Buzzer
ReadyCount
<
20U
)
{
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_HIGH
);
// OUT_EN_1
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_HIGH
);
BUZZER_ON
=
1
;
BUZZER_ON
=
1U
;
BuzzerReadyCount
++
;
}
}
else
else
{
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
BUZZER_ON
=
0
;
BUZZER_ON
=
0
U
;
}
}
}
}
else
else
{
{
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
BUZZER_ON
=
0
;
BUZZER_ON
=
0U
;
}
BuzzerReadyCount
=
0U
;
if
(
Buzzer_time
<
0xFFFF
)
{
Buzzer_time
++
;
}
}
}
else
{
BUZZER_Init
();
}
#endif
}
}
...
@@ -83,7 +116,7 @@ void Buzzer_Service(void)
...
@@ -83,7 +116,7 @@ void Buzzer_Service(void)
******************************************************************************/
******************************************************************************/
uint8_t
Get_Buzzer_Status
(
void
)
uint8_t
Get_Buzzer_Status
(
void
)
{
{
return
0
;
return
BUZZER_ON
;
}
}
Firmware/Source/Application/Buzzer/Buzzer.h
View file @
bd0ff563
...
@@ -13,5 +13,6 @@ extern void Buzzer_KL15_Init(void);
...
@@ -13,5 +13,6 @@ extern void Buzzer_KL15_Init(void);
extern
void
Buzzer_Service
(
void
);
extern
void
Buzzer_Service
(
void
);
extern
void
BUZZER_Init
(
void
);
extern
void
BUZZER_Init
(
void
);
extern
uint8_t
Get_Buzzer_Status
(
void
);
#endif
#endif
Firmware/Source/Application/CAN_User/Can_App.c
View file @
bd0ff563
...
@@ -52,7 +52,7 @@ void Can_Set_Buff_3A2(canlib_uint8_t CopyData[])
...
@@ -52,7 +52,7 @@ void Can_Set_Buff_3A2(canlib_uint8_t CopyData[])
p3A2
->
Sig
.
ICU_LEDLightState
=
Get_TelltalesLedSts
(
em_LED_LED_Open_W
);
p3A2
->
Sig
.
ICU_LEDLightState
=
Get_TelltalesLedSts
(
em_LED_LED_Open_W
);
p3A2
->
Sig
.
ICU_BuzzerState
=
0
;
p3A2
->
Sig
.
ICU_BuzzerState
=
Get_Buzzer_Status
()
;
p3A2
->
Sig
.
ICU_GrassFullState
=
Get_TelltalesLedSts
(
em_LED_Grass_Full_R
);
p3A2
->
Sig
.
ICU_GrassFullState
=
Get_TelltalesLedSts
(
em_LED_Grass_Full_R
);
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
bd0ff563
...
@@ -77,6 +77,7 @@ static void Power_KL30_Init(void)
...
@@ -77,6 +77,7 @@ static void Power_KL30_Init(void)
Data_Gear_KL30_Init
();
Data_Gear_KL30_Init
();
Data_Fuel_KL30_Init
();
Data_Fuel_KL30_Init
();
Fault_Code_KL30_Init
();
Fault_Code_KL30_Init
();
Buzzer_KL30_Init
();
}
}
extern
uint32_t
PowerIgnOffTimeLine
;
extern
uint32_t
PowerIgnOffTimeLine
;
...
...
Firmware/Source/System/Sys_Task_List.c
View file @
bd0ff563
...
@@ -52,6 +52,7 @@ void Sys_50ms_Tasks(void)
...
@@ -52,6 +52,7 @@ void Sys_50ms_Tasks(void)
Gauge_Service
();
Gauge_Service
();
Data_Soc_Service
();
Data_Soc_Service
();
Fault_Code_Display_Queue
(
50U
);
Fault_Code_Display_Queue
(
50U
);
Buzzer_Service
();
}
}
void
Sys_15ms_Tasks
(
void
)
void
Sys_15ms_Tasks
(
void
)
...
...
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