Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZhongTong-ZR5-A
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
赵康弘
ZhongTong-ZR5-A
Commits
92c5b596
Commit
92c5b596
authored
Sep 27, 2025
by
赵康弘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 上位机相关
parent
8da627ff
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
169 additions
and
54 deletions
+169
-54
test_Port_Port_ecuc.arxml
Config/Config292/Config/ECUC/test_Port_Port_ecuc.arxml
+16
-16
Port_Cfg.h
Config/Config292/Output/Port_OutPut/include/Port_Cfg.h
+1
-1
Port_PBcfg.c
Config/Config292/Output/Port_OutPut/src/Port_PBcfg.c
+16
-16
App.gpj
GHS/App/App.gpj
+2
-0
PC_Control.c
GHS/App/PC_Control.c
+52
-0
PC_Control.h
GHS/App/PC_Control.h
+6
-0
SGM4591Q.c
GHS/App/SGM4591Q.c
+2
-2
SGMCD1020Q.c
GHS/App/SGMCD1020Q.c
+0
-2
TPS2HB35AQPWPRQ1.h
GHS/App/TPS2HB35AQPWPRQ1.h
+71
-0
Simulated_SPI_1_Master.c
GHS/Driver/Simulated_SPI_1_Master.c
+0
-14
Simulated_SPI_Master.c
GHS/Driver/Simulated_SPI_Master.c
+0
-2
Sys_Task_List.c
GHS/System/Sys_Task_List.c
+3
-1
No files found.
Config/Config292/Config/ECUC/test_Port_Port_ecuc.arxml
View file @
92c5b596
This diff is collapsed.
Click to expand it.
Config/Config292/Output/Port_OutPut/include/Port_Cfg.h
View file @
92c5b596
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\generator\BSWMDT\R431_PORT_U2A8_BSWMDT.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\generator\BSWMDT\R431_PORT_U2A8_BSWMDT.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\stubs\Dem\xml\Dem_Port.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\stubs\Dem\xml\Dem_Port.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\Translation.trxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\Translation.trxml
* GENERATED ON: 2
6 Sep 2025 - 15:46:21
* GENERATED ON: 2
7 Sep 2025 - 11:58:57
*/
*/
...
...
Config/Config292/Output/Port_OutPut/src/Port_PBcfg.c
View file @
92c5b596
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\generator\BSWMDT\R431_PORT_U2A8_BSWMDT.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\generator\BSWMDT\R431_PORT_U2A8_BSWMDT.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\stubs\Dem\xml\Dem_Port.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\stubs\Dem\xml\Dem_Port.arxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\Translation.trxml
* E:\Git\中通\ZhongTong-ZR5-A\Config\Config292\Translation.trxml
* GENERATED ON: 2
6 Sep 2025 - 11:32:0
7
* GENERATED ON: 2
7 Sep 2025 - 11:58:5
7
*/
*/
...
@@ -4330,16 +4330,16 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
...
@@ -4330,16 +4330,16 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
/* Index: 0 - Register Value */
/* Index: 0 - Register Value */
{
{
/* PMC */
/* PMC */
0x068
2
U
,
0x068
0
U
,
/* PM */
/* PM */
0x
E4
8AU
,
0x
CC
8AU
,
/* PIPC */
/* PIPC */
0x0000U
,
0x0000U
,
/* PIBC */
/* PIBC */
0x0
000
U
,
0x0
808
U
,
/* PFC */
/* PFC */
0x0080U
,
0x0080U
,
...
@@ -4378,7 +4378,7 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
...
@@ -4378,7 +4378,7 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
0x0000U
,
0x0000U
,
/* PU */
/* PU */
0x000
2
U
,
0x000
0
U
,
/* PD */
/* PD */
0x0000U
,
0x0000U
,
...
@@ -4773,13 +4773,13 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
...
@@ -4773,13 +4773,13 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
0x6001U
,
0x6001U
,
/* PM */
/* PM */
0xB
CB
7U
,
0xB
E3
7U
,
/* PIPC */
/* PIPC */
0x0000U
,
0x0000U
,
/* PIBC */
/* PIBC */
0x0
0
00U
,
0x0
2
00U
,
/* PFC */
/* PFC */
0x4000U
,
0x4000U
,
...
@@ -5210,22 +5210,22 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
...
@@ -5210,22 +5210,22 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
/* Index: 0 - Register Value */
/* Index: 0 - Register Value */
{
{
/* PMC */
/* PMC */
0x000
F
U
,
0x000
B
U
,
/* PM */
/* PM */
0xFFF2U
,
0xFFF2U
,
/* PIPC */
/* PIPC */
0x000
4
U
,
0x000
0
U
,
/* PIBC */
/* PIBC */
0x0000U
,
0x0000U
,
/* PFC */
/* PFC */
0x000
F
U
,
0x000
B
U
,
/* PFCE */
/* PFCE */
0x000
F
U
,
0x000
B
U
,
/* PFCAE */
/* PFCAE */
0x0000U
,
0x0000U
,
...
@@ -5320,22 +5320,22 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
...
@@ -5320,22 +5320,22 @@ CONST(Port_Reg_Init, PORT_CONFIG_DATA) Port_GaaPortConfig[] =
/* Index: 0 - Register Value */
/* Index: 0 - Register Value */
{
{
/* PMC */
/* PMC */
0x001
F
U
,
0x001
C
U
,
/* PM */
/* PM */
0xFF
EA
U
,
0xFF
FB
U
,
/* PIPC */
/* PIPC */
0x000
1
U
,
0x000
0
U
,
/* PIBC */
/* PIBC */
0x0000U
,
0x0000U
,
/* PFC */
/* PFC */
0x001
F
U
,
0x001
C
U
,
/* PFCE */
/* PFCE */
0x001
F
U
,
0x001
C
U
,
/* PFCAE */
/* PFCAE */
0x0008U
,
0x0008U
,
...
...
GHS/App/App.gpj
View file @
92c5b596
#!gbuild
#!gbuild
[Subproject]
[Subproject]
PC_Control.c
PC_Control.h
TPS2HB35AQPWPRQ1.c
TPS2HB35AQPWPRQ1.c
TPS2HB35AQPWPRQ1.h
TPS2HB35AQPWPRQ1.h
SGMCD1020Q.c
SGMCD1020Q.c
...
...
GHS/App/PC_Control.c
0 → 100644
View file @
92c5b596
#include "PC_Control.h"
#include "TPS2HB35AQPWPRQ1.h"
#include "MC33984EHFK.h"
#include "SGM4591Q.h"
/*此文件用于上位机控制U16和U48*/
/*U16*/
void
PC_Control_U16
(
void
)
{
uint8_t
state_23
=
1
;
uint8_t
state_24
=
1
;
/*DIA_EN 引脚置为高电平*/
SGM4591Q_Chip3_2_Segment1
.
BIT
.
PIN_3
=
1
;
SGM4591Q_Global_Control
(
SGM4591Q_Chip3_2
,
SGM4591Q_Segment1
);
/*OUT23*/
if
(
state_23
==
1
)
{
TPS2HB35_SetOutput3A_OUT23
(
1
);
}
else
if
(
state_23
==
0
)
{
TPS2HB35_SetOutput3A_OUT23
(
0
);
}
else
{
;
}
/*OUT24*/
if
(
state_24
==
1
)
{
TPS2HB35_SetOutput3A_OUT24
(
1
);
}
else
if
(
state_24
==
0
)
{
TPS2HB35_SetOutput3A_OUT24
(
0
);
}
else
{
;
}
}
/*U48*/
GHS/App/PC_Control.h
0 → 100644
View file @
92c5b596
#include "TYW_stdint.h"
void
PC_Control_U16
(
void
);
GHS/App/SGM4591Q.c
View file @
92c5b596
...
@@ -230,14 +230,14 @@ void SGM4591Q_Control(void)
...
@@ -230,14 +230,14 @@ void SGM4591Q_Control(void)
if
(
SGM4591Q_U9_Out_Keep_P0
!=
SGM4591Q_U9_Out_P0
)
if
(
SGM4591Q_U9_Out_Keep_P0
!=
SGM4591Q_U9_Out_P0
)
{
{
/*设置端口输出电平高低*/
/*设置端口输出电平高低*/
SGM4591Q_IIC
2
_Send
(
0xE8
,
0x02
,
SGM4591Q_U9_Out_P0
);
SGM4591Q_IIC
1
_Send
(
0xE8
,
0x02
,
SGM4591Q_U9_Out_P0
);
SGM4591Q_U9_Out_Keep_P0
=
SGM4591Q_U9_Out_P0
;
SGM4591Q_U9_Out_Keep_P0
=
SGM4591Q_U9_Out_P0
;
}
}
if
(
SGM4591Q_U9_Out_Keep_P1
!=
SGM4591Q_U9_Out_P1
)
if
(
SGM4591Q_U9_Out_Keep_P1
!=
SGM4591Q_U9_Out_P1
)
{
{
/*设置端口输出电平高低*/
/*设置端口输出电平高低*/
SGM4591Q_IIC
2
_Send
(
0xE8
,
0x03
,
SGM4591Q_U9_Out_P1
);
SGM4591Q_IIC
1
_Send
(
0xE8
,
0x03
,
SGM4591Q_U9_Out_P1
);
SGM4591Q_U9_Out_Keep_P1
=
SGM4591Q_U9_Out_P1
;
SGM4591Q_U9_Out_Keep_P1
=
SGM4591Q_U9_Out_P1
;
}
}
}
}
...
...
GHS/App/SGMCD1020Q.c
View file @
92c5b596
...
@@ -231,12 +231,10 @@ void SGMCD1020Q_ReadAndProcessSwitches(uint8_t Chip)
...
@@ -231,12 +231,10 @@ void SGMCD1020Q_ReadAndProcessSwitches(uint8_t Chip)
}
}
else
if
(
Chip
==
2
)
else
if
(
Chip
==
2
)
{
{
SGMCD1020Q_2
.
raw_value
=
newStatus
;
SGMCD1020Q_2
.
raw_value
=
newStatus
;
}
}
else
if
(
Chip
==
3
)
else
if
(
Chip
==
3
)
{
{
SGMCD1020Q_3
.
raw_value
=
newStatus
;
SGMCD1020Q_3
.
raw_value
=
newStatus
;
}
}
else
else
...
...
GHS/App/TPS2HB35AQPWPRQ1.h
View file @
92c5b596
#include "TYW_stdint.h"
/*3A外发12片*2路*/
void
TPS2HB35_SetOutput3A_OUT1
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT2
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT3
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT4
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT5
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT6
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT7
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT8
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT9
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT10
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT11
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT12
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT13
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT14
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT15
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT16
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT17
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT18
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT19
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT20
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT21
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT22
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT23
(
uint8_t
state
);
void
TPS2HB35_SetOutput3A_OUT24
(
uint8_t
state
);
/*5A外发10片*2路*/
void
TPS2HB35_SetOutput5A_OUT1
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT2
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT3
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT4
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT5
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT6
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT7
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT8
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT9
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT10
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT11
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT12
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT13
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT14
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT15
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT16
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT17
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT18
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT19
(
uint8_t
state
);
void
TPS2HB35_SetOutput5A_OUT20
(
uint8_t
state
);
/*10A外发4片*2路*/
void
TPS2HB35_SetOutput10A_OUT1
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT2
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT3
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT4
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT5
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT6
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT7
(
uint8_t
state
);
void
TPS2HB35_SetOutput10A_OUT8
(
uint8_t
state
);
/*15A外发14片*1路*/
void
TPS2HB35_SetOutput15A_OUT1
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT2
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT3
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT4
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT5
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT6
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT7
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT8
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT9
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT10
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT11
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT12
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT13
(
uint8_t
state
);
void
TPS2HB35_SetOutput15A_OUT14
(
uint8_t
state
);
\ No newline at end of file
GHS/Driver/Simulated_SPI_1_Master.c
View file @
92c5b596
...
@@ -193,9 +193,6 @@ void Sim_SPI_Master_1_Byte_Write(uint8_t Data)
...
@@ -193,9 +193,6 @@ void Sim_SPI_Master_1_Byte_Write(uint8_t Data)
}
}
}
}
// uint8 GaaByteAcccccccc[100] = { 0 };
uint8_t
BitPosfsfds
;
uint8_t
gfdgdg
=
0
;
/******************************************************************************
/******************************************************************************
��������Sim_SPI_Master_1_Byte_Read
��������Sim_SPI_Master_1_Byte_Read
�� �ܣ���SPI�����϶�ȡһ�ֽ�����
�� �ܣ���SPI�����϶�ȡһ�ֽ�����
...
@@ -207,7 +204,6 @@ uint8_t Sim_SPI_Master_1_Byte_Read(uint8_t TxData)
...
@@ -207,7 +204,6 @@ uint8_t Sim_SPI_Master_1_Byte_Read(uint8_t TxData)
uint8_t
RxData
;
uint8_t
RxData
;
uint8_t
BitPos
;
uint8_t
BitPos
;
RxData
=
0x00
;
RxData
=
0x00
;
// BitPosfsfds=Dio_ReadChannel(Port_Config_PortGroup2_PortPin3);
if
(
SimSPIConfig_1
.
FirstBit
==
SIM_SPI_MSB_FIRST
)
if
(
SimSPIConfig_1
.
FirstBit
==
SIM_SPI_MSB_FIRST
)
{
{
...
@@ -245,16 +241,6 @@ uint8_t Sim_SPI_Master_1_Byte_Read(uint8_t TxData)
...
@@ -245,16 +241,6 @@ uint8_t Sim_SPI_Master_1_Byte_Read(uint8_t TxData)
NOP
();
NOP
();
NOP
();
NOP
();
// if (gfdgdg < 99)
// {
// gfdgdg++;
// }
// else
// {
// gfdgdg = 0;
// }
// GaaByteAcccccccc[gfdgdg] = Dio_ReadChannel(Port_Config_PortGroup2_PortPin3);
if
(
Dio_ReadChannel
(
Port_Config_PortGroup2_PortPin3
))
if
(
Dio_ReadChannel
(
Port_Config_PortGroup2_PortPin3
))
RxData
|=
BitPos
;
RxData
|=
BitPos
;
}
}
...
...
GHS/Driver/Simulated_SPI_Master.c
View file @
92c5b596
...
@@ -182,7 +182,6 @@ void Sim_SPI_Master_0_Byte_Write(uint8_t Data)
...
@@ -182,7 +182,6 @@ void Sim_SPI_Master_0_Byte_Write(uint8_t Data)
}
}
}
}
// uint8_t BitPosfsfds;
/******************************************************************************
/******************************************************************************
��������Sim_SPI_Master_0_Byte_Read
��������Sim_SPI_Master_0_Byte_Read
�� �ܣ���SPI�����϶�ȡһ�ֽ�����
�� �ܣ���SPI�����϶�ȡһ�ֽ�����
...
@@ -194,7 +193,6 @@ uint8_t Sim_SPI_Master_0_Byte_Read(uint8_t TxData)
...
@@ -194,7 +193,6 @@ uint8_t Sim_SPI_Master_0_Byte_Read(uint8_t TxData)
uint8_t
RxData
;
uint8_t
RxData
;
uint8_t
BitPos
;
uint8_t
BitPos
;
RxData
=
0x00
;
RxData
=
0x00
;
// BitPosfsfds=Dio_ReadChannel(Port_Config_PortGroup2_PortPin11);
if
(
SimSPIConfig
.
FirstBit
==
SIM_SPI_MSB_FIRST
)
if
(
SimSPIConfig
.
FirstBit
==
SIM_SPI_MSB_FIRST
)
{
{
...
...
GHS/System/Sys_Task_List.c
View file @
92c5b596
...
@@ -8,6 +8,7 @@
...
@@ -8,6 +8,7 @@
#include "SGM4591Q.h"
#include "SGM4591Q.h"
#include "MC33984EHFK.h"
#include "MC33984EHFK.h"
#include "SGMCD1020Q.h"
#include "SGMCD1020Q.h"
#include "PC_Control.h"
void
Sys_50us_Tasks
(
void
)
void
Sys_50us_Tasks
(
void
)
...
@@ -107,7 +108,7 @@ void Sys_100ms_Tasks(void)
...
@@ -107,7 +108,7 @@ void Sys_100ms_Tasks(void)
ADC_4
=
g_u16ADCValue
[
i
];
ADC_4
=
g_u16ADCValue
[
i
];
}
}
}
}
//
SGM4591Q_Control();
SGM4591Q_Control
();
// Port_SetPinDirection(Port_Config_PortGroup4_PortPin8, PORT_PIN_OUT);
// Port_SetPinDirection(Port_Config_PortGroup4_PortPin8, PORT_PIN_OUT);
Dio_WriteChannel
(
DioConf_DioChannel_P04_08
,
STD_LOW
);
Dio_WriteChannel
(
DioConf_DioChannel_P04_08
,
STD_LOW
);
...
@@ -145,4 +146,5 @@ void Sys_100ms_Tasks(void)
...
@@ -145,4 +146,5 @@ void Sys_100ms_Tasks(void)
// Port_SetPinDirection(Port_Config_PortGroup22_PortPin3, PORT_PIN_OUT);
// Port_SetPinDirection(Port_Config_PortGroup22_PortPin3, PORT_PIN_OUT);
SGMCD1020Q_MainFunction
();
SGMCD1020Q_MainFunction
();
PC_Control_U16
();
}
}
\ No newline at end of file
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