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
TY
TianYing_ty100
Commits
2abc847e
Commit
2abc847e
authored
May 05, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加硬线信号
parent
bfd1856c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
6 deletions
+53
-6
Line_In_user.c
Firmware/Source/Component/Line_In/Line_In_user.c
+45
-2
Line_In_user.h
Firmware/Source/Component/Line_In/Line_In_user.h
+8
-4
No files found.
Firmware/Source/Component/Line_In/Line_In_user.c
View file @
2abc847e
...
...
@@ -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
;
...
...
Firmware/Source/Component/Line_In/Line_In_user.h
View file @
2abc847e
...
...
@@ -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
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