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
baizhengyuan
TianYing_ty100
Commits
4e6b837e
Commit
4e6b837e
authored
Aug 15, 2024
by
高士达
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lijianshuang' into 'dev'
Lijianshuang See merge request
ty/tianying_ty100!65
parents
b9007b5d
b0d02a3c
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
368 additions
and
164 deletions
+368
-164
TianYing.sct
.../Project/Cmsemicon/BAT32A239/MDK_ARM/Objects/TianYing.sct
+2
-2
TianYing.uvprojx
...ware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
+11
-11
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+1
-1
BackLight.c
Firmware/Source/Application/BackLight/BackLight.c
+25
-24
Data_Coolant.c
Firmware/Source/Application/Data_Coolant/Data_Coolant.c
+204
-86
Data_Coolant.h
Firmware/Source/Application/Data_Coolant/Data_Coolant.h
+6
-3
GpioUser.c
Firmware/Source/Application/GPIO_USER/GpioUser.c
+6
-6
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+1
-1
BU98R10.c
Firmware/Source/Component/BU98R10/BU98R10.c
+28
-26
Line_In_user.c
Firmware/Source/Component/Line_In/Line_In_user.c
+1
-1
PowerManag_user.c
Firmware/Source/Component/PowerManagement/PowerManag_user.c
+6
-3
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+77
-0
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/Objects/TianYing.sct
View file @
4e6b837e
...
...
@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0x0000
8
000 0x00040000 { ; load region size_region
ER_IROM1 0x0000
8
000 0x00040000 { ; load address = execution address
LR_IROM1 0x0000
0
000 0x00040000 { ; load region size_region
ER_IROM1 0x0000
0
000 0x00040000 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
View file @
4e6b837e
...
...
@@ -362,7 +362,7 @@
</Aads>
<LDads>
<umfTarg>
0
</umfTarg>
<Ropi>
1
</Ropi>
<Ropi>
0
</Ropi>
<Rwpi>
0
</Rwpi>
<noStLib>
0
</noStLib>
<RepFail>
1
</RepFail>
...
...
@@ -503,16 +503,6 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\CAN_User\Can_App.h
</FilePath>
</File>
<File>
<FileName>
Data_Coolant.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.c
</FilePath>
</File>
<File>
<FileName>
Data_Coolant.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.h
</FilePath>
</File>
<File>
<FileName>
Data_TPMS.c
</FileName>
<FileType>
1
</FileType>
...
...
@@ -593,6 +583,16 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode\code.h
</FilePath>
</File>
<File>
<FileName>
Data_Coolant.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.c
</FilePath>
</File>
<File>
<FileName>
Data_Coolant.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_Coolant\Data_Coolant.h
</FilePath>
</File>
</Files>
</Group>
<Group>
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
4e6b837e
...
...
@@ -14,7 +14,6 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\gui_display.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_app.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_coolant.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_tpms.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\faultcode.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_voltage.__i"
...
...
@@ -23,6 +22,7 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_lib.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\code.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_coolant.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\bu98r10.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\services_mileage_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\eemanager_interface.__i"
...
...
Firmware/Source/Application/BackLight/BackLight.c
View file @
4e6b837e
...
...
@@ -23,31 +23,32 @@ void BackLight_Process(void)
{
if
(
SYS_OPR_STAT_IGN_ON
)
{
//if (Line_In_Get_Status(LINE_IN_Little_Lamp))
//{
// if(LED_Turnon < 5)
// {
// LED_Turnon ++ ;
// }
// else
// {
// LED_Turnon = 5;
// LED_Turnoff = 0;
// }
//}
//else
//{
// if(LED_Turnoff < 5)
// {
// LED_Turnoff ++ ;
// }
// else
// {
// LED_Turnoff = 5;
// LED_Turnon = 0;
// }
//}
//if ( LED_Turnon == 5 )
if
(
Line_In_Get_Status
(
LINE_IN_Little_Lamp
))
{
if
(
LED_Turnon
<
5
)
{
LED_Turnon
++
;
}
else
{
LED_Turnon
=
5
;
LED_Turnoff
=
0
;
}
}
else
{
if
(
LED_Turnoff
<
5
)
{
LED_Turnoff
++
;
}
else
{
LED_Turnoff
=
5
;
LED_Turnon
=
0
;
}
}
if
(
LED_Turnon
==
5
)
{
TimerM_PWM_set_duty
(
TIMERM_COUNTER1
,
TIMERM_CHB
,
BACK_LIGHT_NIGHT
);
}
...
...
Firmware/Source/Application/Data_Coolant/Data_Coolant.c
View file @
4e6b837e
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/Data_Coolant/Data_Coolant.h
View file @
4e6b837e
...
...
@@ -17,12 +17,14 @@ typedef struct __attribute__((aligned(4)))
uint8_t
u8_DestSeg
;
uint8_t
u8_CurSeg
;
uint8_t
u8_UpFlashtimer
;
uint8_t
u8_Holdtimer
;
uint8_t
u8_DownFlashtimer
;
uint8_t
u8_Uptimer
;
uint8_t
u8_Downtimer
;
uint8_t
u8_Flashflg
;
uint8_t
u8_Warnflg
;
uint8_t
u8_Flg
;
uint8_t
u8Reserved
;
}
DataCoolantTempDisStruct
;
...
...
@@ -43,15 +45,16 @@ typedef struct __attribute__((aligned(4)))
void
Data_Coolant_Temp_KL30_Init
(
void
);
void
Data_Coolant_Temp_KL15_Init
(
void
);
void
Data_Coolant_Temp_Processing_Service
(
void
);
void
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
);
void
Data_Coolant_Temp_Display
(
void
);
uint8_t
Get_Coolant_Temp_Seg
(
uint16_t
Temp_Value
);
void
Data_Coolant_Temp_Display
(
void
);
uint8_t
GET_DataCollantTempSegValid
(
void
);
uint8_t
GET_DataCoolantTempSegDisp
(
void
);
uint16_t
GET_DataCoolantTempValueDisp
(
void
);
uint8_t
GET_DataCollantTempWarnflg
(
void
);
uint16_t
GET_DataCoolantSegValue
(
void
);
extern
DataCoolantTempStruct
DataCoolantTemp
;
extern
DataCoolantTempStruct
DataCoolantTemp
;
#endif
Firmware/Source/Application/GPIO_USER/GpioUser.c
View file @
4e6b837e
...
...
@@ -18,9 +18,9 @@ const RTE_GPIO_Config_st_t KL30_Init_GpioConfig[Gpio_Max] =
/* PORT0_PIN01 */
{
RTE_GPIO_PORT00_PIN01
,
RTE_GPIO_DIR_IN
},
/* PORT0_PIN02 */
{
RTE_GPIO_PORT00_PIN02
,
RTE_GPIO_DIR_IN
},
/* PORT0_PIN03 */
{
RTE_GPIO_PORT00_PIN03
,
RTE_GPIO_DIR_IN
},
/* PORT0_PIN04 */
{
RTE_GPIO_PORT00_PIN04
,
RTE_GPIO_DIR_IN
},
/* PORT0_PIN02 */
{
RTE_GPIO_PORT00_PIN02
,
GpioOut_Low
},
/* PORT0_PIN03 */
{
RTE_GPIO_PORT00_PIN03
,
GpioOut_Low
},
/* PORT0_PIN04 */
{
RTE_GPIO_PORT00_PIN04
,
GpioOut_Low
},
/* PORT0_PIN05 */
{
RTE_GPIO_PORT00_PIN05
,
RTE_GPIO_DIR_IN
},
/* PORT0_PIN06 */
{
RTE_GPIO_PORT00_PIN06
,
RTE_GPIO_DIR_IN
},
...
...
@@ -55,9 +55,9 @@ const RTE_GPIO_Config_st_t KL30_Init_GpioConfig[Gpio_Max] =
/* PORT6_PIN62 */
{
RTE_GPIO_PORT06_PIN02
,
GpioOut_Low
},
/* PORT6_PIN63 */
{
RTE_GPIO_PORT06_PIN03
,
GpioOut_Low
},
/* PORT7_PIN70 */
{
RTE_GPIO_PORT07_PIN00
,
RTE_GPIO_DIR_IN
},
/* PORT7_PIN71 */
{
RTE_GPIO_PORT07_PIN01
,
RTE_GPIO_DIR_IN
},
/* PORT7_PIN72 */
{
RTE_GPIO_PORT07_PIN02
,
RTE_GPIO_DIR_IN
},
/* PORT7_PIN70 */
{
RTE_GPIO_PORT07_PIN00
,
GpioOut_Low
},
/* PORT7_PIN71 */
{
RTE_GPIO_PORT07_PIN01
,
GpioOut_Low
},
/* PORT7_PIN72 */
{
RTE_GPIO_PORT07_PIN02
,
GpioOut_Low
},
/* PORT7_PIN73 */
{
RTE_GPIO_PORT07_PIN03
,
RTE_GPIO_DIR_IN
},
/* PORT7_PIN74 */
{
RTE_GPIO_PORT07_PIN04
,
RTE_GPIO_DIR_IN
},
/* PORT7_PIN75 */
{
RTE_GPIO_PORT07_PIN05
,
RTE_GPIO_DIR_IN
},
...
...
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
4e6b837e
...
...
@@ -119,7 +119,7 @@ void Gauge_Service(void)
Gauge_Clock_Display
();
SEG_SET_FuelDial
(
1
,
Get_CurFuelSetp
());
SEG_SET_EspeedDial
(
1
,
Get_DispEngineSpeed
()
/
500
);
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolant
TempValueDisp
(),
GET_DataCollantTempSegValid
());
SEG_SET_CoolantDial
(
1
,
GET_DataCoolantTempSegDisp
(),
GET_DataCoolant
SegValue
(),
GET_DataCollantTempSegValid
());
SEG_SET_Voltage_NUM
(
1
,
Get_Battery_Voltage
());
#if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_DISPLAY
(
1
,
Get_Front_TPMS_Sig_Value
(),
Get_Rear_TPMS_Sig_Value
(),
0
,
Get_Front_TPMS_Sig_Vaild
(),
Get_Rear_TPMS_Sig_Vaild
());
...
...
Firmware/Source/Component/BU98R10/BU98R10.c
View file @
4e6b837e
...
...
@@ -24,13 +24,13 @@ void BU98R10_CHIP0_SET_SD_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_HIGH);
//
RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_SD
,
RTE_GPIO_LEVEL_HIGH
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP0_SD, RTE_GPIO_LEVEL_LOW);
//
RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_SD
,
RTE_GPIO_LEVEL_LOW
);
}
}
void
BU98R10_CHIP1_SET_SD_LEVEL
(
uint8_t
Level
);
...
...
@@ -38,13 +38,13 @@ void BU98R10_CHIP1_SET_SD_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH);
//
RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level
(
BU98R10_CHIP1_SD
,
RTE_GPIO_LEVEL_HIGH
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_LOW);
//
RTE_GPIO_Config(BU98R10_CHIP1_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level
(
BU98R10_CHIP1_SD
,
RTE_GPIO_LEVEL_LOW
);
}
}
void
BU98R10_CHIP0_SET_CSB_LEVEL
(
uint8_t
Level
);
...
...
@@ -52,13 +52,13 @@ void BU98R10_CHIP0_SET_CSB_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_HIGH);
//
RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_CSB
,
RTE_GPIO_LEVEL_HIGH
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP0_CSB, RTE_GPIO_LEVEL_LOW);
//
RTE_GPIO_Config(BU98R10_CHIP0_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_CSB
,
RTE_GPIO_LEVEL_LOW
);
}
}
void
BU98R10_CHIP1_SET_CSB_LEVEL
(
uint8_t
Level
);
...
...
@@ -66,13 +66,13 @@ void BU98R10_CHIP1_SET_CSB_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_HIGH);
//
RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level
(
BU98R10_CHIP1_CSB
,
RTE_GPIO_LEVEL_HIGH
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_CSB
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP1_CSB, RTE_GPIO_LEVEL_LOW);
//
RTE_GPIO_Config(BU98R10_CHIP1_CSB, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level
(
BU98R10_CHIP1_CSB
,
RTE_GPIO_LEVEL_LOW
);
}
}
void
BU98R10_CHIP0_SET_SCL_LEVEL
(
uint8_t
Level
);
...
...
@@ -80,13 +80,13 @@ void BU98R10_CHIP0_SET_SCL_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_HIGH);
//
RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_SCL
,
RTE_GPIO_LEVEL_HIGH
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP0_SCL, RTE_GPIO_LEVEL_LOW);
//
RTE_GPIO_Config(BU98R10_CHIP0_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_SCL
,
RTE_GPIO_LEVEL_LOW
);
}
}
void
BU98R10_CHIP1_SET_SCL_LEVEL
(
uint8_t
Level
);
...
...
@@ -94,13 +94,13 @@ void BU98R10_CHIP1_SET_SCL_LEVEL(uint8_t Level)
{
if
(
Level
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_HIGH);
//
RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Set_Level
(
BU98R10_CHIP1_SCL
,
RTE_GPIO_LEVEL_HIGH
);
}
else
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SCL
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_LOW
);
//
RTE_GPIO_Set_Level(BU98R10_CHIP1_SCL, RTE_GPIO_LEVEL_LOW);
//
RTE_GPIO_Config(BU98R10_CHIP1_SCL, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_LOW);
RTE_GPIO_Set_Level
(
BU98R10_CHIP1_SCL
,
RTE_GPIO_LEVEL_LOW
);
}
}
void
BU98R10_CHIP0_SET_SD_DIR
(
uint8_t
Dir
);
...
...
@@ -108,7 +108,8 @@ void BU98R10_CHIP0_SET_SD_DIR(uint8_t Dir)
{
if
(
Dir
)
{
RTE_GPIO_Config
(
BU98R10_CHIP0_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
RTE_GPIO_Set_Level
(
BU98R10_CHIP0_SD
,
RTE_GPIO_LEVEL_HIGH
);
// RTE_GPIO_Config(BU98R10_CHIP0_SD, RTE_GPIO_DIR_OUT | RTE_GPIO_LEVEL_HIGH);
}
else
{
...
...
@@ -120,7 +121,8 @@ void BU98R10_CHIP1_SET_SD_DIR(uint8_t Dir)
{
if
(
Dir
)
{
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
//RTE_GPIO_Set_Level(BU98R10_CHIP1_SD, RTE_GPIO_LEVEL_HIGH);
RTE_GPIO_Config
(
BU98R10_CHIP1_SD
,
RTE_GPIO_DIR_OUT
|
RTE_GPIO_LEVEL_HIGH
);
}
else
{
...
...
Firmware/Source/Component/Line_In/Line_In_user.c
View file @
4e6b837e
...
...
@@ -12,7 +12,7 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
120U
,
20U
,
Get_LINE_IN_FAULT_ELECTROSPRAY
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
170U
,
20U
,
Get_LINE_IN_Fault_ABS
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
500U
,
20U
,
Get_LINE_IN_Oil_Pressure
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
1
5
0U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
1
4
0U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
500U
,
500U
,
Get_LINE_IN_Little_Lamp
,
},
};
...
...
Firmware/Source/Component/PowerManagement/PowerManag_user.c
View file @
4e6b837e
...
...
@@ -49,6 +49,10 @@ static void Power_KL30_Init(void)
Gpio_Init
(
Gpio_KL30_Init
);
eeprom_StoreInfo_Init
();
Can_Init
();
CAN_TX_Count_Init
();
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
Data_TPMS_KL30_Init
();
DFlash_init
();
Data_Read_DiagPara
();
...
...
@@ -82,7 +86,7 @@ static void Power_KL30_Init(void)
Telltales_Init
();
Telltales_UserInit
();
MenuData_Unit_Init
();
Data_TPMS_KL30_Init
();
RTCInformation
.
u8RTCSecond
=
0
;
RTCInformation
.
u8RTCMinute
=
0
;
RTCInformation
.
u8RTCHour
=
0
;
...
...
@@ -93,8 +97,7 @@ static void Power_KL30_Init(void)
RTE_DEEPSLEEP_GPIO_Interrupt_Enable
(
WAKEUP_KL15_In
,
Trigger_Rising
);
FaultCode_Init
();
CAN_TX_Count_Init
();
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Enable
);
}
extern
uint32_t
PowerIgnOffTimeLine
;
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
4e6b837e
...
...
@@ -44,6 +44,9 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
//Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t
LED_Battery_Voltage
=
0
;
Tellib_uint16_t
Battery_Voltage_valid
=
0
;
Tellib_uint8_t
LED_TCS_STATE
=
0
;
Tellib_uint8_t
LED_TCS_CUR_STATE
=
0
;
Tellib_uint8_t
LED_TCS_VALUE
=
0
;
const
LED_Attribute_st
LED_Attribute
[
LED_Max
]
=
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...
...
@@ -380,6 +383,78 @@ static void LED_Bluetooth_Execution(Tellib_uint16_t led_status)
}
}
static
Tellib_uint16_t
LED_TCS_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Get_Dis_Tcs_Val
()
==
1
)
{
if
((
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x120_Msg_Count
)
==
CAN_SIG_LOST
))
{
LED_TCS_STATE
=
1
;
}
else
{
if
((
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
1
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
2
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
3
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
5
))
{
LED_TCS_STATE
=
1
;
}
else
if
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
4
)
{
LED_TCS_STATE
=
2
;
}
else
if
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
6
)
{
LED_TCS_STATE
=
3
;
}
else
if
((
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
0
)
||
(
Get_CAN_CH0_ID_120_Sig_TCSStatus
()
==
7
))
{
LED_TCS_STATE
=
0
;
}
}
}
else
{
LED_TCS_STATE
=
0
;
}
if
((
LED_TCS_CUR_STATE
==
2
))
{
if
((
LED_TCS_VALUE
==
0
)
&&
(
FLASH_SYNC_1Hz
))
{
LED_TCS_CUR_STATE
=
LED_TCS_STATE
;
}
LED_TCS_VALUE
=
FLASH_SYNC_1Hz
;
LED_STATE
=
FLASH_SYNC_1Hz
;
}
else
if
(
LED_TCS_CUR_STATE
==
3
)
{
if
((
LED_TCS_VALUE
==
0
)
&&
(
FLASH_SYNC_2Hz
))
{
LED_TCS_CUR_STATE
=
LED_TCS_STATE
;
}
LED_TCS_VALUE
=
FLASH_SYNC_2Hz
;
LED_STATE
=
FLASH_SYNC_2Hz
;
}
if
((
LED_TCS_CUR_STATE
!=
2
)
&&
(
LED_TCS_CUR_STATE
!=
3
))
{
LED_TCS_CUR_STATE
=
LED_TCS_STATE
;
if
(
LED_TCS_CUR_STATE
)
{
LED_STATE
=
1
;
}
else
{
LED_STATE
=
0
;
}
}
return
LED_STATE
;
}
#if 0
static Tellib_uint16_t LED_TCS_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
...
...
@@ -419,6 +494,8 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
return LED_STATE;
}
#endif
static
void
LED_TCS_Execution
(
Tellib_uint16_t
led_status
)
{
if
(
led_status
==
1u
)
...
...
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