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
cb093038
Commit
cb093038
authored
Aug 21, 2024
by
张金硕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:新增按键接听挂断电话功能,来电去电通话中时回到主页
parent
feb92109
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
27 deletions
+36
-27
BlueTooth.c
Firmware/Source/Application/BlueTooth.c
+28
-27
Key_user.c
Firmware/Source/Component/Key/Key_user.c
+8
-0
No files found.
Firmware/Source/Application/BlueTooth.c
View file @
cb093038
...
...
@@ -16,40 +16,41 @@ uint8_t UUIDConfigBuf[22] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf
// ee_uint16_t juasfha;
void
BlueToothService
()
{
char
i
;
if
(
Get
_Dis_Bluetooth_Open_Close
()
==
0
)
if
(
Get_Dis_Bluetooth_Open_Close
()
==
0
)
{
if
(
Get
BlueToothVaild
==
0
)
{
if
(
GetBlueToothVaild
==
0
)
{
SetBluetoothTurnXX
(
1
);
GetBlueToothVaild
=
1
;
}
SetBluetoothTurnXX
(
1
);
GetBlueToothVaild
=
1
;
}
else
}
else
{
if
(
GetBlueToothVaild
==
1
)
{
if
(
GetBlueToothVaild
==
1
)
{
SetBluetoothTurnXX
(
0
);
GetBlueToothVaild
=
0
;
}
SetBluetoothTurnXX
(
0
);
GetBlueToothVaild
=
0
;
}
}
if
((
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
&&
(
GetPhoneBookVaild
==
0
))
{
PackedTransfer_GetPhoneBookCmd
();
GetPhoneBookVaild
=
1
;
}
else
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_DisConnect
)
{
GetPhoneBookVaild
=
0
;
}
if
((
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_Connection
)
&&
(
GetPhoneBookVaild
==
0
))
{
PackedTransfer_GetPhoneBookCmd
();
GetPhoneBookVaild
=
1
;
}
else
if
(
BlueToothPhoneData
.
BlueToothSignalSate
==
BlueTooth_DisConnect
)
{
GetPhoneBookVaild
=
0
;
}
// SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
Menu_Change_Branch_To_Item
(
MENU_BRANCH_ANIMATION
,
MENU_ITEM_MAIN_ITEM
);
}
// SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
// SetUUIDData((char *)UUIDConfigBuf, 22);
// SetUUIDData((char *)UUIDConfigBuf, 22);
// BlueConnectStatus = GetBlueToothPowerSTATE();
// juasfha = BlueToothPhoneData.BlueToothPhoneSate;
// juasfha = BlueToothPhoneData.PhoneBookTotalCount;
...
...
Firmware/Source/Component/Key/Key_user.c
View file @
cb093038
...
...
@@ -235,6 +235,10 @@ void Key_Event_Short_Press_Left(void)//选择
Menu_Service
(
MENU_KEY_DOWN_SHORT
);
}
}
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
PackedTransfer_BlueTooth_DataSet
(
Phone_Pick_Up
);
}
}
void
Key_Event_Short_Press_Right
(
void
)
//确认
...
...
@@ -279,6 +283,10 @@ void Key_Event_Short_Press_Right(void)//确认
{
Menu_Service
(
MENU_KEY_CONFIRM_SHORT
);
}
if
((
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Outgoing
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Incoming
)
||
(
BlueToothPhoneData
.
BlueToothPhoneSate
==
Phone_Talking
))
{
PackedTransfer_BlueTooth_DataSet
(
Phone_Hangup_Out
);
}
}
uint8_t
OTA_Update_Flag
=
0
;
...
...
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