Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
b955c535
Commit
b955c535
authored
Feb 11, 2025
by
李梓源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:IO口定义
parent
94bc36f4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
84 additions
and
140 deletions
+84
-140
Check_Ctrl.c
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
+3
-3
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+44
-44
RTE_GPIO.c
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
+1
-1
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+33
-89
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+3
-3
No files found.
YueJin_test_bench/source/Appliciation/Check_Ctrl.c
View file @
b955c535
...
@@ -662,7 +662,7 @@ void Function_Check_Ctrl(uint32_t cmd)
...
@@ -662,7 +662,7 @@ void Function_Check_Ctrl(uint32_t cmd)
POWER_CTRL_KL30_Current
=
0
;
POWER_CTRL_KL30_Current
=
0
;
LED4
=
0
;
LED4
=
0
;
POWER_CTRL_KL30
=
0
;
POWER_CTRL_KL30
=
0
;
queren
=
0
;
//
queren = 0 ;
// ABStime = 0;
// ABStime = 0;
break
;
break
;
}
}
...
@@ -681,7 +681,7 @@ void Function_Check_Ctrl(uint32_t cmd)
...
@@ -681,7 +681,7 @@ void Function_Check_Ctrl(uint32_t cmd)
}
}
else
else
{
{
queren
=
1
;
//
queren = 1;
ABStime
=
0
;
ABStime
=
0
;
}
}
...
@@ -696,7 +696,7 @@ void Function_Check_Ctrl(uint32_t cmd)
...
@@ -696,7 +696,7 @@ void Function_Check_Ctrl(uint32_t cmd)
POWER_CTRL_KL30_Current
=
0
;
POWER_CTRL_KL30_Current
=
0
;
LED4
=
0
;
LED4
=
0
;
POWER_CTRL_KL30
=
0
;
POWER_CTRL_KL30
=
0
;
queren
=
0
;
//
queren = 0;
// ABStime = 0;
// ABStime = 0;
break
;
break
;
}
}
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
b955c535
...
@@ -319,53 +319,53 @@ Key_Real_Status_en_t Key_Real_sw3(void)
...
@@ -319,53 +319,53 @@ Key_Real_Status_en_t Key_Real_sw3(void)
return
enKeyRealStatus
;
return
enKeyRealStatus
;
}
}
Key_Real_Status_en_t
Key_Real_sw10
(
void
)
//
Key_Real_Status_en_t Key_Real_sw10(void)
{
//
{
Key_Real_Status_en_t
enKeyRealStatus
=
KEY_LINE_LOOSEN
;
//
Key_Real_Status_en_t enKeyRealStatus = KEY_LINE_LOOSEN;
if
(
SW10
==
0U
)
//
if ( SW10 == 0U )
{
//
{
enKeyRealStatus
=
KEY_LINE_PRESS
;
//
enKeyRealStatus = KEY_LINE_PRESS;
}
//
}
return
enKeyRealStatus
;
//
return enKeyRealStatus;
}
//
}
void
Key_Operation_SW10
(
Key_Event_en_t
enKeyEvent
)
//
void Key_Operation_SW10(Key_Event_en_t enKeyEvent)
{
//
{
/*清零ODO*/
//
/*清零ODO*/
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
//
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{
//
{
if
(
connectbleFlag
==
0
)
//
if(connectbleFlag == 0)
{
//
{
connectbleFlag
=
1
;
//
connectbleFlag = 1;
name1
=
(
devicename
)
&
0xFF
;
//
name1= (devicename) & 0xFF;
name2
=
(
devicename
>>
8
)
&
0xFF
;
//
name2 = (devicename >> 8) & 0xFF;
}
//
}
else
//
else
{
//
{
Display_TFT_Clear
();
//
Display_TFT_Clear();
name1
=
(
devicename
)
&
0xFF
;
//
name1= (devicename) & 0xFF;
name2
=
(
devicename
>>
8
)
&
0xFF
;
//
name2 = (devicename >> 8) & 0xFF;
startONfalg
=
0
;
//
startONfalg = 0;
send0x42time
=
0
;
//
send0x42time = 0;
bleOFFtoONtime
=
0
;
//
bleOFFtoONtime = 0;
startONfalg
=
0
;
//
startONfalg = 0;
startIGONtime
=
0
;
//
startIGONtime = 0;
}
//
}
}
//
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
//
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{
//
{
}
//
}
else
if
(
enKeyEvent
==
KEY_EVENT_SUPER_LONG_PRESS
)
//
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{
//
{
connectbleFlag
=
0
;
//
connectbleFlag = 0;
}
//
}
else
//
else
{
//
{
}
//
}
}
//
}
/*---------------------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------------------*/
const
Key_Attribute_st_t
stKeyAttribute
[
KEY_NUM_MAX
]
=
{
const
Key_Attribute_st_t
stKeyAttribute
[
KEY_NUM_MAX
]
=
{
{
KEY_TYPE_LINE
,
Key_Real_sw5
,
Key_Operation_SW5
},
//SW5
{
KEY_TYPE_LINE
,
Key_Real_sw5
,
Key_Operation_SW5
},
//SW5
...
@@ -374,7 +374,7 @@ const Key_Attribute_st_t stKeyAttribute [ KEY_NUM_MAX ] = {
...
@@ -374,7 +374,7 @@ const Key_Attribute_st_t stKeyAttribute [ KEY_NUM_MAX ] = {
{
KEY_TYPE_LINE
,
Key_Real_sw8
,
Key_Operation_SW8
},
{
KEY_TYPE_LINE
,
Key_Real_sw8
,
Key_Operation_SW8
},
{
KEY_TYPE_LINE
,
Key_Real_sw2
,
Key_Operation_SW2
},
//SW2-
{
KEY_TYPE_LINE
,
Key_Real_sw2
,
Key_Operation_SW2
},
//SW2-
{
KEY_TYPE_LINE
,
Key_Real_sw1
,
Key_Operation_SW1
},
//SW1+
{
KEY_TYPE_LINE
,
Key_Real_sw1
,
Key_Operation_SW1
},
//SW1+
{
KEY_TYPE_LINE
,
Key_Real_sw10
,
Key_Operation_SW10
},
//
{KEY_TYPE_LINE, Key_Real_sw10, Key_Operation_SW10},
{
KEY_TYPE_LINE
,
Key_Real_sw3
,
Key_Operation_SW3
},
//SW1+
{
KEY_TYPE_LINE
,
Key_Real_sw3
,
Key_Operation_SW3
},
//SW1+
};
};
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
View file @
b955c535
...
@@ -101,7 +101,7 @@ void RTE_GPIO_Init(void)
...
@@ -101,7 +101,7 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIODir
=
GPIO_DIR_IN
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_IN
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
GPIO_Config
(
&
gpio_temp
);
queren
=
0
;
//
queren = 0;
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_01
=
1
;
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_02
=
1
;
LINE_OUT_NEG_03
=
1
;
LINE_OUT_NEG_03
=
1
;
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
b955c535
...
@@ -5,101 +5,45 @@
...
@@ -5,101 +5,45 @@
#include "TYW_stdint.h"
#include "TYW_stdint.h"
#include "GPIO.h"
#include "GPIO.h"
#define LINE_IN_CHARGE GPIO_IN_PORT11_PIN00
#define LINE_OUT_NEG_09 GPIO_OUT_PORT10_PIN04 //485_RE
#define LINE_IN_BRAKE_LEVELn GPIO_IN_PORT08_PIN08
#define LINE_IN_OIL_PRESSUREn GPIO_IN_PORT08_PIN09
#define ONE_START GPIO_OUT_PORT10_PIN14 //一键启动
#define LINE_IN_WASHING_LEVELn GPIO_IN_PORT09_PIN01
#define ABC_OUT GPIO_OUT_PORT10_PIN13 //ABC轮动报警输出
#define LINE_IN_PARKn GPIO_IN_PORT09_PIN00
#define RELAY_VBAT_MCU GPIO_OUT_PORT10_PIN10
#define LED1 GPIO_OUT_APORT00_PIN07
#define RELAY_DC12V_MCU GPIO_OUT_PORT10_PIN09
#define LED2 GPIO_OUT_APORT00_PIN08
#define RELAY_KEY_MCU GPIO_OUT_PORT10_PIN07
#define RELAY_LIGHTCONTROL_MCU GPIO_OUT_PORT10_PIN06 //光控大灯MCU
#define LED5 GPIO_OUT_APORT00_PIN12
#define LED6 GPIO_OUT_PORT10_PIN06
#define SW1 GPIO_IN_PORT09_PIN01
#define LED7 GPIO_OUT_PORT10_PIN06
#define SW2 GPIO_IN_PORT09_PIN00
#define SW3 GPIO_IN_APORT00_PIN00
#define LCDAL GPIO_IN_APORT00_PIN13
#define SW4 GPIO_IN_APORT00_PIN01
#define LCDAR GPIO_IN_APORT00_PIN14
#define SW5 GPIO_IN_APORT00_PIN02
#define SW1 GPIO_IN_APORT00_PIN00
#define SW6 GPIO_IN_APORT00_PIN03
#define SW2 GPIO_IN_PORT10_PIN05
#define SW7 GPIO_IN_APORT00_PIN04
#define SW3 GPIO_IN_APORT00_PIN01
#define SW8 GPIO_IN_APORT00_PIN05
#define SW4 GPIO_IN_APORT00_PIN02 //按键-
#define SW5 GPIO_IN_APORT00_PIN03 //按键+
#define AD_B GPIO_IN_APORT00_PIN06
#define ACC_AD GPIO_IN_APORT00_PIN07
#define SW6 GPIO_IN_APORT00_PIN04
#define TY_YL_AD GPIO_IN_APORT00_PIN08
#define SW7 GPIO_IN_APORT00_PIN05
#define WYTY_AD GPIO_IN_APORT00_PIN09
#define SW8 GPIO_IN_APORT00_PIN06 //右转
#define LOGOTY_AD GPIO_IN_APORT00_PIN10
#define SW9 GPIO_IN_PORT09_PIN00
#define DIS_AD GPIO_IN_APORT00_PIN11
#define SW10 GPIO_IN_PORT10_PIN06
#define Light_control_headlights GPIO_IN_APORT00_PIN12 //光控大灯
#define ZXSW_AD GPIO_IN_APORT00_PIN13
#define FUEL_RES_1 GPIO_OUT_PORT00_PIN13
#define ZYS_B GPIO_IN_APORT00_PIN14 //坐桶锁B
// #define FUEL_RES_2 GPIO_OUT_PORT08_PIN12
#define ZYS_A GPIO_IN_APORT00_PIN15 //坐桶锁A
#define FUEL_RES_3 GPIO_OUT_PORT08_PIN10
// #define FUEL_RES_4 GPIO_OUT_PORT08_PIN11
/* ---------------------旧的-------------------------- */
#define LINE_OUT_CHARGER GPIO_OUT_PORT10_PIN06//
#define LINE_OUT_OIL GPIO_OUT_PORT10_PIN06
#define LINE_OUT_BREAK_LEVEL GPIO_OUT_PORT10_PIN06
#define LINE_OUT_WARSH_LEVEL GPIO_OUT_PORT10_PIN06
#define LINE_OUT_PARK GPIO_OUT_PORT10_PIN06
#define LINE_OUT_EPS GPIO_OUT_PORT10_PIN06
#define POWER_CTRL_KL30 GPIO_OUT_PORT10_PIN13
#define POWER_CTRL_KL15 GPIO_OUT_PORT10_PIN12
#define LINE_OUT_FANGDAO GPIO_OUT_PORT10_PIN06
#define SD_FMQ GPIO_OUT_PORT10_PIN02
// #define PWM_FMQ GPIO_OUT_PORT10_PIN06
#define NEG_1_Ctrl GPIO_OUT_PORT09_PIN06
#define NEG_2_Ctrl GPIO_OUT_PORT09_PIN05
#define NEG_3_Ctrl GPIO_OUT_PORT09_PIN04
#define NEG_4_Ctrl GPIO_OUT_PORT09_PIN03
#define NEG_5_Ctrl GPIO_OUT_PORT09_PIN02
// #define NEG_6_Ctrl GPIO_OUT_PORT09_PIN01
#define NEG_7_Ctrl GPIO_OUT_PORT10_PIN07
#define NEG_8_Ctrl GPIO_OUT_PORT10_PIN03
#define NEG_9_Ctrl GPIO_OUT_PORT10_PIN04
#define NEG_10_Ctrl GPIO_OUT_PORT00_PIN08
#define queren GPIO_OUT_PORT00_PIN06
#define LINE_SafeBelt_1 NEG_1_Ctrl
#define LINE_SafeBelt_2 NEG_2_Ctrl
#define LINE_SafeBelt_3 NEG_3_Ctrl
#define LINE_SafeBelt_4 NEG_4_Ctrl
#define LINE_SafeBelt_5 NEG_5_Ctrl
// #define LINE_SafeBelt_2_press NEG_6_Ctrl
#define LINE_SafeBelt_3_press NEG_7_Ctrl
#define LINE_SafeBelt_4_press NEG_8_Ctrl
#define LINE_SafeBelt_5_press NEG_9_Ctrl
//ljs
// #define SW10 GPIO_OUT_PORT10_PIN06 //返回
#define LINE_OUT_POS_02 GPIO_OUT_PORT09_PIN00
#define LINE_OUT_POS_03 GPIO_OUT_APORT00_PIN04
#define LINE_OUT_POS_04 GPIO_OUT_APORT00_PIN05
#define LINE_OUT_POS_05 GPIO_OUT_APORT00_PIN06
#define LINE_OUT_POS_06 GPIO_OUT_APORT00_PIN13
#define LINE_OUT_POS_07 GPIO_OUT_APORT00_PIN14
// #define LINE_OUT_POS_08 GPIO_OUT_PORT08_PIN09
// #define LINE_OUT_POS_09 GPIO_OUT_PORT08_PIN08
// #define LINE_OUT_POS_10 GPIO_OUT_PORT00_PIN07
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06 //12V
#define LINE_OUT_NEG_01 GPIO_OUT_PORT09_PIN06 //12V
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05 //BAT
#define LINE_OUT_NEG_02 GPIO_OUT_PORT09_PIN05 //BAT
#define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04 //BAT~
#define LINE_OUT_NEG_03 GPIO_OUT_PORT09_PIN04 //BAT~
#define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03 //ACC1
#define LINE_OUT_NEG_04 GPIO_OUT_PORT09_PIN03 //ACC1
#define LINE_OUT_NEG_07 GPIO_OUT_PORT10_PIN07
#define LINE_OUT_NEG_08 GPIO_OUT_PORT10_PIN03
#define LINE_OUT_NEG_09 GPIO_OUT_PORT10_PIN04
#define LINE_OUT_NEG_10 GPIO_OUT_PORT00_PIN08
#define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13
#define LINE_FUEL_RES01 GPIO_OUT_PORT00_PIN13
#define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
#define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
b955c535
...
@@ -40,7 +40,7 @@ const unsigned char gImage_cuo1[] = {24, 24,0X00,0X00,0X00,0X00,0X30,0X70,0XE0,0
...
@@ -40,7 +40,7 @@ const unsigned char gImage_cuo1[] = {24, 24,0X00,0X00,0X00,0X00,0X30,0X70,0XE0,0
const
unsigned
char
gImage_dui1
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X40
,
0X00
,
0X00
,
0X00
,
0X00
,
0X08
,
0X18
,
0X30
,
0X70
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X70
,
0X38
,
0X1C
,
0X0E
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,};
const
unsigned
char
gImage_dui1
[]
=
{
24
,
24
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X40
,
0X00
,
0X00
,
0X00
,
0X00
,
0X08
,
0X18
,
0X30
,
0X70
,
0XC0
,
0X80
,
0X00
,
0X00
,
0X80
,
0XC0
,
0XE0
,
0X70
,
0X38
,
0X1C
,
0X0E
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X01
,
0X03
,
0X07
,
0X03
,
0X01
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,
0X00
,};
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
)
void
Sys_Run_Mode_Pseudo_Real_Time_Tasks
(
void
)
{
{
SD_FMQ
=
1
;
//
SD_FMQ = 1;
DoCAN_Communication_Service
(
);
DoCAN_Communication_Service
(
);
if
(
CAN_Msg_Tx_Enable
!=
0
)
if
(
CAN_Msg_Tx_Enable
!=
0
)
{
{
...
@@ -207,7 +207,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
...
@@ -207,7 +207,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
}
}
queren
=
0
;
//
queren = 0;
}
}
else
else
{
{
...
@@ -219,7 +219,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
...
@@ -219,7 +219,7 @@ void Sys_Run_Mode_10ms_Tasks_Group(void)
if
(
clearodotime
>=
1500
)
if
(
clearodotime
>=
1500
)
{
{
// Port_SetPortPinLevel(2,9,PortGpioHigh);
// Port_SetPortPinLevel(2,9,PortGpioHigh);
queren
=
1
;
//
queren = 1;
}
}
}
}
...
...
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