Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
c9abbe84
Commit
c9abbe84
authored
Jul 11, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加硬线功能
parent
2dc7eef3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
135 additions
and
30 deletions
+135
-30
Line_In_user.c
Firmware/Source/Component/Line_In/Line_In_user.c
+114
-21
Line_In_user.h
Firmware/Source/Component/Line_In/Line_In_user.h
+21
-9
No files found.
Firmware/Source/Component/Line_In/Line_In_user.c
View file @
c9abbe84
...
...
@@ -5,63 +5,156 @@
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_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Turn_Left
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Turn_Right
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
60U
,
20U
,
Get_LINE_IN_High_Beam
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
100U
,
20U
,
Get_LINE_IN_Efi_Fault
,
},
{
LEVEL_HIGH
,
LEVEL_LOW
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_ABS
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Auto_Start_Stop
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Oil_Pressure_Alert
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Voltage
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_Fuel_Level_Low
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_E
,
},
{
LEVEL_LOW
,
LEVEL_HIGH
,
LINE_IN_IG_ON
,
20U
,
20U
,
Get_LINE_IN_S
,
},
};
Linelib_uint8_t
Get_LINE_IN_TurnLeft
(
void
)
Linelib_uint8_t
Get_LINE_IN_Turn_Left
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
//if (RTE_GPIO_Get_Level(LeftTurn_P_In
))
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
//
else
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_TurnRight
(
void
)
Linelib_uint8_t
Get_LINE_IN_Turn_Right
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
//if (RTE_GPIO_Get_Level(RightTurn_P_In
))
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
//
else
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_HighBeam
(
void
)
Linelib_uint8_t
Get_LINE_IN_High_Beam
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
//if (RTE_GPIO_Get_Level(HighBeam_P_In
))
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
//else
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_Efi_Fault
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_ABS
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_Auto_Start_Stop
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
//if (RTE_GPIO_Get_Level(START_STOP_P_IN))
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_Oil_Pressure_Alert
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_Voltage
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_Fuel_Level_Low
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_E
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
else
{
ret
=
0UL
;
}
return
ret
;
}
Linelib_uint8_t
Get_LINE_IN_S
(
void
)
{
Linelib_uint8_t
ret
=
0U
;
if
(
RTE_GPIO_Get_Level
(
LeftTurn_MUC_OUT
))
{
ret
=
1u
;
}
//
else
else
{
ret
=
0UL
;
}
...
...
@@ -74,7 +167,7 @@ Linelib_uint8_t LINE_IN_Men[LINE_IN_MAX * LINE_IN_BLOCK_SIZE];
static
Linelib_uint16_t
LINE_GET_PWR
(
void
)
{
Linelib_uint16_t
Res
;
//
Res = Common_Get_IG_Sts() & 0x00FFu;
Res
=
Common_Get_IG_Sts
()
&
0x00FFu
;
return
Res
;
}
...
...
Firmware/Source/Component/Line_In/Line_In_user.h
View file @
c9abbe84
...
...
@@ -5,19 +5,31 @@
typedef
enum
{
LINE_IN_TurnLeft
=
0
,
LINE_IN_TurnRight
,
LINE_IN_HighBeam
,
LINE_IN_Auto_Start_Stop
,
LINE_IN_Turn_Left
,
LINE_IN_Turn_Right
,
LINE_IN_High_Beam
,
LINE_IN_Efi_Fault
,
LINE_IN_ABS
,
LINE_IN_Auto_Start_Stop
,
LINE_IN_Oil_Pressure_Alert
,
LINE_IN_Voltage
,
LINE_IN_Fuel_Level_Low
,
LINE_IN_E
,
LINE_IN_S
,
LINE_IN_MAX
,
}
LINE_IN_Enum_t
;
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_Turn_Left
(
void
);
Linelib_uint8_t
Get_LINE_IN_Turn_Right
(
void
);
Linelib_uint8_t
Get_LINE_IN_High_Beam
(
void
);
Linelib_uint8_t
Get_LINE_IN_Efi_Fault
(
void
);
Linelib_uint8_t
Get_LINE_IN_ABS
(
void
);
Linelib_uint8_t
Get_LINE_IN_Auto_Start_Stop
(
void
);
Linelib_uint8_t
Get_LINE_IN_Oil_Pressure_Alert
(
void
);
Linelib_uint8_t
Get_LINE_IN_Voltage
(
void
);
Linelib_uint8_t
Get_LINE_IN_Fuel_Level_Low
(
void
);
Linelib_uint8_t
Get_LINE_IN_E
(
void
);
Linelib_uint8_t
Get_LINE_IN_S
(
void
);
#endif
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