Commit 2abc847e authored by 李俭双's avatar 李俭双

feat:增加硬线信号

parent bfd1856c
......@@ -8,8 +8,11 @@ const Line_In_Attribute_st g_stLineInAttribute[LINE_IN_MAX] =
{
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_TurnLeft, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_TurnRight, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 60U, 20U, Get_LINE_IN_HighBeam, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 100U, 20U, Get_LINE_IN_Auto_Start_Stop, },
{LEVEL_LOW, LEVEL_HIGH, LINE_IN_IG_ON, 60U, 20U, Get_LINE_IN_HighBeam, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_FAULT_ELECTROSPRAY, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Fault_ABS, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Oil_Pressure, },
{LEVEL_HIGH, LEVEL_LOW, LINE_IN_IG_ON, 20U, 20U, Get_LINE_IN_Auto_Start_Stop, },
};
......@@ -55,6 +58,46 @@ Linelib_uint8_t Get_LINE_IN_HighBeam(void)
return ret;
}
Linelib_uint8_t Get_LINE_IN_FAULT_ELECTROSPRAY(void)
{
Linelib_uint8_t ret = 0;
if(RTE_GPIO_Get_Level(Fault_Diagnosis_IN))
{
ret = 1;
}
else
{
ret = 0;
}
}
Linelib_uint8_t Get_LINE_IN_Fault_ABS(void)
{
Linelib_uint8_t ret = 0;
if(RTE_GPIO_Get_Level(Fault_ABS_IN))
{
ret = 1;
}
else
{
ret = 0;
}
}
Linelib_uint8_t Get_LINE_IN_Oil_Pressure(void)
{
Linelib_uint8_t ret = 0;
if(RTE_GPIO_Get_Level(Oil_Pressure_IN))
{
ret = 1;
}
else
{
ret = 0;
}
}
Linelib_uint8_t Get_LINE_IN_Auto_Start_Stop(void)
{
Linelib_uint8_t ret = 0U;
......
......@@ -7,9 +7,11 @@ typedef enum
{
LINE_IN_TurnLeft = 0,
LINE_IN_TurnRight,
LINE_IN_HighBeam,
LINE_IN_Auto_Start_Stop,
LINE_IN_MAX,
LINE_IN_HighBeam,
LINE_IN_FAULT_ELECTROSPRAY,
LINE_IN_Fault_ABS,
LINE_IN_Oil_Pressure,
LINE_IN_Auto_Start_Stop,
} LINE_IN_Enum_t;
extern void LINE_IN_Init(void);
......@@ -17,7 +19,9 @@ extern void LINE_IN_Init(void);
Linelib_uint8_t Get_LINE_IN_TurnLeft(void);
Linelib_uint8_t Get_LINE_IN_TurnRight(void);
Linelib_uint8_t Get_LINE_IN_HighBeam(void);
Linelib_uint8_t Get_LINE_IN_FAULT_ELECTROSPRAY(void);
Linelib_uint8_t Get_LINE_IN_Fault_ABS(void);
Linelib_uint8_t Get_LINE_IN_Oil_Pressure(void);
Linelib_uint8_t Get_LINE_IN_Auto_Start_Stop(void);
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment