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
f6475d94
Commit
f6475d94
authored
Sep 23, 2025
by
赵康弘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docs: TPS2HB35AQPWPRQ1文件上传
parent
068e7a92
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
865 additions
and
0 deletions
+865
-0
SGM4591Q.c
GHS/App/SGM4591Q.c
+110
-0
SGM4591Q.h
GHS/App/SGM4591Q.h
+37
-0
TPS2HB35AQPWPRQ1.c
GHS/App/TPS2HB35AQPWPRQ1.c
+718
-0
TPS2HB35AQPWPRQ1.h
GHS/App/TPS2HB35AQPWPRQ1.h
+0
-0
No files found.
GHS/App/SGM4591Q.c
View file @
f6475d94
#include "SGM4591Q.h"
#include "Simulated_IIC_2_Master.h"
/*PIN端口控制命令*/
uint8_t
SGM4591Q_Chip1_1_PIN0
=
0
;
uint8_t
SGM4591Q_Chip1_1_PIN1
=
0
;
uint8_t
SGM4591Q_Chip1_2_PIN0
=
0
;
uint8_t
SGM4591Q_Chip1_2_PIN1
=
0
;
uint8_t
SGM4591Q_Chip1_3_PIN0
=
0
;
uint8_t
SGM4591Q_Chip1_3_PIN1
=
0
;
uint8_t
SGM4591Q_Chip1_4_PIN0
=
0
;
uint8_t
SGM4591Q_Chip1_4_PIN1
=
0
;
uint8_t
SGM4591Q_Chip2_1_PIN0
=
0
;
uint8_t
SGM4591Q_Chip2_1_PIN1
=
0
;
uint8_t
SGM4591Q_Chip2_2_PIN0
=
0
;
uint8_t
SGM4591Q_Chip2_2_PIN1
=
0
;
uint8_t
SGM4591Q_Chip2_3_PIN0
=
0
;
uint8_t
SGM4591Q_Chip2_3_PIN1
=
0
;
uint8_t
SGM4591Q_Chip2_4_PIN0
=
0
;
uint8_t
SGM4591Q_Chip2_4_PIN1
=
0
;
uint8_t
SGM4591Q_Chip3_1_PIN0
=
0
;
uint8_t
SGM4591Q_Chip3_1_PIN1
=
0
;
uint8_t
SGM4591Q_Chip3_2_PIN0
=
0
;
uint8_t
SGM4591Q_Chip3_2_PIN1
=
0
;
uint8_t
SGM4591Q_Chip3_3_PIN0
=
0
;
uint8_t
SGM4591Q_Chip3_3_PIN1
=
0
;
uint8_t
SGM4591Q_Chip3_4_PIN0
=
0
;
uint8_t
SGM4591Q_Chip3_4_PIN1
=
0
;
uint8_t
SGM4591Q_Chip4_1_PIN0
=
0
;
uint8_t
SGM4591Q_Chip4_1_PIN1
=
0
;
uint8_t
SGM4591Q_Chip4_2_PIN0
=
0
;
uint8_t
SGM4591Q_Chip4_2_PIN1
=
0
;
uint8_t
SGM4591Q_Chip4_3_PIN0
=
0
;
uint8_t
SGM4591Q_Chip4_3_PIN1
=
0
;
uint8_t
SGM4591Q_Chip4_4_PIN0
=
0
;
uint8_t
SGM4591Q_Chip4_4_PIN1
=
0
;
/*发送*/
void
SGM4591Q_IIC_Send
(
uint8_t
Address
,
uint8_t
Register
,
uint8_t
Function
)
{
...
...
@@ -112,3 +151,74 @@ void SGM4591Q_Control(void)
SGM4591Q_U9_Out_Keep_P1
=
SGM4591Q_U9_Out_P1
;
}
}
/*多次对引脚的控制,后面的操作不能影响之前的控制*/
/*
Chip:片选
Segment:段P0/P1
PIN:端口0--7
*/
void
SGM4591Q_Global_Control
(
uint8_t
Chip
,
uint8_t
Segment
,
uint8_t
PIN
)
{
switch
(
Chip
)
{
case
SGM4591Q_Chip1_1
:
if
(
Segment
==
SGM4591Q_Segment0
)
{
SGM4591Q_IIC_Send
(
0xE8
,
0x02
,
SGM4591Q_U9_Out_P0
);
}
else
{
SGM4591Q_IIC_Send
(
0xE8
,
0x02
,
SGM4591Q_U9_Out_P0
);
}
break
;
case
SGM4591Q_Chip1_2
:
break
;
case
SGM4591Q_Chip1_3
:
break
;
case
SGM4591Q_Chip1_4
:
break
;
case
SGM4591Q_Chip2_1
:
break
;
case
SGM4591Q_Chip2_2
:
break
;
case
SGM4591Q_Chip2_3
:
break
;
case
SGM4591Q_Chip2_4
:
break
;
case
SGM4591Q_Chip3_1
:
break
;
case
SGM4591Q_Chip3_2
:
break
;
case
SGM4591Q_Chip3_3
:
break
;
case
SGM4591Q_Chip3_4
:
break
;
case
SGM4591Q_Chip4_1
:
break
;
case
SGM4591Q_Chip4_2
:
break
;
case
SGM4591Q_Chip4_3
:
break
;
case
SGM4591Q_Chip4_4
:
break
;
default:
break
;
}
}
GHS/App/SGM4591Q.h
View file @
f6475d94
#include "TYW_stdint.h"
/*SGM4591Q片选*/
typedef
enum
{
SGM4591Q_Chip1_1
=
0
,
SGM4591Q_Chip1_2
,
SGM4591Q_Chip1_3
,
SGM4591Q_Chip1_4
,
SGM4591Q_Chip2_1
,
SGM4591Q_Chip2_2
,
SGM4591Q_Chip2_3
,
SGM4591Q_Chip2_4
,
SGM4591Q_Chip3_1
,
SGM4591Q_Chip3_2
,
SGM4591Q_Chip3_3
,
SGM4591Q_Chip3_4
,
SGM4591Q_Chip4_1
,
SGM4591Q_Chip4_2
,
SGM4591Q_Chip4_3
,
SGM4591Q_Chip4_4
,
}
SGM4591Q_Chip
;
/*SGM4591Q段选*/
typedef
enum
{
SGM4591Q_Segment0
=
0
,
SGM4591Q_Segment1
,
}
SGM4591Q_Segment
;
/*SGM4591Q端口*/
#define SGM4591Q_PIN0 0x01u
#define SGM4591Q_PIN1 0x02u
#define SGM4591Q_PIN2 0x04u
#define SGM4591Q_PIN3 0x08u
#define SGM4591Q_PIN4 0x10u
#define SGM4591Q_PIN5 0x20u
#define SGM4591Q_PIN6 0x40u
#define SGM4591Q_PIN7 0x80u
extern
uint16_t
ADC_4
;
void
SGM4591Q_IIC_Send
(
uint8_t
Address
,
uint8_t
Register
,
uint8_t
Function
);
...
...
GHS/App/TPS2HB35AQPWPRQ1.c
0 → 100644
View file @
f6475d94
This diff is collapsed.
Click to expand it.
GHS/App/TPS2HB35AQPWPRQ1.h
0 → 100644
View file @
f6475d94
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