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
0d1dff89
Commit
0d1dff89
authored
Oct 20, 2021
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整指示灯,调整硬线
parent
e339f97b
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
22809 additions
and
22642 deletions
+22809
-22642
project
ghs/project
+0
-0
project.hex
ghs/project.hex
+21595
-21585
project.siz
ghs/project.siz
+1
-1
Data_VehicleSpeed.c
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
+57
-63
GaugesInterface.c
source/Application/APP/GaugesMode/GaugesInterface.c
+1
-1
Line_In.h
source/Application/APP/LINE_IN/Line_In.h
+0
-8
Line_In_user.c
source/Application/APP/LINE_IN/Line_In_user.c
+2
-2
PowerManagement_user.c
...ce/Application/APP/PowerManagement/PowerManagement_user.c
+4
-0
SEG_DISPLAY.c
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
+454
-467
SEG_DISPLAY.h
source/Application/APP/SEG_LCD/SEG_DISPLAY.h
+1
-1
Telltales.h
source/Application/APP/Telltales/Telltales.h
+49
-69
Telltales_user.c
source/Application/APP/Telltales/Telltales_user.c
+557
-334
Telltales_user.h
source/Application/APP/Telltales/Telltales_user.h
+0
-12
DoCAN_ISO15765.c
source/Application/UDS/TP/DoCAN_ISO15765.c
+35
-35
Buzzer.h
source/Driver/Buzzer/Buzzer.h
+7
-7
CD4051.c
source/Driver/CD4051/CD4051.c
+4
-0
CD4051.h
source/Driver/CD4051/CD4051.h
+1
-1
tasks.c
source/System/tasks.c
+41
-56
No files found.
ghs/project
View file @
0d1dff89
No preview for this file type
ghs/project.hex
View file @
0d1dff89
This diff is collapsed.
Click to expand it.
ghs/project.siz
View file @
0d1dff89
project .intvect 1536
project .text 29
8988
project .text 29
9276
project .rodata 412383
project .secinfo 120
project .syscall 6
...
...
source/Application/APP/Data_VehicleSpeed/Data_VehicleSpeed.c
View file @
0d1dff89
...
...
@@ -3,89 +3,89 @@
#include "GaugesInterface.h"
#include "TimerB.h"
#define VEH_FILTER_LEN
7
#define VEH_FILTER_LEN 7
static
struct
{
uint8_t
Count
;
uint16_t
Data
[
VEH_FILTER_LEN
]
;
uint8_t
Count
;
uint16_t
Data
[
VEH_FILTER_LEN
];
}
VehcleFilter
;
static
uint32_t
SPEED_PPK
=
159246ul
;
static
uint32_t
SPEED_RADIO
=
637
;
static
uint32_t
SPEED_PPK
=
159246ul
;
static
uint32_t
SPEED_RADIO
=
637
;
uint16_t
Vehicle_ACT_Speed
;
uint16_t
Vehicle_DISP_Speed
;
uint8_t
VehicleSpeedValid
;
uint8_t
Vehicle_CurSeg
;
uint8_t
Vehicle_CurSeg
;
static
uint16_t
Cal_VehSpeed
(
uint16_t
Fre
,
uint8_t
Len
);
void
Speed_KL30_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
VehcleFilter
.
Data
[
i
]
=
0
;
}
Set_Speed_PPK
(
159246ul
);
}
void
Speed_KL15_ON_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
VehcleFilter
.
Data
[
i
]
=
0
;
}
Veh_Fre_Init
(
Get_Speed_PPK
()
/
10
);
}
void
Speed_KL15_OFF_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
VehcleFilter
.
Count
=
0
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
VehcleFilter
.
Data
[
i
]
=
0
;
}
}
void
Speed_Wakeup_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
VehcleFilter
.
Data
[
i
]
=
0
;
}
}
void
Speed_Sleep_Init
(
void
)
{
uint8_t
i
;
uint8_t
i
;
Vehicle_ACT_Speed
=
0u
;
Vehicle_DISP_Speed
=
0u
;
VehicleSpeedValid
=
0u
;
Vehicle_CurSeg
=
0u
;
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
for
(
i
=
0
;
i
<
VEH_FILTER_LEN
;
i
++
)
{
VehcleFilter
.
Data
[
i
]
=
0
;
VehcleFilter
.
Data
[
i
]
=
0
;
}
}
...
...
@@ -93,9 +93,9 @@ void Speed_Processing_Service(void)
{
uint32_t
VehValTmp
=
0u
;
uint32_t
PPK
=
0u
;
//if(Get_Veh_Fre_Event())
//
if(Get_Veh_Fre_Event())
//{
// VehValTmp = Cal_VehSpeed(Get_Veh_Fre(),VEH_FILTER_LEN) ;
//
VehValTmp = Cal_VehSpeed(Get_Veh_Fre(),VEH_FILTER_LEN) ;
// VehValTmp *= 3600 ;
// VehValTmp *= 10 ;
...
...
@@ -108,68 +108,64 @@ void Speed_Processing_Service(void)
PPK
=
Get_Speed_PPK
();
VehValTmp
=
Cal_Veh_Frequency
();
VehValTmp
*=
3600
;
VehValTmp
*=
10
;
VehValTmp
*=
10
;
VehValTmp
/=
PPK
;
VehValTmp
*=
3600
;
VehValTmp
*=
10
;
VehValTmp
*=
10
;
VehValTmp
/=
PPK
;
//VehValTmp = Cal_Veh_Frequency();
//VehValTmp *= 3600 ;
//VehValTmp *= 10 ;
//VehValTmp /= PPK ;
// VehValTmp = Cal_Veh_Frequency();
// VehValTmp *= 3600 ;
// VehValTmp *= 10 ;
// VehValTmp /= PPK ;
if
(
VehValTmp
>
2250
)
{
VehValTmp
=
0
;
VehicleSpeedValid
=
0
;
VehValTmp
=
0
;
VehicleSpeedValid
=
0
;
}
else
{
VehicleSpeedValid
=
1
;
VehicleSpeedValid
=
1
;
}
Vehicle_ACT_Speed
=
VehValTmp
;
Vehicle_ACT_Speed
=
VehValTmp
;
//传入表头
//传入表头
VehValTmp
=
VehSpeedAmplification
((
uint16_t
)
VehValTmp
);
SetGaugesPara
(
VehGauges
,
(
uint16_t
)
VehValTmp
);
//获得显示格和显示车速
//获得显示格和显示车速
Vehicle_CurSeg
=
GetGaugesCurrentPos
(
VehGauges
);
Vehicle_DISP_Speed
=
GetVehDisVal
(
Vehicle_CurSeg
,
&
GaugesInfo_Init_Table
[
VehGauges
]);
}
static
uint16_t
Cal_VehSpeed
(
uint16_t
Fre
,
uint8_t
Len
)
{
static
uint16_t
u16Result
=
0
;
static
uint16_t
u16Result
=
0
;
if
(
Fre
>
2000
)
{
//do nothing
//
do nothing
}
else
{
if
(
VehcleFilter
.
Count
<
Len
)
{
VehcleFilter
.
Data
[
VehcleFilter
.
Count
]
=
Fre
;
VehcleFilter
.
Count
++
;
VehcleFilter
.
Data
[
VehcleFilter
.
Count
]
=
Fre
;
VehcleFilter
.
Count
++
;
}
else
{
VehcleFilter
.
Count
=
0
;
VehcleFilter
.
Count
=
0
;
App_SortNByte
(
VehcleFilter
.
Data
,
Len
);
u16Result
=
VehcleFilter
.
Data
[
2
]
;
u16Result
+=
VehcleFilter
.
Data
[
3
]
;
u16Result
+=
VehcleFilter
.
Data
[
3
]
;
u16Result
+=
VehcleFilter
.
Data
[
4
]
;
u16Result
/=
4
;
u16Result
=
VehcleFilter
.
Data
[
2
];
u16Result
+=
VehcleFilter
.
Data
[
3
];
u16Result
+=
VehcleFilter
.
Data
[
3
];
u16Result
+=
VehcleFilter
.
Data
[
4
];
u16Result
/=
4
;
}
}
return
u16Result
;
return
u16Result
;
}
/*-------------------------------------------------------------------------
...
...
@@ -182,7 +178,7 @@ static uint16_t Cal_VehSpeed(uint16_t Fre, uint8_t Len)
--------------------------------------------------------------------------*/
void
Set_Speed_PPK
(
uint32_t
PPK
)
{
SPEED_PPK
=
PPK
;
SPEED_PPK
=
PPK
;
}
/*-------------------------------------------------------------------------
* Function Name : Set_Speed_PPK
...
...
@@ -194,7 +190,7 @@ void Set_Speed_PPK(uint32_t PPK)
--------------------------------------------------------------------------*/
void
Set_Speed_Ratio
(
uint32_t
Ratio
)
{
SPEED_RADIO
=
Ratio
;
SPEED_RADIO
=
Ratio
;
}
/*-------------------------------------------------------------------------
* Function Name : Get_Speed_PPK
...
...
@@ -207,8 +203,8 @@ void Set_Speed_Ratio(uint32_t Ratio)
uint32_t
Get_Speed_PPK
(
void
)
{
uint32_t
u32Result
=
0u
;
u32Result
=
SPEED_PPK
;
return
u32Result
;
u32Result
=
SPEED_PPK
;
return
u32Result
;
}
uint16_t
Speed_Get_ActualValue
(
void
)
...
...
@@ -233,7 +229,7 @@ uint16_t Speed_Get_Display_Value(void)
--------------------------------------------------------------------------*/
uint8_t
Speed_Get_CurSeg
(
void
)
{
return
Vehicle_CurSeg
;
return
Vehicle_CurSeg
;
}
/*-------------------------------------------------------------------------
* Function Name : Speed_Get_Valid
...
...
@@ -245,7 +241,5 @@ uint8_t Speed_Get_CurSeg(void)
--------------------------------------------------------------------------*/
uint8_t
Speed_Get_Valid
(
void
)
{
return
VehicleSpeedValid
;
return
VehicleSpeedValid
;
}
source/Application/APP/GaugesMode/GaugesInterface.c
View file @
0d1dff89
#include "GaugesInterface.h"
GetVehDisValGetVehDisVal
#
include
"GaugesInterface.h"
#include "Menu.h"
/**@struct _GaugesInfoInit
*this is _GaugesInfoInit
...
...
source/Application/APP/LINE_IN/Line_In.h
View file @
0d1dff89
...
...
@@ -6,14 +6,6 @@
#include "TYW_stdint.h"
#include "string.h"
/*
Note ! NOW LineIn only support 254 channel!!!!!
Note ! NOW LineIn only support 254 channel!!!!!
Note ! NOW LineIn only support 254 channel!!!!!
Note ! NOW LineIn only support 254 channel!!!!!
Note ! NOW LineIn only support 254 channel!!!!!
*/
/*所有硬线输入的索引*/
typedef
enum
{
...
...
source/Application/APP/LINE_IN/Line_In_user.c
View file @
0d1dff89
...
...
@@ -65,8 +65,8 @@ const Line_In_Attribute_st_t g_stLineInAttribute[LINE_IN_MAX] =
{
LINE_IN_LEVEL_HIGH
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ILLUMINATION
,},
/*A06 ILLUMINATION 背光有效*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_RET_BLENDING
,},
/*A10 RET_BLENDING*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_BRAKE
,},
/*A21 BRAKE*/
{
LINE_IN_LEVEL_HIGH
,
20
0U
,
0U
,
LINE_IN_IG_ONOFF
,
LINE_IN_Get_TURN_R
,},
/*A26 TURN_R*/
{
LINE_IN_LEVEL_HIGH
,
20
0U
,
0U
,
LINE_IN_IG_ONOFF
,
LINE_IN_Get_TURN_L
,},
/*A27 TURN_L*/
{
LINE_IN_LEVEL_HIGH
,
2
0U
,
0U
,
LINE_IN_IG_ONOFF
,
LINE_IN_Get_TURN_R
,},
/*A26 TURN_R*/
{
LINE_IN_LEVEL_HIGH
,
2
0U
,
0U
,
LINE_IN_IG_ONOFF
,
LINE_IN_Get_TURN_L
,},
/*A27 TURN_L*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ABS_DETECT
,},
/*A33 ABS_DETECT*/
{
LINE_IN_LEVEL_HIGH
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_PTO
,},
/*B01 PTO*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_GLOW
,},
/*B05 GLOW*/
...
...
source/Application/APP/PowerManagement/PowerManagement_user.c
View file @
0d1dff89
...
...
@@ -109,6 +109,8 @@ Power_Status_t Power_KL30_Init ( void )
BL_ACC_EN
=
1U
;
/*8867 使能*/
Fuel_VCC05V_OUT_EN
=
1U
;
/*燃油电源 使能*/
AIR_5V_OUT_EN
=
1u
;
/*气压 5V*/
ACC5V_LED_PWM_MCU
=
1u
;
IS31_Init
();
Sound_Scheduler_Init
();
Sound_Player_Init
();
...
...
@@ -146,6 +148,7 @@ void Power_Sleep_Init(void)
BL_ACC_EN
=
1U
;
/*8867 使能*/
Fuel_VCC05V_OUT_EN
=
1U
;
/*燃油电源 使能*/
AIR_5V_OUT_EN
=
1u
;
/*气压 5V*/
ACC5V_LED_PWM_MCU
=
1u
;
IS31_Shutdown
();
...
...
@@ -198,6 +201,7 @@ Power_Status_t Power_Wakeup_Init ( void )
BL_ACC_EN
=
1U
;
/*8867 使能*/
Fuel_VCC05V_OUT_EN
=
1U
;
/*燃油电源 使能*/
AIR_5V_OUT_EN
=
1u
;
/*气压 5V*/
ACC5V_LED_PWM_MCU
=
1u
;
IS31_Init
();
/*报警调度初始化*/
...
...
source/Application/APP/SEG_LCD/SEG_DISPLAY.c
View file @
0d1dff89
This diff is collapsed.
Click to expand it.
source/Application/APP/SEG_LCD/SEG_DISPLAY.h
View file @
0d1dff89
...
...
@@ -14,7 +14,7 @@ void SEG_LED_HI_BEAM_T(uint8_t seg_status);
void
SEG_LED_Rr_FOG_LAMP_T
(
uint8_t
seg_status
);
void
SEG_LED_MIL_T
(
uint8_t
seg_status
);
void
SEG_LED_SVS_T
(
uint8_t
seg_status
);
void
SEG_LED_H_S_A_
_
T
(
uint8_t
seg_status
);
void
SEG_LED_H_S_A_T
(
uint8_t
seg_status
);
void
SEG_LED_RETARDER_T
(
uint8_t
seg_status
);
void
SEG_LED_AUTO_LEVELING_T
(
uint8_t
seg_status
);
void
SEG_LED_ROWS_L
(
uint8_t
seg_status
);
...
...
source/Application/APP/Telltales/Telltales.h
View file @
0d1dff89
...
...
@@ -7,53 +7,49 @@
typedef
enum
{
em_LED_INTER_DIFF_LOCK_T
,
em_LED_FOUR_MUL_FOUR_T
,
em_LED_EXH_BRAKE_T
,
em_LED_QOS_GLOW_T
,
em_LED_HI_BEAM_T
,
em_LED_Rr_FOG_LAMP_T
,
em_LED_MIL_T
,
em_LED_SVS_T
,
em_LED_H_S_A__T
,
em_LED_RETARDER_T
,
em_LED_AUTO_LEVELING_T
,
em_LED_ROWS_L
,
em_LED_BSM_OFF_L
,
em_LED_AEBS_OFF_L
,
em_LED_LDWS_L
,
em_LED_SRS_L
,
em_LED_ENG_OIL_L
,
em_LED_CHARG_L
,
em_LED_SEAT_BELT_L
,
em_LED_RR_DIFF_LOCK_L
,
em_LED_TPMS_L
,
em_LED_ASR_or_EVSC_OFF_L
,
em_LED_EVSC_L
,
em_LED_eco_stop_OFF_L
,
em_LED_AMT_L
,
em_LED_WEAR_IND_L
,
em_LED_TRAILER_BRAKE_R
,
em_LED_BRAKE_AIR_or_EBS_YELLOW_R
,
em_LED_ACC_AIR_R
,
em_LED_ABS_R
,
em_LED_PARK_BRAKE_R
,
em_LED_BRAKE_AIR_or_EBS_RED_R
,
em_LED_BRAKE_LOCK_R
,
em_LED_AIR_SUS_R
,
em_LED_TRAILER_ABS_U
,
em_LED_WORKING_LAMP_U
,
em_LED_TRAILER_ABS_INFO_U
,
LED_Max
,
em_LED_INTER_DIFF_LOCK_T
,
em_LED_FOUR_MUL_FOUR_T
,
em_LED_EXH_BRAKE_T
,
em_LED_QOS_GLOW_T
,
em_LED_HI_BEAM_T
,
em_LED_Rr_FOG_LAMP_T
,
em_LED_MIL_T
,
em_LED_SVS_T
,
em_LED_H_S_A__T
,
em_LED_RETARDER_T
,
em_LED_AUTO_LEVELING_T
,
em_LED_ROWS_L
,
em_LED_BSM_OFF_L
,
em_LED_AEBS_OFF_L
,
em_LED_LDWS_L
,
em_LED_SRS_L
,
em_LED_ENG_OIL_L
,
em_LED_CHARG_L
,
em_LED_SEAT_BELT_L
,
em_LED_RR_DIFF_LOCK_L
,
em_LED_TPMS_L
,
em_LED_ASR_or_EVSC_OFF_L
,
em_LED_EVSC_L
,
em_LED_eco_stop_OFF_L
,
em_LED_AMT_L
,
em_LED_WEAR_IND_L
,
em_LED_TRAILER_BRAKE_R
,
em_LED_BRAKE_AIR_or_EBS_YELLOW_R
,
em_LED_ACC_AIR_R
,
em_LED_ABS_R
,
em_LED_PARK_BRAKE_R
,
em_LED_BRAKE_AIR_or_EBS_RED_R
,
em_LED_BRAKE_LOCK_R
,
em_LED_AIR_SUS_R
,
em_LED_TRAILER_ABS_U
,
em_LED_WORKING_LAMP_U
,
em_LED_TRAILER_ABS_INFO_U
,
LED_Max
,
}
LED_Idx_t
;
typedef
uint8_t
(
*
LED_Judgment
)
(
void
);
typedef
void
(
*
LED_Execution
)
(
uint8_t
led_status
);
typedef
uint8_t
(
*
LED_Judgment
)(
void
);
typedef
void
(
*
LED_Execution
)(
uint8_t
led_status
);
typedef
struct
{
...
...
@@ -79,18 +75,17 @@ typedef struct
typedef
struct
{
uint8_t
LastLeft
;
uint8_t
LastRight
;
uint8_t
Delay
;
uint8_t
LastLeft
;
uint8_t
LastRight
;
uint8_t
Delay
;
}
TelltaleLRCtrlStruct
;
extern
const
LED_Attribute_st
LED_Attribute
[
LED_Max
];
extern
const
LED_Attribute_st
LED_Attribute
[
LED_Max
];
void
Telltales_SetPara
(
ExternalPara_st
*
Para
);
void
Telltales_Management
(
void
);
/*50ms*/
void
Telltales_Management
(
void
);
/*50ms*/
void
Telltales_Left_Right_KL30_Init
(
void
);
void
Telltales_Left_Right_Management_Service
(
void
)
;
/*must put into 10ms task*/
void
Telltales_Left_Right_Management_Service
(
void
)
;
/*must put into 10ms task*/
void
Telltales_IG_ON_Work
(
void
);
void
Telltales_IGOFF_Work
(
void
);
void
Test_LED_AllLight
(
void
);
...
...
@@ -99,10 +94,6 @@ void Telltales_Wakeup_Init(void);
void
Telltales_KL30_Init
(
void
);
void
Telltales_KL15_Init
(
void
);
void
LED_RIGHT_G_Execution
(
uint8_t
led_status
);
void
LED_LEFT_G_Execution
(
uint8_t
led_status
);
uint8_t
LED_RIGHT_G_Judgement
(
void
);
...
...
@@ -114,10 +105,6 @@ uint8_t GET_LED_POSITION_G(void);
void
Write_LED_READY_G_Execution
(
uint8_t
led_status
);
uint8_t
GET_LED_READY_G_Execution
(
void
);
/*ZH:*/
/*LED点灯条件判别函数*/
uint8_t
LED_INTER_DIFF_LOCK_T_Judgement
(
void
);
...
...
@@ -128,7 +115,7 @@ uint8_t LED_HI_BEAM_T_Judgement(void);
uint8_t
LED_Rr_FOG_LAMP_T_Judgement
(
void
);
uint8_t
LED_MIL_T_Judgement
(
void
);
uint8_t
LED_SVS_T_Judgement
(
void
);
uint8_t
LED_H_S_A_
_
T_Judgement
(
void
);
uint8_t
LED_H_S_A_T_Judgement
(
void
);
uint8_t
LED_RETARDER_T_Judgement
(
void
);
uint8_t
LED_AUTO_LEVELING_T_Judgement
(
void
);
uint8_t
LED_ROWS_L_Judgement
(
void
);
...
...
@@ -158,8 +145,6 @@ uint8_t LED_TRAILER_ABS_U_Judgement(void);
uint8_t
LED_WORKING_LAMP_U_Judgement
(
void
);
uint8_t
LED_TRAILER_ABS_INFO_U_Judgement
(
void
);
/*LED执行函数*/
void
LED_INTER_DIFF_LOCK_T_Execution
(
uint8_t
led_status
);
void
LED_FOUR_MUL_FOUR_T_Execution
(
uint8_t
led_status
);
...
...
@@ -169,7 +154,7 @@ void LED_HI_BEAM_T_Execution(uint8_t led_status);
void
LED_Rr_FOG_LAMP_T_Execution
(
uint8_t
led_status
);
void
LED_MIL_T_Execution
(
uint8_t
led_status
);
void
LED_SVS_T_Execution
(
uint8_t
led_status
);
void
LED_H_S_A_
_
T_Execution
(
uint8_t
led_status
);
void
LED_H_S_A_T_Execution
(
uint8_t
led_status
);
void
LED_RETARDER_T_Execution
(
uint8_t
led_status
);
void
LED_AUTO_LEVELING_T_Execution
(
uint8_t
led_status
);
void
LED_ROWS_L_Execution
(
uint8_t
led_status
);
...
...
@@ -200,9 +185,4 @@ void LED_WORKING_LAMP_U_Execution(uint8_t led_status);
void
LED_TRAILER_ABS_INFO_U_Execution
(
uint8_t
led_status
);
/*:ZH*/
#endif
source/Application/APP/Telltales/Telltales_user.c
View file @
0d1dff89
This diff is collapsed.
Click to expand it.
source/Application/APP/Telltales/Telltales_user.h
View file @
0d1dff89
...
...
@@ -3,7 +3,6 @@
#include "TYW_stdint.h"
void
Write_LED_RGIHT_G_Judgement
(
uint8_t
led_status
);
void
Write_LED_LEFT_G_Judgement
(
uint8_t
led_status
);
...
...
@@ -11,14 +10,3 @@ uint8_t GET_LED_RIGHT_G_Judgement(void);
uint8_t
GET_LED_LEFT_G_Judgement
(
void
);
#endif
source/Application/UDS/TP/DoCAN_ISO15765.c
View file @
0d1dff89
...
...
@@ -40,7 +40,7 @@ extern void UDS_N_USData_Indication(uint32_t N_TAtype, uint8_t *MessageData, uin
******************************************************************************/
void
DoCAN_Communication_Service
(
void
)
{
DoCAN_Update_Timer
();
DoCAN_Handle_Time_Out
();
...
...
@@ -80,7 +80,7 @@ void DoCAN_N_USData_Request ( uint32_t N_TAtype, uint8_t MessageData[], uint16_t
uint32_t
id
;
uint8_t
dlc
;
uint8_t
data
[
8
];
/*非空闲状态下不允许发送*/
if
(
TpCtrl
.
Process
!=
TP_IDLE
)
{
...
...
@@ -155,7 +155,7 @@ void DoCAN_N_USData_Request ( uint32_t N_TAtype, uint8_t MessageData[], uint16_t
dlc
=
TransportTxData
.
Frame
.
DLC
;
for
(
i
=
0u
;
i
<
8u
;
++
i
)
{
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
}
/*TpCtrl.TxReq = 1u;*/
DoCAN_Start_Timer
(
TIMING_PARA_N_As
);
/*启动N_As计时*/
...
...
@@ -243,18 +243,18 @@ void DoCAN_L_Data_Request ( uint32_t Identifier, uint8_t dlc, uint8_t Data[] )
for
(
i
=
0u
;
i
<
dlc
;
i
++
)
{
temp
=
Data
[
i
];
LinkTxCtrl
.
Data
[
i
]
=
temp
;
LinkTxCtrl
.
Data
[
i
]
=
temp
;
}
#if FILLER_BYTE_HANDLING
for
(
i
=
dlc
;
i
<
8u
;
i
++
)
{
LinkTxCtrl
.
Data
[
i
]
=
FILLER_BYTE
;
}
RSCAN0_SendCH0_TxBuf0
(
LinkTxCtrl
.
Identifier
,
8U
,
1U
,
LinkTxCtrl
.
Data
);
#else
RSCAN0_SendCH0_TxBuf0
(
LinkTxCtrl
.
Identifier
,
8U
,
1U
,
LinkTxCtrl
.
Data
);
RSCAN0_SendCH0_TxBuf0
(
LinkTxCtrl
.
Identifier
,
8U
,
1U
,
LinkTxCtrl
.
Data
);
#else
RSCAN0_SendCH0_TxBuf0
(
LinkTxCtrl
.
Identifier
,
8U
,
1U
,
LinkTxCtrl
.
Data
);
#endif
LinkTxCtrl
.
Busy
=
1u
;
}
...
...
@@ -341,7 +341,7 @@ void DoCAN_L_Data_Confirm ( uint32_t Identifier, uint8_t TransferStatus )
}
else
{
/* TpCtrl.TxReq = 1u;*/
/*发送失败,重发*/
/* TpCtrl.TxReq = 1u;*/
/*发送失败,重发*/
}
}
}
...
...
@@ -879,11 +879,11 @@ void DoCAN_Receive_Flow_Control ( void )
******************************************************************************/
void
DoCAN_Transmit_Flow_Control
(
void
)
{
uint8_t
i
;
uint32_t
id
;
uint8_t
dlc
;
uint8_t
data
[
8
];
uint8_t
i
;
uint32_t
id
;
uint8_t
dlc
;
uint8_t
data
[
8
];
if
(
TpCtrl
.
Process
==
TP_RX_INIT
)
{
/*-------------------------------------------------------------------------
...
...
@@ -914,17 +914,17 @@ void DoCAN_Transmit_Flow_Control ( void )
TransportTxData
.
N_PDU_FC
.
DLC
=
3u
;
/*TpCtrl.TxReq = 1u;*/
id
=
TransportTxData
.
Frame
.
Identifier
;
dlc
=
TransportTxData
.
Frame
.
DLC
;
for
(
i
=
0u
;
i
<
8u
;
++
i
)
{
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
}
DoCAN_Start_Timer
(
TIMING_PARA_N_Ar
);
/*启动N_Ar计时*/
DoCAN_L_Data_Request
(
id
,
dlc
,
data
);
}
else
if
(
TpCtrl
.
Process
==
TP_RX_CTS
)
{
...
...
@@ -973,10 +973,10 @@ void DoCAN_Transmit_Flow_Control ( void )
{
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
}
DoCAN_Start_Timer
(
TIMING_PARA_N_Ar
);
/*启动N_Ar计时*/
DoCAN_Start_Timer
(
TIMING_PARA_N_Ar
);
/*启动N_Ar计时*/
DoCAN_L_Data_Request
(
id
,
dlc
,
data
);
}
}
}
...
...
@@ -1039,12 +1039,12 @@ void DoCAN_Disassemble_And_Transmit_N_USData ( void )
dlc
=
TransportTxData
.
Frame
.
DLC
;
for
(
i
=
0u
;
i
<
8u
;
++
i
)
{
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
}
DoCAN_Start_Timer
(
TIMING_PARA_N_As
);
/*启动N_As计时*/
DoCAN_L_Data_Request
(
id
,
dlc
,
data
);
DoCAN_L_Data_Request
(
id
,
dlc
,
data
);
}
else
if
(
TpCtrl
.
BlockCnt
==
TpCtrl
.
BlockSize
-
1u
)
/*将要发送最后一帧*/
{
...
...
@@ -1060,13 +1060,13 @@ void DoCAN_Disassemble_And_Transmit_N_USData ( void )
dlc
=
TransportTxData
.
Frame
.
DLC
;
for
(
i
=
0u
;
i
<
8u
;
++
i
)
{
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
data
[
i
]
=
TransportTxData
.
Frame
.
Data
[
i
];
}
DoCAN_Start_Timer
(
TIMING_PARA_N_As
);
/*启动N_As计时*/
DoCAN_Start_Timer
(
TIMING_PARA_N_As
);
/*启动N_As计时*/
DoCAN_L_Data_Request
(
id
,
dlc
,
data
);
/* TpCtrl.TxReq = 1u;*/
/* TpCtrl.TxReq = 1u;*/
}
else
/*已发送帧数不可能大于帧总数,除非有错误发生*/
{
...
...
@@ -1216,7 +1216,7 @@ void DoCAN_Handle_Time_Out ( void )
void
UDS_TP_ArTimeOutHandle
(
void
)
{
Can_Uds_Abort
();
}
...
...
@@ -1295,10 +1295,10 @@ void DoCAN_Start_STmin_Timer ( uint8_t STminTime )
{
if
(
STminTime
<=
0x7Fu
)
/*0x00 - 0x7F:0ms - 127ms*/
{
STminTime
++
;
TpTimingCtrl
.
STimer
=
((
uint32_t
)
(
STminTime
)
*
(
uint32_t
)
1000
);
TpTimingCtrl
.
STimer
=
((
uint32_t
)
(
STminTime
)
*
(
uint32_t
)
1000
);
}
else
if
(
(
STminTime
>=
0xF1u
)
&&
(
STminTime
<=
0xF9u
)
)
/*0xF1 - 0xF9:100us - 900us*/
{
...
...
source/Driver/Buzzer/Buzzer.h
View file @
0d1dff89
...
...
@@ -45,15 +45,15 @@ typedef enum
BUZZER_Track_Index_Pling
,
BUZZER_Track_Index_Plong
,
BUZZER_Track_Index_ParkBeep
,
BUZZER_Track_Index_3900hz_500Dty
,
BUZZER_Track_Index_2300hz_500Dty
,
BUZZER_Track_Index_3900hz_280Dty
,
BUZZER_Track_Index_3900hz_500Dty
,
BUZZER_Track_Index_2300hz_500Dty
,
BUZZER_Track_Index_3900hz_280Dty
,
BUZZER_Track_Index_2300hz_280Dty
,
BUZZER_Track_Index_3900hz_190Dty
,
BUZZER_Track_Index_2600hz_167Dty
,
BUZZER_Track_Index_3900hz_190Dty
,
BUZZER_Track_Index_2600hz_167Dty
,
BUZZER_Track_Index_2000hz_500Dty
,
BUZZER_Track_Index_0800hz_500Dty
,
BUZZER_Track_Index_0800hz_500Dty
,
BUZZER_Track_Index_MAX
,
}
BUZZER_Track_Index_en_t
;
...
...
source/Driver/CD4051/CD4051.c
View file @
0d1dff89
...
...
@@ -35,6 +35,7 @@ void CD4051B_KL15Init(void)
CD4051B_CurrentChannel
=
0u
;
}
/****************************************************************************
CD4051B_ChannelSet
CD4051B_C_MCU CD4051B_B_MCU CD4051B_A_MCU Channel ON
...
...
@@ -61,6 +62,7 @@ void CD4051B_ChannelSet(CD4051BChannel Ch)
;
}
}
/****************************************************************************
函数名:CD4051B_ChannelGet
形参:无
...
...
@@ -102,6 +104,7 @@ void CD4051B_ReadSignal_Serviece(void)
CD4051B_ChannelSet
(
channel
);
}
/****************************************************************************
CD4051B_Debounce_Service
...
...
@@ -152,6 +155,7 @@ void CD4051B_Debounce_Service(void)
}
}
}
/****************************************************************************
CD4051B_GetComValue
...
...
source/Driver/CD4051/CD4051.h
View file @
0d1dff89
...
...
@@ -99,7 +99,7 @@ extern uint16_t CD4051B_GeneralCOM_Value[COMTotal][MaxChannel];
#define CD4051_COM5_X6_IN (CD4051B_GeneralCOM_Value[COM5][Channel6])
/*B31*/
#define CD4051_COM5_X7_IN (CD4051B_GeneralCOM_Value[COM5][Channel7])
/*B30*/
/*COM6映射PCB*/
#define CD4051_COM6_X0_IN (CD4051B_GeneralCOM_Value[COM6][Channel0])
/*
A
06*/
#define CD4051_COM6_X0_IN (CD4051B_GeneralCOM_Value[COM6][Channel0])
/*
B
06*/
#define CD4051_COM6_X1_IN (CD4051B_GeneralCOM_Value[COM6][Channel1])
/*B07*/
#define CD4051_COM6_X2_IN (CD4051B_GeneralCOM_Value[COM6][Channel2])
/*B08*/
#define CD4051_COM6_X3_IN (CD4051B_GeneralCOM_Value[COM6][Channel3])
/*B05*/
...
...
source/System/tasks.c
View file @
0d1dff89
/**************************************************************************
//**
* \file Tasks.c
* \brief Task list
* \details
* \author Zhang Xuan
* \version V1.0.0
* \date 07-Sep-2018
* \par History:
* V1.0.0 Initial release
* \par Copyright:
* (c) Heilongjiang TYW Electronics co., LTD
******************************************************************************/
/**************************************************************************
* \file Tasks.c
* \brief Task list
* \details
* \author Zhang Xuan
* \version V1.0.0
* \date 07-Sep-2018
* \par History:
* V1.0.0 Initial release
* \par Copyright:
* (c) Heilongjiang TYW Electronics co., LTD
******************************************************************************/
#include "r_typedefs.h"
#include "Sys_Scheduler.h"
#include "rh850_macros.h"
...
...
@@ -17,7 +17,6 @@
#include "Analog_Signals.h"
#include "RTC.h"
#include "Watchdog.h"
#include "debugger.h"
...
...
@@ -33,7 +32,6 @@
#include "System_Monitor.h"
#include "Common_Interface.h"
#include "Services_ODO_User.h"
#include "Data_CoolantTemperature.h"
#include "Data_VehicleSpeed.h"
...
...
@@ -93,10 +91,10 @@
#include "Buzzer.h"
/*******************************************************************************
* *
* 系统常规运行模式(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )任务列表 *
* *
*******************************************************************************/
* *
* 系统常规运行模式(SYS_MODE_OFF / SYS_MODE_ON / SYS_MODE_STANDBY )任务列表 *
* *
*******************************************************************************/
/*==============================================================================
伪实时任务
...
...
@@ -109,13 +107,9 @@ void Sys_Run_Mode_Pseudo_Real_Time_Tasks(void)
UDS_Server_Application_Service
();
IS31_Service
();
BU98R10_Update_Service
();
}
/*============================================================================*/
/*==============================================================================
2ms周期执行任务
------------------------------------------------------------------------------*/
...
...
@@ -147,12 +141,12 @@ void Sys_Run_Mode_10ms_Tasks(void)
Data_Mileage_Write_EEPROM
();
Line_In_Debounce_Service
();
Telltales_Management
();
//Test_LED_AllLight();
//
Test_LED_AllLight();
Key_Service
();
CAN_BUSOFF_Recover
();
DisplayServices
();
/*表头调度函数 added by yutian*/
UserGaugeSchedule
();
/*在主循环中调用*/
UserGaugeSchedule
();
/*在主循环中调用*/
/*end*/
CD4051B_ReadSignal_Serviece
();
Sound_Play_Service
();
...
...
@@ -163,7 +157,6 @@ void Sys_Run_Mode_10ms_Tasks(void)
}
/*============================================================================*/
/*==============================================================================
20ms周期执行任务
------------------------------------------------------------------------------*/
...
...
@@ -179,19 +172,15 @@ void Sys_Run_Mode_20ms_Tasks(void)
DrivingSupport_Processing_Service
();
AirPressure_Processing_Service
();
Voltmeter_Processing_Service
();
Buzzer_Track_Play_Service
();
Sound_Management_Service
();
CD4051B_Debounce_Service
();
Seg_Display_Service
();
Seg_Buffer_Commit
();
BU98R10_Update_Request
();
Buzzer_Track_Play_Service
();
}
/*============================================================================*/
/*==============================================================================
50ms周期执行任务
------------------------------------------------------------------------------*/
...
...
@@ -203,12 +192,11 @@ void Sys_Run_Mode_50ms_Tasks(void)
Data_Service_Gear_Processing
();
Speed_PPK_Processing
();
Sound_Scheduling_Service
();
//BGTask();
//
BGTask();
IS31_Scan_Refresh
();
}
/*============================================================================*/
/*==============================================================================
100ms周期执行任务
------------------------------------------------------------------------------*/
...
...
@@ -219,16 +207,16 @@ void Sys_Run_Mode_100ms_Tasks(void)
RTE_RTC_Services_100Ms_Cbk
();
Data_ODO_Processing
();
Data_Trip_Processing
();
//Data_Avg_Speed_Processing();
//
Data_Avg_Speed_Processing();
Data_TPMS_Value_Processing
();
Data_Service_Gear_Processing
();
Data_Ambient_Temperature_Processing
();
//Display_Schedule_Service();/*显示函数入口*/
//Menu_Display_Service();
//External_Influence_ENERGY_RECOVERY_LEVEL_Select();
//LongTimeNoKey_Operation();
//Menu_Get_Battery_Sts_Exist();
//
Display_Schedule_Service();/*显示函数入口*/
//
Menu_Display_Service();
//
External_Influence_ENERGY_RECOVERY_LEVEL_Select();
//
LongTimeNoKey_Operation();
//
Menu_Get_Battery_Sts_Exist();
Popups_Management_Service
();
Popup_Scheduling_Service
();
/*综合油耗信息*/
...
...
@@ -239,29 +227,27 @@ void Sys_Run_Mode_100ms_Tasks(void)
Data_FuelCounsumpThisTime
();
/*加油后行车信息*/
Data_Info_Last_Refueling
();
}
/*============================================================================*/
/*******************************************************************************
* *
* 系统休眠模式(SYS_MODE_SLEEP)任务列表 *
* *
*******************************************************************************/
* *
* 系统休眠模式(SYS_MODE_SLEEP)任务列表 *
* *
*******************************************************************************/
/*==============================================================================
休眠模式下执行的后台任务
------------------------------------------------------------------------------*/
void
Sys_Sleep_Mode_Tasks
(
void
)
{
}
/*============================================================================*/
/*******************************************************************************
* *
* 精确的50us计时任务列表 *
* *
*******************************************************************************/
* *
* 精确的50us计时任务列表 *
* *
*******************************************************************************/
/*==============================================================================
精确的50us计时任务 禁止添加修改列表中的任务
------------------------------------------------------------------------------*/
...
...
@@ -272,7 +258,7 @@ void Sys_Exact_50us_Tasks(void)
COM_NM_Process
();
COM_TX_Process
();
DoCAN_Timer_Update
(
50
);
//TimerB_Fre_Timeout(50);
//
TimerB_Fre_Timeout(50);
Cal_Veh_Cycle
(
SPEED_SIGNAL_PWM_IN
);
/*车速输入,非捕获方式 20211018*/
PerCounter
++
;
if
(
PerCounter
>=
20
*
5
)
...
...
@@ -285,10 +271,10 @@ void Sys_Exact_50us_Tasks(void)
/*============================================================================*/
/*******************************************************************************
* *
* 精确的100ms计时任务列表 *
* *
*******************************************************************************/
* *
* 精确的100ms计时任务列表 *
* *
*******************************************************************************/
/*==============================================================================
精确的100ms计时任务 禁止添加修改列表中的任务
------------------------------------------------------------------------------*/
...
...
@@ -300,8 +286,7 @@ void Sys_Exact_100ms_Tasks(void)
}
/*============================================================================*/
void
APP_Startup_Init
(
uint8_t
startMode
)
void
APP_Startup_Init
(
uint8_t
startMode
)
{
Power_Management_Init
(
startMode
);
}
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