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
2dad489e
Commit
2dad489e
authored
Feb 24, 2025
by
李冠华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🦄
refactor:将蜂鸣器相关功能代码独立出来
parent
8d00f50a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
205 additions
and
157 deletions
+205
-157
RMR42E.uvguix.Administrator
...t/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvguix.Administrator
+80
-116
RMR42E.uvprojx
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvprojx
+15
-5
Application.h
Firmware/Source/Application/Application.h
+1
-0
Buzzer.c
Firmware/Source/Application/Buzzer/Buzzer.c
+89
-0
Buzzer.h
Firmware/Source/Application/Buzzer/Buzzer.h
+17
-0
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+1
-32
GUI_Display.h
Firmware/Source/Application/GUI_Display/GUI_Display.h
+1
-2
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+0
-1
SEG_DISPLAY.h
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
+1
-1
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvguix.Administrator
View file @
2dad489e
This diff is collapsed.
Click to expand it.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/RMR42E.uvprojx
View file @
2dad489e
...
@@ -538,6 +538,16 @@
...
@@ -538,6 +538,16 @@
<FileType>
5
</FileType>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Driving_Information\Fault_Code.h
</FilePath>
<FilePath>
..\..\..\..\Source\Application\Driving_Information\Fault_Code.h
</FilePath>
</File>
</File>
<File>
<FileName>
Buzzer.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\Buzzer\Buzzer.c
</FilePath>
</File>
<File>
<FileName>
Buzzer.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Buzzer\Buzzer.h
</FilePath>
</File>
</Files>
</Files>
</Group>
</Group>
<Group>
<Group>
...
@@ -668,11 +678,6 @@
...
@@ -668,11 +678,6 @@
<FileType>
5
</FileType>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Component\Telltales\Telltales_Lib.h
</FilePath>
<FilePath>
..\..\..\..\Source\Component\Telltales\Telltales_Lib.h
</FilePath>
</File>
</File>
<File>
<FileName>
Telltales_Lib.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\Telltales\Telltales_Lib.lib
</FilePath>
</File>
<File>
<File>
<FileName>
Telltales_user.h
</FileName>
<FileName>
Telltales_user.h
</FileName>
<FileType>
5
</FileType>
<FileType>
5
</FileType>
...
@@ -733,6 +738,11 @@
...
@@ -733,6 +738,11 @@
<FileType>
4
</FileType>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\Eeprom\eepromManage_20240305.lib
</FilePath>
<FilePath>
..\..\..\..\Source\Component\Eeprom\eepromManage_20240305.lib
</FilePath>
</File>
</File>
<File>
<FileName>
Telltales_Lib.lib
</FileName>
<FileType>
4
</FileType>
<FilePath>
..\..\..\..\Source\Component\Telltales\Telltales_Lib.lib
</FilePath>
</File>
</Files>
</Files>
</Group>
</Group>
<Group>
<Group>
...
...
Firmware/Source/Application/Application.h
View file @
2dad489e
...
@@ -17,5 +17,6 @@
...
@@ -17,5 +17,6 @@
#include "Driving_Information\Data_Gear.h"
#include "Driving_Information\Data_Gear.h"
#include "BackLight\BackLight_User.h"
#include "BackLight\BackLight_User.h"
#include "Driving_Information\Fault_Code.h"
#include "Driving_Information\Fault_Code.h"
#include "Buzzer\Buzzer.h"
#endif
#endif
Firmware/Source/Application/Buzzer/Buzzer.c
0 → 100644
View file @
2dad489e
#include "Components.h"
#include "Buzzer\Buzzer.h"
uint8_t
BUZZER_ON
=
0
;
uint16_t
Buzzer_time
=
0
;
void
Buzzer_KL30_Init
(
void
)
{
}
void
Buzzer_KL15_Init
(
void
)
{
}
void
BUZZER_Init
(
void
)
{
Buzzer_time
=
0
;
BUZZER_ON
=
0
;
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
}
void
Buzzer_Service
(
void
)
{
if
((
Get_CAN_Power_State
()
!=
PKEY_ON
)
&&
(
Get_CAN_Power_State
()
!=
KEY_OFF
)
&&
(
Get_CAN_Power_State
()
!=
POWER_CHECK_NULL
))
{
if
(
g_u8TYWClearEepromFlag
>=
1
)
{
;
}
else
{
BUZZER_Init
();
}
}
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
();
}
}
/******************************************************************************
函数名:Get_Buzzer_Status
功 能:获取显示燃油格数函数
参 数:无
返回值:Fuel.FuelSeg 显示的电量值 x1
******************************************************************************
注 意:该函数必须每 ms被调用一次
******************************************************************************/
uint8_t
Get_Buzzer_Status
(
void
)
{
return
0
;
}
Firmware/Source/Application/Buzzer/Buzzer.h
0 → 100644
View file @
2dad489e
#ifndef BUZZER_H__
#define BUZZER_H__
#include "Application.h"
#include "Components.h"
extern
uint16_t
Buzzer_time
;
extern
uint8_t
BUZZER_ON
;
extern
void
Buzzer_KL30_Init
(
void
);
extern
void
Buzzer_KL15_Init
(
void
);
extern
void
Buzzer_Service
(
void
);
extern
void
BUZZER_Init
(
void
);
#endif
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
2dad489e
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
#include "Application.h"
#include "Application.h"
#define DISPLAY_OPEN ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Charge_OFF_Flag == 0) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != PKEY_ON) && (System_Indicator_CANFlag != 1))
#define DISPLAY_OPEN ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Charge_OFF_Flag == 0) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != PKEY_ON) && (System_Indicator_CANFlag != 1))
uint8_t
BUZZER_ON
=
0
;
uint8_t
Charge_OFF_Flag
=
0
;
uint8_t
Charge_OFF_Flag
=
0
;
void
TYW_Clear_Eeprom_Service
(
void
)
void
TYW_Clear_Eeprom_Service
(
void
)
...
@@ -159,7 +159,6 @@ void Gauge_Service(void)
...
@@ -159,7 +159,6 @@ void Gauge_Service(void)
else
else
{
{
TYW_Clear_Eeprom_Service
();
TYW_Clear_Eeprom_Service
();
BUZZER_Init
();
interact_PWM_Low_Duty
=
100
;
interact_PWM_Low_Duty
=
100
;
if
(
Common_GetIgnOnTime
()
>
1500
)
if
(
Common_GetIgnOnTime
()
>
1500
)
{
{
...
@@ -193,34 +192,11 @@ void Gauge_Service(void)
...
@@ -193,34 +192,11 @@ void Gauge_Service(void)
// Gpio_Init(Gpio_Sleep_Init);
// Gpio_Init(Gpio_Sleep_Init);
}
}
interact_PWM_Low_Duty
=
50
;
interact_PWM_Low_Duty
=
50
;
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
else
{
{
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x125_Msg
))
==
CAN_SIG_NORMAL
)
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x125_Msg
))
==
CAN_SIG_NORMAL
)
{
{
BUZZER_Init
();
// poweroff_time = 0;
// poweroff_time = 0;
Clear_Bu98
();
Clear_Bu98
();
interact_PWM_Low_Duty
=
100
;
interact_PWM_Low_Duty
=
100
;
...
@@ -233,7 +209,6 @@ void Gauge_Service(void)
...
@@ -233,7 +209,6 @@ void Gauge_Service(void)
}
}
else
else
{
{
BUZZER_Init
();
Clear_Bu98
();
Clear_Bu98
();
interact_PWM_Low_Duty
=
100
;
interact_PWM_Low_Duty
=
100
;
for
(
i
=
0
;
i
<
LampCh0_MAX
;
i
++
)
for
(
i
=
0
;
i
<
LampCh0_MAX
;
i
++
)
...
@@ -330,12 +305,6 @@ void Checkself_LED_Display(void)
...
@@ -330,12 +305,6 @@ void Checkself_LED_Display(void)
SEG_SET_Frame
(
1
);
SEG_SET_Frame
(
1
);
}
}
void
BUZZER_Init
(
void
)
{
Buzzer_time
=
0
;
BUZZER_ON
=
0
;
RTE_GPIO_Set_Level
(
RTE_GPIO_PORT04_PIN01
,
RTE_GPIO_LEVEL_LOW
);
// OUT_EN_1
}
void
TYW_RESET_TIME
(
void
)
void
TYW_RESET_TIME
(
void
)
{
{
...
...
Firmware/Source/Application/GUI_Display/GUI_Display.h
View file @
2dad489e
...
@@ -36,7 +36,7 @@ typedef struct
...
@@ -36,7 +36,7 @@ typedef struct
#define BATTERY_SEG_MAP_MAX (sizeof(batterySegMap)/sizeof(BatterySegMap_st_t))
#define BATTERY_SEG_MAP_MAX (sizeof(batterySegMap)/sizeof(BatterySegMap_st_t))
#define POWERON_SCAN_TIMER 3000ul
#define POWERON_SCAN_TIMER 3000ul
extern
uint8_t
BUZZER_ON
;
extern
uint8_t
Charge_OFF_Flag
;
extern
uint8_t
Charge_OFF_Flag
;
extern
uint8_t
EEPROM_Cumulativee_clean
;
extern
uint8_t
EEPROM_Cumulativee_clean
;
...
@@ -54,7 +54,6 @@ void Gauge_Service(void);
...
@@ -54,7 +54,6 @@ void Gauge_Service(void);
void
Gauge_CAN_setup_Service
(
void
);
void
Gauge_CAN_setup_Service
(
void
);
void
Checkself_LED_Display
(
void
);
void
Checkself_LED_Display
(
void
);
void
BUZZER_Init
(
void
);
uint8_t
Get_Clock_All_lenth
(
void
);
uint8_t
Get_Clock_All_lenth
(
void
);
uint8_t
Get_CAN_Num_SBMS_Soc_2_Grid
(
void
);
uint8_t
Get_CAN_Num_SBMS_Soc_2_Grid
(
void
);
uint8_t
Get_CAN_Num_MBMS_Soc_1_Grid
(
void
);
uint8_t
Get_CAN_Num_MBMS_Soc_1_Grid
(
void
);
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
2dad489e
...
@@ -2639,7 +2639,6 @@ void Check_SEG_Display(void)
...
@@ -2639,7 +2639,6 @@ void Check_SEG_Display(void)
uint8_t
Checkself_SEG_step
=
0
;
uint8_t
Checkself_SEG_step
=
0
;
uint8_t
Checkself_SEG_step_count
=
0
;
uint8_t
Checkself_SEG_step_count
=
0
;
uint16_t
Buzzer_time
=
0
;
void
Checkself_Init
(
void
)
void
Checkself_Init
(
void
)
{
{
Checkself_SEG_step
=
0
;
Checkself_SEG_step
=
0
;
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
View file @
2dad489e
...
@@ -125,7 +125,7 @@ extern uint8_t Checkself_SEG_step;
...
@@ -125,7 +125,7 @@ extern uint8_t Checkself_SEG_step;
extern
uint8_t
Checkself_SEG_step_count
;
extern
uint8_t
Checkself_SEG_step_count
;
extern
uint8_t
checkself_seg_Flag
;
extern
uint8_t
checkself_seg_Flag
;
extern
uint8_t
g_u8TYWClearEepromFlag
;
extern
uint8_t
g_u8TYWClearEepromFlag
;
extern
uint16_t
Buzzer_time
;
...
...
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