Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
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
ISUZU
VC66_7C
Commits
9fc2cca7
Commit
9fc2cca7
authored
Jan 16, 2023
by
hu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' into withBoot
parents
7f88e7ed
6453ca2a
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
495 additions
and
265 deletions
+495
-265
Application.gpj
ghs/group/Application.gpj
+2
-0
GaugesInterface.c
source/Application/APP/GaugesMode/GaugesInterface.c
+1
-1
Key.c
source/Application/APP/Key/Key.c
+1
-1
Line_In_user.c
source/Application/APP/LINE_IN/Line_In_user.c
+1
-1
PowerManagement.c
source/Application/APP/PowerManagement/PowerManagement.c
+3
-3
PowerManagement_user.c
...ce/Application/APP/PowerManagement/PowerManagement_user.c
+43
-36
SEG_DISPLAY.c
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
+57
-34
Telltales_user.c
source/Application/APP/Telltales/Telltales_user.c
+1
-1
CAN_FUNC.c
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.c
+2
-9
FlashCheckSum.c
source/Application/Graphic/GUI/FlashCheckSum.c
+81
-0
FlashCheckSum.h
source/Application/Graphic/GUI/FlashCheckSum.h
+12
-0
GUI.c
source/Application/Graphic/GUI/GUI.c
+94
-1
GUI.h
source/Application/Graphic/GUI/GUI.h
+2
-0
DisplaySch_user.c
source/Application/Graphic/UE/DisplaySch_user.c
+13
-4
Common_Interface.c
source/Application/RTE/Common_Interface.c
+30
-1
CD4051.c
source/Driver/CD4051/CD4051.c
+9
-44
CD4051.h
source/Driver/CD4051/CD4051.h
+2
-2
Graphic.c
source/Driver/Graphic/Graphic.c
+114
-103
Graphic.h
source/Driver/Graphic/Graphic.h
+18
-21
init.c
source/System/init.c
+9
-3
No files found.
ghs/group/Application.gpj
View file @
9fc2cca7
...
...
@@ -11,6 +11,8 @@
.\Graphic\GUI\GUI.h
.\Graphic\GUI\GUI_Interface.c
.\Graphic\GUI\GUI_Interface.h
.\Graphic\GUI\FlashCheckSum.c
.\Graphic\GUI\FlashCheckSum.h
.\Alarm\AlarmGeneralFilie.c
.\Alarm\AlarmGeneralFilie.h
.\Alarm\Door.c
...
...
source/Application/APP/GaugesMode/GaugesInterface.c
View file @
9fc2cca7
...
...
@@ -5,7 +5,7 @@
*/
#include "Common_Interface.h"
#define Self_time
90
0u
#define Self_time
45
0u
static
const
uint16_t
GaugesDataInInit
[
GaugesTotal
][
3
][
25
]
=
{
...
...
source/Application/APP/Key/Key.c
View file @
9fc2cca7
...
...
@@ -310,7 +310,7 @@ void Key_Init(void)
stKeyParameter
.
u16KeyLoosenTime
=
100U
;
stKeyParameter
.
u16KeyShortPressTime
=
80U
;
stKeyParameter
.
u16KeyLongPressTime
=
1000U
;
stKeyParameter
.
u16KeySuperLongPressTime
=
5
000U
;
stKeyParameter
.
u16KeySuperLongPressTime
=
3
000U
;
stKeyParameter
.
u16KeyValidOFFTime
=
200U
;
/*按键动作时间*/
stKeyParameter
.
u16KeyValidONTime
=
1000U
;
}
...
...
source/Application/APP/LINE_IN/Line_In_user.c
View file @
9fc2cca7
...
...
@@ -42,7 +42,7 @@ const Line_In_Attribute_st_t g_stLineInAttribute[LINE_IN_MAX] =
/*指示灯信号 硬线输入*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ABS
,},
/*A22 ABS*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_PARK_BRAKE
,},
/*A23 PARK BRAKE*/
{
LINE_IN_LEVEL_HIGH
,
20
0U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_HI_BEAM
,},
/*A25 HI BEAM*/
{
LINE_IN_LEVEL_HIGH
,
6
0U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_HI_BEAM
,},
/*A25 HI BEAM*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_BRAKE_AIR_EBS
,},
/*A28 BRAKE AIR/EBS*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_SEAT_BELT
,},
/*A30 SEAT BELT*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_MIL
,},
/*A31 MIL*/
...
...
source/Application/APP/PowerManagement/PowerManagement.c
View file @
9fc2cca7
...
...
@@ -27,21 +27,21 @@ void Power_Management_Service ( void )
case
m_IGN_OFF_Init
:
Power_IG_OFF_Init
();
g_Power_St
=
m_IGN_OFF
;
//break;
//break;
case
m_IGN_OFF
:
g_Power_St
=
Power_Stay_OFF
();
break
;
case
m_IGN_Sleep_Init
:
Power_Sleep_Init
();
g_Power_St
=
m_IGN_Sleep
;
//break;
//break;
case
m_IGN_Sleep
:
g_Power_St
=
Power_Stay_Sleep
();
break
;
case
m_IGN_ON_Init
:
Power_IG_ON_Init
();
g_Power_St
=
m_IGN_ON
;
//break;
//break;
case
m_IGN_ON
:
g_Power_St
=
Power_Stay_ON
();
break
;
...
...
source/Application/APP/PowerManagement/PowerManagement_user.c
View file @
9fc2cca7
...
...
@@ -57,6 +57,8 @@
#include "Analog_Signals.h"
#include "BGLInterface.h"
#include "BU98R10.h"
#include "RSCAN.h"
#include "RSCAN_Table.h"
#define POWER_NM_SLEEP 0U
#define POWER_NM_WAKEUP 1U
...
...
@@ -69,7 +71,7 @@ Power_Status_t Power_KL30_Init ( void )
Power_Status_t
u8PowerSts
;
RTE_RTC_KL30_Init
();
CD4051B_KL15Init
();
/*电源 指示灯 硬线 通用信息部分 赵建智 维护开始*/
ClearNoInitArea
();
Common_DataInit
();
Sys_KL30_Init
();
...
...
@@ -78,51 +80,30 @@ Power_Status_t Power_KL30_Init ( void )
Telltales_KL30_Init
();
SEG_BUFF_Init
();
DispSch_TotalInit
();
/*电源 指示灯 硬线 通用信息部分 赵建智 维护结束*/
/*车速 转速 水温表头 初始化 田雨 维护开始*/
UserGaugeK30Init
();
/*车速 转速 水温表头 初始化 田雨 维护开始*/
/*里程 大小计部分 刘明月 胡志松 辛雨 维护开始*/
Service_OFF_Timing_KL30Init
();
Data_User_Mileage_KL30Init
();
Data_AvgSpeed_KL30_Init
();
Data_Maintenance_Service_KL30_Init
();
/*里程 大小计部分 刘明月 胡志松 辛雨 维护结束*/
/*室外温度 胎压部分 档位 清大计 报警 对时 胡迎秋 维护开始*/
Data_AC_Temp_KL30_Init
();
Data_TPMS_KL30_Init
();
Data_Gear_KL30_Init
();
Data_ODO_Clear_KL30Init
();
/*室外温度 胎压部分 档位 清大计 报警 对时 胡迎秋 维护结束*/
/*安全带 车门部分 李茂军维护开始*/
SeatbeltInit
();
Door_WakeUpInit
();
/*安全带 车门部分 李茂军维护结束*/
/*按键部分 杨真东维护开始*/
Key_Init
();
VCC12V0_OUT_EN
=
1U
;
/*12V 电源使能*/
D1530_EN_MCU_OUT
=
1U
;
/*1530 使能*/
//BL_ACC_EN = 1U; /*8867 使能*/
Fuel_VCC05V_OUT_EN
=
1U
;
/*燃油电源 使能*/
AIR_5V_OUT_EN
=
1u
;
/*气压 5V*/
ACC5V_LED_PWM_MCU
=
1u
;
BUZZER_ACC_OUT_EN
=
1u
;
LED_Driver_Init
();
Sound_Scheduler_Init
();
Sound_Player_Init
();
RTE_PWM_Init
();
/*按键部分 杨真东维护结束*/
/*报警调度初始化*/
Popup_Scheduler_Init
();
/*报警调度初始化*/
/*5s不按按键计时清零*/
//LongTimeNoKey_Operation_TimeRest();
...
...
@@ -147,7 +128,7 @@ void Power_Sleep_Init(void)
/*外设*/
Seg_Display_OFF
();
UART_Sleep_Init
();
Buzzer_Shutdown
();
/*蜂鸣器*/
TimerB_PWM_Channel_Sleep
(
TIMERB_0_CH15
);
...
...
@@ -156,6 +137,39 @@ void Power_Sleep_Init(void)
TimerB_PWM_Channel_Sleep
(
TIMERB_1_CH15
);
TimerB_PWM_Channel_Sleep
(
TIMERB_0_CH7
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_0
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_1
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_2
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_3
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_4
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_5
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_6
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_7
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_8
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_9
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_10
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_11
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_12
);
RSCAN0_CH0_Abort
(
RSCAN_CHANNEL_BUF_13
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_0
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_1
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_2
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_3
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_4
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_5
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_6
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_7
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_8
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_9
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_10
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_11
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_12
);
RSCAN0_CH2_Abort
(
RSCAN_CHANNEL_BUF_13
);
RSCAN0_CH0_Sleep_Init
();
RSCAN0_CH2_Sleep_Init
();
VCC12V0_OUT_EN
=
0u
;
/*12V 电源使能*/
VCC05V0_OUT_EN
=
0u
;
/*外设5V 电源使能*/
D1530_EN_MCU_OUT
=
0u
;
/*1530 使能*/
...
...
@@ -174,7 +188,7 @@ Power_Status_t Power_Wakeup_Init ( void )
Kwp2000_Init
();
Power_Status_t
u8PowerSts
;
/*电源 指示灯 硬线 通用信息部分 赵建智 维护开始*/
Common_DataInit
();
Sys_WakeUp_Init
();
Line_In_KL30_Init
();
...
...
@@ -182,30 +196,23 @@ Power_Status_t Power_Wakeup_Init ( void )
Telltales_KL30_Init
();
SEG_BUFF_Init
();
DispSch_TotalInit
();
/*电源 指示灯 硬线 通用信息部分 赵建智 维护结束*/
Telltales_Wakeup_Init
();
Data_Time_WakeUp_Init
();
/*车速 转速 水温表头 初始化 田雨 维护开始*/
UserGaugeK30Init
();
/*车速 转速 水温表头 初始化 田雨 维护开始*/
Data_User_Mileage_KL15Init
();
Maintenance_WakeUp_Init
();
/*安全带 车门部分 李茂军维护开始*/
SeatbeltInit
();
Door_WakeUpInit
();
/*安全带 车门部分 李茂军维护结束*/
RTE_PWM_Init
();
/*燃油新增 ----20220503----*/
Fuel_User_Wakeup_Init
();
VCC12V0_OUT_EN
=
1u
;
/*12V 电源使能*/
D1530_EN_MCU_OUT
=
1u
;
/*1530 使能*/
//BL_ACC_EN = 1U; /*8867 使能*/
Fuel_VCC05V_OUT_EN
=
1u
;
/*燃油电源 使能*/
AIR_5V_OUT_EN
=
1u
;
/*气压 5V*/
ACC5V_LED_PWM_MCU
=
1u
;
BUZZER_ACC_OUT_EN
=
1u
;
LED_Driver_Init
();
/*报警调度初始化*/
Popup_Scheduler_Init
();
...
...
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
View file @
9fc2cca7
...
...
@@ -18,8 +18,6 @@
#define TACHO_SEG_NUM_MAX 27U
#define VEH_SEG_NUM_MAX 30U
static
uint8_t
GaugesTimer
;
static
void
Seg_General_Digit_Display
(
uint32_t
Digit
,
uint8_t
Len
,
uint8_t
Blank
,
uint8_t
*
DigitBuf
,
uint8_t
*
Reg
);
static
void
Seg_Digit_1_Disp
(
uint8_t
Digit
);
static
void
Seg_Digit_2_Disp
(
uint8_t
Digit
);
...
...
@@ -1018,9 +1016,6 @@ static void Seg_General_Digit_Display(uint32_t Digit, uint8_t Len, uint8_t Blank
}
}
static
uint8_t
wbyTestSeg
=
0
;
static
uint16_t
wbyTestNum
;
static
uint8_t
IC_TEST
=
0
;
/******************************************************************************
Seg_Display_Service 在 20MS任务中
信号接口:
...
...
@@ -1029,6 +1024,10 @@ Seg_Display_Service 在 20MS任务中
******************************************************************************/
void
Seg_Display_Service
(
void
)
{
static
uint16_t
Vspeed_Val
=
0u
;
static
uint8_t
CurrencyTimer
;
static
uint8_t
TempTimer
;
static
uint8_t
SpeedTimer
;
uint32_t
Ign_Time
;
uint16_t
m16_FrameCnt
;
...
...
@@ -1054,21 +1053,22 @@ void Seg_Display_Service(void)
Seg_Digit_2_Disp
(
12
);
Seg_Digit_3_Disp
(
12
);
GaugesTimer
=
5u
;
CurrencyTimer
=
0u
;
TempTimer
=
0u
;
SpeedTimer
=
0u
;
}
else
{
SEG_A25_Disp
(
7u
);
/*左侧弧线*/
SEG_C25_Disp
(
7u
);
/*右侧弧线*/
if
(
Ign_Time
<
StartAnimationEnd
)
if
(
Ign_Time
<
PopupStart
)
{
m16_FrameCnt
=
Common_GetHMI_StartAnimationFrameCnt
();
m16_FrameCnt
=
m16_FrameCnt
/
4u
;
if
(
m16_FrameCnt
>=
FRAMECNTFLAG
)
{
SEG_PRI_Display
(
GetGaugesCurrentPos
(
PRIGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
/*PRI气压格*/
SEG_SEC_Display
(
GetGaugesCurrentPos
(
SECGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
/*SEC气压格*/
SEG_Coolant_Display
(
GetGaugesCurrentPos
(
TempGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
/*水温格*/
...
...
@@ -1082,51 +1082,74 @@ void Seg_Display_Service(void)
Seg_Digit_3_Disp
(
12
);
}
GaugesTimer
=
5u
;
CurrencyTimer
=
0u
;
TempTimer
=
0u
;
SpeedTimer
=
0u
;
}
else
if
(
GaugesTimer
==
0u
)
else
{
GaugesTimer
=
5u
;
if
(
Common_Get_Air1_Valid
())
if
(
CurrencyTimer
==
0u
)
{
SEG_PRI_Display
(
GetGaugesCurrentPos
(
PRIGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
// PRI气压格
CurrencyTimer
=
5u
;
if
(
Common_Get_Air1_Valid
())
{
SEG_PRI_Display
(
GetGaugesCurrentPos
(
PRIGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
// PRI气压格
}
else
{
SEG_PRI_Display
(
GetGaugesCurrentPos
(
PRIGasGauges
),
GUI_DISP_MODE_INVALID
,
7u
);
// PRI气压格
}
if
(
Common_Get_Air2_Valid
())
{
SEG_SEC_Display
(
GetGaugesCurrentPos
(
SECGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
// SEC气压格
}
else
{
SEG_SEC_Display
(
GetGaugesCurrentPos
(
SECGasGauges
),
GUI_DISP_MODE_INVALID
,
7u
);
// SEC气压格
}
SEG_Fuel_Display
(
Fuel_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//燃油格
SEG_Tacho_Display
(
Tacho_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//转速格
SEG_VehicleSpeed_Display
(
Speed_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//车速格
}
else
{
SEG_PRI_Display
(
GetGaugesCurrentPos
(
PRIGasGauges
),
GUI_DISP_MODE_INVALID
,
7u
);
// PRI气压格
CurrencyTimer
--
;
}
if
(
Common_Get_Air2_Valid
()
)
if
(
TempTimer
==
0
)
{
SEG_SEC_Display
(
GetGaugesCurrentPos
(
SECGasGauges
),
GUI_DISP_MODE_NORMAL
,
7u
);
// SEC气压格
TempTimer
=
2
;
if
(
Coolant_Get_Valid
())
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//水温格
}
else
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_INVALID
,
7u
);
//水温格
}
}
else
{
SEG_SEC_Display
(
GetGaugesCurrentPos
(
SECGasGauges
),
GUI_DISP_MODE_INVALID
,
7u
);
// SEC气压格
TempTimer
--
;
}
if
(
Coolant_Get_Valid
()
)
if
(
SpeedTimer
==
0
)
{
SEG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//水温格
SpeedTimer
=
10
;
Vspeed_Val
=
Common_Get_Disp_V_Speed
();
SEG_VehicleSpeed_Num
(
Vspeed_Val
,
GUI_DISP_MODE_NORMAL
);
//车速值
}
else
{
S
EG_Coolant_Display
(
Coolant_Get_CurSeg
(),
GUI_DISP_MODE_INVALID
,
7u
);
//水温格
S
peedTimer
--
;
}
SEG_Fuel_Display
(
Fuel_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//燃油格
SEG_Tacho_Display
(
Tacho_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//转速格
SEG_VehicleSpeed_Display
(
Speed_Get_CurSeg
(),
GUI_DISP_MODE_NORMAL
,
7u
);
//车速格
wbyTestNum
=
Common_Get_Disp_V_Speed
();
SEG_VehicleSpeed_Num
(
wbyTestNum
,
GUI_DISP_MODE_NORMAL
);
//车速值
}
else
{
GaugesTimer
--
;
}
}
}
...
...
source/Application/APP/Telltales/Telltales_user.c
View file @
9fc2cca7
...
...
@@ -571,7 +571,7 @@ void LED_MIL_T_Execution(uint8_t led_status)
{
if
(
led_status
==
1
)
{
LED_Driver_Channel_Set
(
0u
,
30u
,
LED_BRIGHTNESSY
);
LED_Driver_Channel_Set
(
0u
,
30u
,
0xFFu
);
SEG_LED_MIL_T
(
7
);
}
else
...
...
source/Application/CAN_APP_NM/CAN_App/CAN_FUNC.c
View file @
9fc2cca7
...
...
@@ -176,15 +176,8 @@ void Can_Set_Buff_18FEAE17(uint8_t CopyData[])
/*电源电压*/
Power_Supply_Voltage
=
0u
;
/*驻车制动外发*/
if
(
Line_In_Get_Status
(
LINE_IN_PARK_BRAKE
)
==
0u
)
{
Parking_Brake_Switch
=
1u
;
}
else
{
Parking_Brake_Switch
=
0u
;
}
/*驻车制动外发*//*18FEAE17 byte8 bit 8-7 要改成,悬空=00 接地=01 20230114*/
Parking_Brake_Switch
=
Line_In_Get_Status
(
LINE_IN_PARK_BRAKE
);
Rader_Stain_Information
=
0u
;
SW_ECONO
=
0u
;
...
...
source/Application/Graphic/GUI/FlashCheckSum.c
0 → 100644
View file @
9fc2cca7
#include "FlashCheckSum.h"
#include "dr7f701441.dvf.h"
#include "Watchdog.h"
static
unsigned
int
SwapData_32
(
unsigned
int
Data
)
{
unsigned
int
RetVal
=
Data
;
RetVal
=
((
RetVal
>>
1
)
&
0x55555555
)
|
((
RetVal
<<
1
)
&
0xaaaaaaaa
);
RetVal
=
((
RetVal
>>
2
)
&
0x33333333
)
|
((
RetVal
<<
2
)
&
0xcccccccc
);
RetVal
=
((
RetVal
>>
4
)
&
0x0f0f0f0f
)
|
((
RetVal
<<
4
)
&
0xf0f0f0f0
);
RetVal
=
((
RetVal
>>
8
)
&
0x00ff00ff
)
|
((
RetVal
<<
8
)
&
0xff00ff00
);
RetVal
=
((
RetVal
>>
16
)
&
0x0000ffff
)
|
((
RetVal
<<
16
)
&
0xffff0000
);
return
RetVal
;
}
unsigned
int
CRC32_VAL
;
static
void
CheckCrc32
(
unsigned
char
*
buf
,
int
len
)
{
int
i
;
int
n
=
0
;
unsigned
char
tmp
=
0
;
unsigned
int
crc
=
CRC32_VAL
;
// Initial value
for
(
n
=
0
;
n
<
len
;
n
++
)
{
tmp
=
buf
[
n
];
tmp
=
(
tmp
>>
4
)
|
(
tmp
<<
4
);
tmp
=
(((
tmp
&
0xcc
)
>>
2
)
|
((
tmp
&
0x33
)
<<
2
));
tmp
=
(((
tmp
&
0xaa
)
>>
1
)
|
((
tmp
&
0x55
)
<<
1
));
crc
^=
(
unsigned
int
)(
tmp
)
<<
24
;
for
(
i
=
0
;
i
<
8
;
++
i
)
{
if
(
crc
&
0x80000000L
)
{
crc
=
(
crc
<<
1
)
^
0x04C11DB7
;
}
else
{
crc
<<=
1
;
}
}
}
CRC32_VAL
=
crc
;
return
;
}
unsigned
char
CheckSpiFlashCRC
(
void
)
{
unsigned
char
TmpRet
=
0
;
unsigned
int
BinCrc
=
REAL_FLASHCHECKSUM
;
//*((unsigned int *)(SPI_START_ADDR + 0x8u));
unsigned
int
BinCrcLen
=
SPI_ADDR_RANGE
;
//*((unsigned int *)(SPI_START_ADDR));
unsigned
int
CheckCrcAddr
=
SPI_START_ADDR
;
//SPI_START_ADDR + 0x20u;
unsigned
int
tmp
;
unsigned
int
CheckCrc
=
0
;
unsigned
int
i
;
unsigned
int
EndData
=
0
;
DCRA0ISZ
=
0
;
DCRA0POL
=
0
;
DCRA0COUT
=
0xffffffff
;
if
(
/*(BinCrcLen > 0x00000020) && */
(
BinCrcLen
<
0x08000000
))
{
for
(
i
=
0
;
i
<
(
BinCrcLen
/
4
);
i
++
)
{
WDT_Clear
();
tmp
=
*
((
unsigned
int
*
)(
CheckCrcAddr
+
(
i
*
4
)));
DCRA0CIN
=
tmp
;
CheckCrc
=
DCRA0COUT
;
}
tmp
=
*
((
unsigned
int
*
)(
CheckCrcAddr
+
(
i
*
4
)));
if
(
BinCrcLen
%
4
!=
0u
)
{
CheckCrc
=
CheckCrc
^
0xffffffff
;
CheckCrc
=
SwapData_32
(
CheckCrc
);
CRC32_VAL
=
CheckCrc
;
CheckCrc32
(
&
tmp
,
BinCrcLen
%
4
);
CheckCrc
=
SwapData_32
(
CRC32_VAL
);
CheckCrc
=
CheckCrc
^
0xffffffff
;
}
if
(
CheckCrc
==
BinCrc
)
{
TmpRet
=
1
;
}
}
return
TmpRet
;
}
\ No newline at end of file
source/Application/Graphic/GUI/FlashCheckSum.h
0 → 100644
View file @
9fc2cca7
#ifndef __FLASHCHECKSUM_H_
#define __FLASHCHECKSUM_H_
#define REAL_FLASHCHECKSUM 0xBF69240C
#define SPI_START_ADDR 0x10000000u
#define SPI_ADDR_RANGE 0x04222DA0
unsigned
char
CheckSpiFlashCRC
(
void
);
#endif
\ No newline at end of file
source/Application/Graphic/GUI/GUI.c
View file @
9fc2cca7
...
...
@@ -35,6 +35,8 @@
#include "GPIO.h"
#include "DisplaySch_user.h"
#include "DispSch.h"
#include "FlashCheckSum.h"
#include "Graphic.h"
#pragma alignvar(8)
uint32_t
EolNUM
[
10u
][
8u
];
...
...
@@ -96,7 +98,6 @@ void GUI_Display_background(void)
void
GUI_Display_backgroundOFF
(
void
)
{
GUI_General_Display
(
WET_Sprite
,
quanping_black
,
GUI_BLENDMODE_CUSTOM
);
GUI_General_Display
(
WET_Sprite
,
SpriteSize
,
GUI_BLENDMODE_CUSTOM
);
GUI_General_Display
(
AdBlue_Sprite
,
SpriteSize
,
GUI_BLENDMODE_CUSTOM
);
GUI_General_Display
(
TRIP_Sprite
,
SpriteSize
,
GUI_BLENDMODE_CUSTOM
);
...
...
@@ -10322,4 +10323,96 @@ void Common_Set_DTCNumTime(uint32_t Vol)
{
DTCNumTime
=
Vol
;
DTCDispNum
=
Vol
;
}
uint8_t
Flash_time
=
0
;
uint16_t
Color_Time
=
0
;
// 20 更换一次颜色
void
Gui_Display_Test
(
void
)
{
uint16_t
Get_Data_Veh_value
=
0u
;
uint16_t
Get_Data_Rev_value
=
0u
;
uint16_t
Get_Data_Veh_valueMax
=
0u
;
uint16_t
Get_Data_Rev_valueMax
=
0u
;
uint32_t
TmpRet
=
0
;
/*获取的是步数,与当前步数*/
Get_Data_Veh_value
=
GetGaugesCurrentPos
(
VehGauges
)
;
Get_Data_Veh_valueMax
=
GetGaugesMaxOutVal
(
VehGauges
)
;
Get_Data_Rev_value
=
GetGaugesCurrentPos
(
RevGauges
)
;
Get_Data_Rev_valueMax
=
GetGaugesMaxOutVal
(
RevGauges
)
;
//if (( Get_Data_Veh_value >= Get_Data_Veh_valueMax ) && ( Get_Data_Rev_value >= Get_Data_Rev_valueMax ))
{
while
(
1
)
{
WDT_Clear
();
if
(
Flash_time
<
30
)
{
Flash_time
++
;
}
else
{
if
(
Color_Time
>=
0
&&
Color_Time
<
20
)
{
//蓝色
Loc_Display_Red
(
0
,
0
,
0XFF
);
}
else
if
(
Color_Time
>=
20
&&
Color_Time
<
40
)
{
//绿色
Loc_Display_Red
(
0
,
0XFF
,
0
);
}
else
if
(
Color_Time
>=
40
&&
Color_Time
<
60
)
{
//黄色
Loc_Display_Red
(
0xFF
,
0XFF
,
0
);
}
else
if
(
Color_Time
>=
60
&&
Color_Time
<
80
)
{
//红色
Loc_Display_Red
(
0XFF
,
0
,
0
);
}
else
if
(
Color_Time
>=
80
&&
Color_Time
<
100
)
{
//黑色
Loc_Display_Red
(
0
,
0
,
0
);
}
else
if
(
Color_Time
>=
100
&&
Color_Time
<
120
)
{
//白色
Loc_Display_Red
(
0xFF
,
0xFF
,
0XFF
);
}
else
if
(
Flash_time
==
30
)
{
Flash_time
=
250
;
TmpRet
=
CheckSpiFlashCRC
();
if
(
TmpRet
==
0
)
{
Loc_Display_Red
(
0XFF
,
0
,
0
);
}
else
{
//检验正常。恢复显示正常界面
if
(
Color_Time
==
120
)
{
Loc_Display_Red
(
1
,
1
,
1
);
Flash_time
=
0
;
Color_Time
=
0
;
break
;
}
}
}
if
(
Color_Time
<
120
)
{
Color_Time
++
;
}
}
}
}
}
\ No newline at end of file
source/Application/Graphic/GUI/GUI.h
View file @
9fc2cca7
...
...
@@ -556,6 +556,8 @@ void K_LINE_EOL_Val_Server(void); /**/
void
Common_Set_MenuDTCNumTime
(
uint32_t
Vol
);
void
Common_Set_DTCNumTime
(
uint32_t
Vol
);
void
Gui_Display_Test
(
void
);
/*-----报警--------------------------------------------------------*/
void
GUI_General_Popup
(
void
);
void
GUI_General_Popup_Display
(
uint16_t
PopupMsg
);
...
...
source/Application/Graphic/UE/DisplaySch_user.c
View file @
9fc2cca7
...
...
@@ -25,6 +25,7 @@ uint8_t BG_display_flag;
uint16_t
HMI_StartAnimationFrameCnt
;
uint8_t
backgroundOFFFlag
;
uint8_t
BackOdoFlagSta
;
static
void
switch_branch
(
void
);
...
...
@@ -182,13 +183,20 @@ void DisplayServices(void)
{
HMI_Clear_KEY_CONFIRM
();
}
/*确认超长
5
S*/
/*确认超长
3
S*/
else
if
(
UE_CtrlInfo
.
HMI_KEYInfo
.
u8KEY_CONFIRM
==
KEY_EVENT_SUPER_LONG_PRESS
)
{
HMI_Clear_KEY_CONFIRM
();
HMI_Clear_KEY_CONFIRM
();
if
(
BackOdoFlagSta
==
0
)
{
HMI_Clear_KEY_CONFIRM
();
/*TYW总计清零*/
TYW_Data_ODO_Clear
();
Gui_Display_Test
();
/*TYW总计清零*/
BackOdoFlagSta
=
1
;
TYW_Data_ODO_Clear
();
}
}
/*返回短*/
else
if
(
UE_CtrlInfo
.
HMI_KEYInfo
.
u8KEY_CANCEL
==
KEY_EVENT_SHORT_PRESS
)
...
...
@@ -242,6 +250,7 @@ void Display_StartAnimationEnter(void)
HMI_StartAnimationFrameCnt
=
0u
;
backgroundOFFFlag
=
0
;
MenuFlag
.
Menu_Popup_Flag
=
0u
;
BackOdoFlagSta
=
0
;
/*硬清空所有缓存数据*/
loc_free_mem
(
MENU_Sprite
,
MENU_Sprite
);
...
...
source/Application/RTE/Common_Interface.c
View file @
9fc2cca7
...
...
@@ -265,7 +265,35 @@ static void Common_Set_Act_E_Speed(uint16_t Val)
}
static
void
Common_Set_Disp_V_Speed
(
uint16_t
Val
)
{
Disp_V_Speed
=
Val
;
static
uint16_t
Vspeed_ReflashTime
=
0
;
static
uint16_t
Vspeed_Val
=
0
;
if
((
Vspeed_ReflashTime
>
0
)
&&
(
Vspeed_Val
!=
Val
))
{
Vspeed_ReflashTime
--
;
}
if
(
Vspeed_ReflashTime
==
0
)
{
if
(
Vspeed_Val
<
Val
)
{
Vspeed_ReflashTime
=
50
/
(
Val
-
Vspeed_Val
);
Vspeed_Val
++
;
}
else
if
(
Vspeed_Val
>
Val
)
{
Vspeed_ReflashTime
=
50
/
(
Vspeed_Val
-
Val
);
Vspeed_Val
--
;
}
else
{
Vspeed_ReflashTime
=
500
;
}
}
Disp_V_Speed
=
Vspeed_Val
;
}
static
void
Common_Set_Disp_E_Speed
(
uint16_t
Val
)
{
...
...
@@ -341,6 +369,7 @@ void Common_Input_Para(void)
/*车速*/
wbyTest
=
Speed_Get_Display_Value
();
Common_Set_Disp_V_Speed
(
wbyTest
);
Common_Set_Act_V_Speed
(
Speed_Get_ActualValue
());
...
...
source/Driver/CD4051/CD4051.c
View file @
9fc2cca7
...
...
@@ -147,62 +147,27 @@ void CD4051B_Debounce_Service(void)
CD4051CtrStr
[
comcnt
][
chcnt
].
time
++
;
if
(
CD4051B_GeneralCOM_Cache
[
comcnt
][
chcnt
]
==
1u
)
{
/*特殊*/
if
((
comcnt
==
COM3
)
&&
(
chcnt
==
Channel5
))
if
(
CD4051CtrStr
[
comcnt
][
chcnt
].
time
>=
CD4051B_DEBOUNCE_High_CNT
)
{
if
(
CD4051CtrStr
[
comcnt
][
chcnt
].
time
>=
2
)
{
CD4051CtrStr
[
comcnt
][
chcnt
].
time
=
0u
;
CD4051B_GeneralCOM_Value
[
comcnt
][
chcnt
]
=
1u
;
}
else
{
;
}
CD4051CtrStr
[
comcnt
][
chcnt
].
time
=
0u
;
CD4051B_GeneralCOM_Value
[
comcnt
][
chcnt
]
=
1u
;
}
/*一般*/
else
{
if
(
CD4051CtrStr
[
comcnt
][
chcnt
].
time
>=
CD4051B_DEBOUNCE_High_CNT
)
{
CD4051CtrStr
[
comcnt
][
chcnt
].
time
=
0u
;
CD4051B_GeneralCOM_Value
[
comcnt
][
chcnt
]
=
1u
;
}
else
{
;
}
;
}
}
else
{
/*特殊*/
if
((
comcnt
==
COM3
)
&&
(
chcnt
==
Channel5
))
if
(
CD4051CtrStr
[
comcnt
][
chcnt
].
time
>=
CD4051B_DEBOUNCE_Low_CNT
)
{
if
(
CD4051CtrStr
[
comcnt
][
chcnt
].
time
>=
2
)
{
CD4051CtrStr
[
comcnt
][
chcnt
].
time
=
0u
;
CD4051B_GeneralCOM_Value
[
comcnt
][
chcnt
]
=
0u
;
}
else
{
;
}
CD4051CtrStr
[
comcnt
][
chcnt
].
time
=
0u
;
CD4051B_GeneralCOM_Value
[
comcnt
][
chcnt
]
=
0u
;
}
/*一般*/
else
{
if
(
CD4051CtrStr
[
comcnt
][
chcnt
].
time
>=
CD4051B_DEBOUNCE_Low_CNT
)
{
CD4051CtrStr
[
comcnt
][
chcnt
].
time
=
0u
;
CD4051B_GeneralCOM_Value
[
comcnt
][
chcnt
]
=
0u
;
}
else
{
;
}
;
}
}
}
...
...
source/Driver/CD4051/CD4051.h
View file @
9fc2cca7
...
...
@@ -15,8 +15,8 @@
#define CD4051B_InputGOIO_Com6 CD4051A_COM6_MCU_IN
#define CD4051B_InputGOIO_Com7 CD4051A_COM7_MCU_IN
#define CD4051B_DEBOUNCE_High_TIME 20
0
u
#define CD4051B_DEBOUNCE_Low_TIME 20
0
u
#define CD4051B_DEBOUNCE_High_TIME 20u
#define CD4051B_DEBOUNCE_Low_TIME 20u
#define CD4051B_DEBOUNCE_High_CNT CD4051B_DEBOUNCE_High_TIME / 20u
#define CD4051B_DEBOUNCE_Low_CNT CD4051B_DEBOUNCE_Low_TIME / 20u
/*通道枚举*/
...
...
source/Driver/Graphic/Graphic.c
View file @
9fc2cca7
This diff is collapsed.
Click to expand it.
source/Driver/Graphic/Graphic.h
View file @
9fc2cca7
...
...
@@ -29,13 +29,13 @@
#define GFX_DHD_USE_PC (1U)
/* Use performance counters: Set to 1 to reserve memory for performance counters */
#define GFX_DHD_STATE_STORAGE (480U)
/* one DHD context with a config with 2 tex units, 3 color unit passes and 4 const colors */
/* CAUTION: you have to adapt this when using dhd_alloc* manually, when using
* DHD performance counter or when using DHD command list feature!
/* CAUTION: you have to adapt this when using dhd_alloc* manually, when using
* DHD performance counter or when using DHD command list feature!
*
* Example: Each of the 4 available performance counters requires allocation of 4 bytes.
Allocation is aligned to 128 bytes, thus for four PC's 512 additional bytes are required.
*/
#define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U)
#define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U)
#define GFX_DHD_STATE_STORAGE_ALLOC GFX_DHD_ALIGN(GFX_DHD_STATE_STORAGE, 128U)
#define GFX_DHD_PC_ALLOC GFX_DHD_ALIGN(GFX_DHD_USE_PC * 4U * 128U, 128U)
#define GFX_DHD_MEMORY_SIZE (GFX_DHD_RING_SIZE_ALLOC + \
...
...
@@ -114,16 +114,16 @@
#define GFX_DHD_JOB_SIZE (512U) /* Jobsize: Number of bytes in one job buffer */
#define GFX_DHD_JOB_COUNT (8U) /* Jobcount: Recommended number of jobs in flight per client */
#define GFX_DHD_RING_SIZE (1024U) /* Ringsize: Number of bytes in ringbuffer, needs to be a power of two */
#define GFX_DHD_USE_PC (1U) Use performance counters: Set to 1 to reserve memory for performance counters
#define GFX_DHD_USE_PC (1U) Use performance counters: Set to 1 to reserve memory for performance counters
#define GFX_DHD_STATE_STORAGE (480U) /* one DHD context with a config with 2 tex units, 3 color unit passes and 4 const colors */
/* CAUTION: you have to adapt this when using dhd_alloc* manually, when using
* DHD performance counter or when using DHD command list feature!
/* CAUTION: you have to adapt this when using dhd_alloc* manually, when using
* DHD performance counter or when using DHD command list feature!
*
* Example: Each of the 4 available performance counters requires allocation of 4 bytes.
Allocation is aligned to 128 bytes, thus for four PC's 512 additional bytes are required.
*/
#define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U)
#define GFX_DHD_RING_SIZE_ALLOC GFX_DHD_ALIGN(GFX_DHD_RING_SIZE + 4U, 128U)
#define GFX_DHD_STATE_STORAGE_ALLOC GFX_DHD_ALIGN(GFX_DHD_STATE_STORAGE, 128U)
#define GFX_DHD_PC_ALLOC GFX_DHD_ALIGN(GFX_DHD_USE_PC * 4U * 128U, 128U)
#define GFX_DHD_MEMORY_SIZE (GFX_DHD_RING_SIZE_ALLOC + \
...
...
@@ -155,19 +155,16 @@ extern void Gfx_Init(uint8_t u8Mode);
extern
void
Gfx_Sys_Start
(
void
);
extern
void
Gfx_Sys_Stop
(
void
);
extern
void
Gfx_Create_Window
(
r_wm_WinMode_t
enMode
,
uint32_t
u32PosX
,
uint32_t
u32PosY
,
uint32_t
u32PosZ
,
uint32_t
u32Width
,
uint32_t
u32Height
,
uint32_t
u32Pitch
,
uint32_t
u32Bnumber
,
r_wm_WinColorFmt_t
enColorFmt
,
r_wm_Window_t
*
pstWindow
);
uint32_t
u32PosX
,
uint32_t
u32PosY
,
uint32_t
u32PosZ
,
uint32_t
u32Width
,
uint32_t
u32Height
,
uint32_t
u32Pitch
,
uint32_t
u32Bnumber
,
r_wm_WinColorFmt_t
enColorFmt
,
r_wm_Window_t
*
pstWindow
);
void
Loc_Display_Red
(
uint8_t
ColorR
,
uint8_t
ColorG
,
uint8_t
ColorB
);
#endif
/* GRAPHIC_H__ */
source/System/init.c
View file @
9fc2cca7
...
...
@@ -135,12 +135,18 @@ void Sys_Startup_Init(void)
Sys_Tick_Timer_Start
();
/*COM_CAN_Init(); ÔCAN³õʼ»¯Î»ÖÃ*/
IGH_5VLED
=
1
;
RTE_ADC_Init
();
VCC05V0_OUT_EN
=
1u
;
/*外设5V 电源使能 3-2*/
DelayUs
(
50000
);
IGH_5VLED
=
1
;
/* 42-7*/
DelayUs
(
50000
);
DelayUs
(
50001
);
VCC12V0_OUT_EN
=
1u
;
/*12V 电源使能 3-3*/
D1530_EN_MCU_OUT
=
1u
;
/*1530 使能 42-14*/
Fuel_VCC05V_OUT_EN
=
1u
;
/*燃油电源 使能 3-5*/
AIR_5V_OUT_EN
=
1u
;
/*气压 5V 3-4*/
ACC5V_LED_PWM_MCU
=
1u
;
/*42-6*/
BUZZER_ACC_OUT_EN
=
1u
;
/*3-6*/
Int_Flash_Init
();
SEG_BUFF_Init
();
...
...
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