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
383b3337
Commit
383b3337
authored
Sep 08, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加光感检测显示
parent
8a955c56
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
1 deletion
+58
-1
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+24
-0
Display_Info.h
YueJin_test_bench/source/Appliciation/Display_Info.h
+1
-0
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+1
-0
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+15
-0
RTE_GPIO.c
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
+13
-0
RTE_GPIO.h
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
+1
-1
Task.c
YueJin_test_bench/source/Appliciation/Task.c
+2
-0
init.c
YueJin_test_bench/source/System/init.c
+1
-0
No files found.
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
383b3337
...
@@ -4845,6 +4845,30 @@ void Display_flag(uint8_t Check_Steps)
...
@@ -4845,6 +4845,30 @@ void Display_flag(uint8_t Check_Steps)
break
;
break
;
}
}
}
}
uint8_t
LightOutLast
;
void
LightOutServe
(
void
)
{
uint8_t
LightOutHigh
[
4
]
=
{
71
,
65
,
79
,
0xff
};
uint8_t
LightOutDi
[
3
]
=
{
68
,
73
,
0xff
};
if
(
guangganmondel
)
{
if
(
guanggan
!=
LightOutLast
)
{
Display_TFT_Clear
();
}
if
(
guanggan
)
{
General_Number_Disp
(
LightOutHigh
,
3
,
90
+
30
);
}
else
{
General_Number_Disp
(
LightOutDi
,
3
,
90
+
30
);
}
LightOutLast
=
guanggan
;
}
}
void
Page_Num_Display
(
uint8_t
page
)
void
Page_Num_Display
(
uint8_t
page
)
{
{
...
...
YueJin_test_bench/source/Appliciation/Display_Info.h
View file @
383b3337
...
@@ -107,6 +107,7 @@ extern uint32_t loc_Current_0;
...
@@ -107,6 +107,7 @@ extern uint32_t loc_Current_0;
extern
void
Get_static_Current
(
void
);
extern
void
Get_static_Current
(
void
);
extern
uint32_t
Get_Display_Type
(
void
);
extern
uint32_t
Get_Display_Type
(
void
);
extern
void
Display_Num
(
uint16_t
StartX
,
uint16_t
StartY
,
uint16_t
m_NUM
,
uint8_t
CbkCycle
);
extern
void
Display_Num
(
uint16_t
StartX
,
uint16_t
StartY
,
uint16_t
m_NUM
,
uint8_t
CbkCycle
);
extern
void
LightOutServe
(
void
);
extern
const
uint8_t
*
Num_15
[];
extern
const
uint8_t
*
Num_15
[];
typedef
struct
{
typedef
struct
{
uint8_t
going
[
5
];
uint8_t
going
[
5
];
...
...
YueJin_test_bench/source/Appliciation/Key.h
View file @
383b3337
...
@@ -160,5 +160,6 @@ extern uint8_t Study_Flag;
...
@@ -160,5 +160,6 @@ extern uint8_t Study_Flag;
extern
uint8_t
Require_card_flag
;
extern
uint8_t
Require_card_flag
;
extern
uint8_t
writeflag
;
extern
uint8_t
writeflag
;
extern
uint8_t
uidwriteStep
;
extern
uint8_t
uidwriteStep
;
extern
uint8_t
guangganmondel
;
#endif
#endif
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
383b3337
...
@@ -102,10 +102,12 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
...
@@ -102,10 +102,12 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
{
}
}
}
}
uint8_t
guangganmondel
=
0
;
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
{
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
{
guangganmondel
=
0
;
check_Control_Mode2_Flag
=
0
;
check_Control_Mode2_Flag
=
0
;
Display_SUCCESS_Clear
();
Display_SUCCESS_Clear
();
if
(
UIDMondel
==
0
)
if
(
UIDMondel
==
0
)
...
@@ -184,10 +186,23 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
...
@@ -184,10 +186,23 @@ void Key_Operation_SW5(Key_Event_en_t enKeyEvent)
change
=
17
;
change
=
17
;
UUIDX
=
170
;
UUIDX
=
170
;
}
}
guangganmondel
=
0
;
}
}
}
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
{
UIDMondel
=
0
;
memset
(
&
All_Flag
,
0
,
sizeof
(
All_Flag
));
All_Flag
.
u8flag
[
2
]
=
1
;
Display_TFT_Clear
();
if
(
guangganmondel
)
{
guangganmondel
=
0
;
}
else
{
guangganmondel
=
1
;
}
}
}
else
else
{
{
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.c
View file @
383b3337
...
@@ -71,6 +71,13 @@ void RTE_GPIO_Init(void)
...
@@ -71,6 +71,13 @@ void RTE_GPIO_Init(void)
GPIO_Init
(
GPIO_WAKEUP_MODE
);
GPIO_Init
(
GPIO_WAKEUP_MODE
);
// gpio_temp.enGPIOPort = GPIO_PORT_GROUP_8;//光感输入
// gpio_temp.enGPIOPIN = GPIO_PIN_12;
// gpio_temp.enGPIOMode = GPIO_MODE_PORT;
// gpio_temp.enGPIODir = GPIO_DIR_IN;
// gpio_temp.enGPIOAltFun = GPIO_ALTER_FUN_1;
// GPIO_Config(&gpio_temp);
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_AP0
;
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_AP0
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_14
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_14
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
...
@@ -120,6 +127,12 @@ void RTE_GPIO_Init(void)
...
@@ -120,6 +127,12 @@ void RTE_GPIO_Init(void)
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
GPIO_Config
(
&
gpio_temp
);
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_9
;
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_9
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_1
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIOAltFun
=
GPIO_ALTER_FUN_1
;
GPIO_Config
(
&
gpio_temp
);
gpio_temp
.
enGPIOPort
=
GPIO_PORT_GROUP_9
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_4
;
gpio_temp
.
enGPIOPIN
=
GPIO_PIN_4
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIOMode
=
GPIO_MODE_PORT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
gpio_temp
.
enGPIODir
=
GPIO_DIR_OUT
;
...
...
YueJin_test_bench/source/Appliciation/RTE_GPIO.h
View file @
383b3337
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
#define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
#define LINE_FUEL_RES03 GPIO_OUT_PORT08_PIN10
#define LINE_FUEL_RES04 GPIO_OUT_PORT08_PIN11 //左转 输入
#define LINE_FUEL_RES04 GPIO_OUT_PORT08_PIN11 //左转 输入
#define
LINE_FUEL_RES02 GPIO_OUT
_PORT08_PIN12 //右转 输入
#define
guanggan GPIO_IN
_PORT08_PIN12 //右转 输入
#define GPIO_VSpeed_PWM_IN GPIO_IN_PORT10_PIN15
#define GPIO_VSpeed_PWM_IN GPIO_IN_PORT10_PIN15
...
...
YueJin_test_bench/source/Appliciation/Task.c
View file @
383b3337
...
@@ -147,6 +147,8 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
...
@@ -147,6 +147,8 @@ void Sys_Run_Mode_100ms_Tasks_Group(void)
{
{
UIDDisplay
();
UIDDisplay
();
}
}
LightOutServe
();
}
}
/*=================================================================*/
/*=================================================================*/
...
...
YueJin_test_bench/source/System/init.c
View file @
383b3337
...
@@ -96,6 +96,7 @@ void Sys_Startup_Init(void)
...
@@ -96,6 +96,7 @@ void Sys_Startup_Init(void)
loc_config
.
pfnUARTErrHandleCallBack
=
0
;
loc_config
.
pfnUARTErrHandleCallBack
=
0
;
loc_config
.
pfnUARTReadMsgCallBack
=
UART_Put
;
loc_config
.
pfnUARTReadMsgCallBack
=
UART_Put
;
UART_Init
(
UART_RLIN30
,
&
loc_config
);
UART_Init
(
UART_RLIN30
,
&
loc_config
);
LINE_OUT_NEG_06
=
1
;
// loc_config.enUARTLINMode = MODE_UART;
// loc_config.enUARTLINMode = MODE_UART;
// loc_config.u32UARTbps = 9600;
// loc_config.u32UARTbps = 9600;
// loc_config.enUARTOrder = UART_LSB;
// loc_config.enUARTOrder = UART_LSB;
...
...
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