Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
haoJin750TFT
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
时昊
haoJin750TFT
Commits
1d30a564
Commit
1d30a564
authored
Sep 14, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增os和mcu版本号接口函数
parent
95d96032
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
3 deletions
+80
-3
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+73
-2
BlueTooth.h
Firmware/Source/Application/BlueTooth.h
+7
-1
No files found.
Firmware/Source/Application/BlueTooth.c
View file @
1d30a564
...
...
@@ -13,7 +13,35 @@ _QRCODE_RECT QRCode_Rect;
const
uint8_t
HJBlueToothName
[
9
]
=
{
"HJ750"
};
uint8_t
UUIDConfigBuf
[
22
]
=
{
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
};
//"600032023120100000995"
uint8_t
OSVersionASCLLList
[
20
]
=
{
0x56
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x2E
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
};
uint8_t
MCUVersionASCLLList
[
26
]
=
{
0x56
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x2E
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
0x30
,
0x00
,
};
void
TextService
(
void
);
...
...
@@ -123,7 +151,7 @@ TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
{
TEXT_NUM_INFORMATION_SWVERSION
,
0x4013
,
0
},
{
TEXT_NUM_INFORMATION_HW
,
0x4014
,
0
},
//23F 23E
{
TEXT_NUM_INFORMATION_OS
,
0x4015
,
0
},
{
TEXT_NUM_INFORMATION_
HMI
,
0x4016
,
0
},
{
TEXT_NUM_INFORMATION_
MCU
,
0x4016
,
0
},
{
TEXT_NUM_ROAD_NAME
,
0x4022
,
0
},
};
...
...
@@ -135,12 +163,43 @@ uint8_t CurBlueToothPhoneName[100];
uint8_t
BlueToothName
[
40
];
uint8_t
LastBlueToothName
[
20
];
uint8_t
PhoneNumberTotal
[
20
];
uint8_t
InformationOSVersion
[
20
];
uint8_t
InformationMCUVersion
[
26
];
void
TextService
(
void
)
{
if
(
TextInit
==
0
)
{
TextInit
=
1
;
OSVersionASCLLList
[
0
]
=
DATA_Version
[
0
];
OSVersionASCLLList
[
2
]
=
DATA_Version
[
1
];
OSVersionASCLLList
[
4
]
=
DATA_Version
[
2
];
OSVersionASCLLList
[
6
]
=
DATA_Version
[
3
];
OSVersionASCLLList
[
8
]
=
DATA_Version
[
4
];
OSVersionASCLLList
[
10
]
=
DATA_Version
[
5
];
OSVersionASCLLList
[
12
]
=
DATA_Version
[
6
];
OSVersionASCLLList
[
14
]
=
DATA_Version
[
7
];
OSVersionASCLLList
[
16
]
=
0x48
;
OSVersionASCLLList
[
18
]
=
0x4A
;
MCUVersionASCLLList
[
0
]
=
DATA_Version
[
0
];
MCUVersionASCLLList
[
2
]
=
DATA_Version
[
1
];
MCUVersionASCLLList
[
4
]
=
DATA_Version
[
2
];
MCUVersionASCLLList
[
6
]
=
DATA_Version
[
3
];
MCUVersionASCLLList
[
8
]
=
DATA_Version
[
4
];
MCUVersionASCLLList
[
10
]
=
DATA_Version
[
5
];
MCUVersionASCLLList
[
12
]
=
DATA_Version
[
6
];
MCUVersionASCLLList
[
14
]
=
DATA_Version
[
7
];
MCUVersionASCLLList
[
16
]
=
0x2E
;
MCUVersionASCLLList
[
18
]
=
SW_Version
[
0
];
MCUVersionASCLLList
[
20
]
=
0x2E
;
MCUVersionASCLLList
[
22
]
=
SW_Version
[
1
];
MCUVersionASCLLList
[
24
]
=
SW_Version
[
2
];
memset
(
InformationOSVersion
,
0
,
sizeof
(
InformationOSVersion
));
memset
(
InformationMCUVersion
,
0
,
sizeof
(
InformationMCUVersion
));
memset
(
PhoneNumber
,
0
,
sizeof
(
PhoneNumber
));
memset
(
LastPhoneNumber
,
0
,
sizeof
(
LastPhoneNumber
));
memset
(
LastBlueToothPhoneName
,
0
,
sizeof
(
LastBlueToothPhoneName
));
...
...
@@ -148,6 +207,18 @@ void TextService(void)
memset
(
BlueToothName
,
0
,
sizeof
(
BlueToothName
));
memset
(
LastBlueToothName
,
0
,
sizeof
(
LastBlueToothName
));
memset
(
PhoneNumberTotal
,
0
,
sizeof
(
PhoneNumberTotal
));
for
(
uint8_t
i
=
0
;
i
<
sizeof
(
OSVersionASCLLList
);
i
++
)
{
InformationOSVersion
[
i
]
=
OSVersionASCLLList
[
i
];
}
TextPara
[
TEXT_NUM_INFORMATION_OS
].
Vaild
=
0x01
;
for
(
uint8_t
i
=
0
;
i
<
sizeof
(
MCUVersionASCLLList
);
i
++
)
{
InformationMCUVersion
[
i
]
=
MCUVersionASCLLList
[
i
];
}
TextPara
[
TEXT_NUM_INFORMATION_MCU
].
Vaild
=
0x01
;
}
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
{
...
...
Firmware/Source/Application/BlueTooth.h
View file @
1d30a564
...
...
@@ -12,7 +12,7 @@ typedef enum {
TEXT_NUM_INFORMATION_SWVERSION
,
TEXT_NUM_INFORMATION_HW
,
TEXT_NUM_INFORMATION_OS
,
TEXT_NUM_INFORMATION_
HMI
,
TEXT_NUM_INFORMATION_
MCU
,
TEXT_NUM_ROAD_NAME
,
TEXT_NUM_TOTAL
,
}
TEXT_NUM_ENUM
;
...
...
@@ -23,7 +23,11 @@ typedef struct {
uint16_t
Vaild
;
}
TEXT_STRUCT
;
#define INFORMATION_VERSION_DATE "20240915"
#define SW_EXTERNAL_VERSION "100"
static
const
uint8_t
DATA_Version
[
8
]
=
{
INFORMATION_VERSION_DATE
};
static
const
uint8_t
SW_Version
[
3
]
=
{
SW_EXTERNAL_VERSION
};
/*QRCode X Y height Width*/
...
...
@@ -41,6 +45,8 @@ extern uint8_t PhoneNumber[40];
extern
uint8_t
CurBlueToothPhoneName
[
100
];
extern
uint8_t
BlueToothName
[
40
];
extern
uint8_t
PhoneNumberTotal
[
20
];
extern
uint8_t
InformationOSVersion
[
20
];
extern
uint8_t
InformationMCUVersion
[
26
];
extern
TEXT_STRUCT
TextPara
[];
#endif
\ 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