Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QJ_500-7c
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
时昊
QJ_500-7c
Commits
31e1853f
Commit
31e1853f
authored
Jun 24, 2024
by
薛小虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test:UART任务添加心跳打印
parent
4ac0ea63
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
8 deletions
+20
-8
app_BT_User.c
qianjiang/main/app_BT_User.c
+4
-4
app_Ble_User.c
qianjiang/main/app_Ble_User.c
+1
-1
gatts_table_creat_demo.c
qianjiang/main/gatts_table_creat_demo.c
+11
-1
main_user.c
qianjiang/main/main_user.c
+4
-2
No files found.
qianjiang/main/app_BT_User.c
View file @
31e1853f
...
@@ -28,7 +28,7 @@ void BT_Connect_Event_Pro(void )
...
@@ -28,7 +28,7 @@ void BT_Connect_Event_Pro(void )
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
500
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
500
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
printf
(
"TB CONN
\r\n
"
);
//
printf("TB CONN\r\n");
}
}
...
@@ -38,7 +38,7 @@ void BT_DisConnect_Event_Pro(void )
...
@@ -38,7 +38,7 @@ void BT_DisConnect_Event_Pro(void )
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
500
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
500
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
printf
(
"TB DISCONN
\r\n
"
);
//
printf("TB DISCONN\r\n");
}
}
void
BT_User_Process
(
void
)
void
BT_User_Process
(
void
)
...
@@ -88,13 +88,13 @@ void BT_User_Process(void )
...
@@ -88,13 +88,13 @@ void BT_User_Process(void )
BT_User
.
ReconnTime
++
;
BT_User
.
ReconnTime
++
;
if
(
BT_User
.
ReconnTime
>=
BT_ReConn_T
)
if
(
BT_User
.
ReconnTime
>=
BT_ReConn_T
)
{
{
printf
(
"Connect Start.................
\n
"
);
//
printf("Connect Start.................\n");
if
(
app_BT_Get_BondDev
()
==
1
)
if
(
app_BT_Get_BondDev
()
==
1
)
{
{
esp_hf_client_connect
(
peer_addr
);
esp_hf_client_connect
(
peer_addr
);
}
}
printf
(
"Connect Over
\n
"
);
//
printf("Connect Over\n");
BT_User
.
ReconnTime
=
0
;
BT_User
.
ReconnTime
=
0
;
}
}
...
...
qianjiang/main/app_Ble_User.c
View file @
31e1853f
...
@@ -414,7 +414,7 @@ void Ble_MsgRec_Navi_Analysis(void )
...
@@ -414,7 +414,7 @@ void Ble_MsgRec_Navi_Analysis(void )
aaa
|=
Ble_Navi_Data
.
Navi_Dte
[
0
];
aaa
|=
Ble_Navi_Data
.
Navi_Dte
[
0
];
printf
(
"navi sts = %x; navi turn = %d; navi dest = %ld
\n
"
,
Ble_Navi_Data
.
Navi_Sts
,
Ble_Navi_Data
.
Navi_Turn
,
aaa
);
//
printf("navi sts = %x; navi turn = %d; navi dest = %ld\n", Ble_Navi_Data.Navi_Sts, Ble_Navi_Data.Navi_Turn, aaa);
// printf("Navi sts %d Navi_Turn %x Navi_Dte0 %x Navi_Dte1 %x Navi_Dte2 %x Navi_Dte3 %x\r\n",
// printf("Navi sts %d Navi_Turn %x Navi_Dte0 %x Navi_Dte1 %x Navi_Dte2 %x Navi_Dte3 %x\r\n",
...
...
qianjiang/main/gatts_table_creat_demo.c
View file @
31e1853f
...
@@ -87,7 +87,7 @@ int bsp_Uart_Send_Data(uint8_t * data , unsigned int len)
...
@@ -87,7 +87,7 @@ int bsp_Uart_Send_Data(uint8_t * data , unsigned int len)
}
}
uint16_t
testcnt1
;
static
void
Uart_Rx_Task
(
void
*
arg
)
static
void
Uart_Rx_Task
(
void
*
arg
)
{
{
uint8_t
*
data
=
(
uint8_t
*
)
malloc
(
RX_BUF_SIZE
+
1
);
uint8_t
*
data
=
(
uint8_t
*
)
malloc
(
RX_BUF_SIZE
+
1
);
...
@@ -101,6 +101,16 @@ static void Uart_Rx_Task(void *arg)
...
@@ -101,6 +101,16 @@ static void Uart_Rx_Task(void *arg)
UART_Put
(
data
[
i
]);
UART_Put
(
data
[
i
]);
}
}
}
}
if
(
testcnt1
<=
150
)
{
testcnt1
++
;
}
else
{
testcnt1
=
0
;
ESP_LOGI
(
"UART"
,
"HEART"
);
}
}
}
free
(
data
);
free
(
data
);
}
}
...
...
qianjiang/main/main_user.c
View file @
31e1853f
...
@@ -95,8 +95,10 @@ static void Sys_Run_Tasks(void *arg)
...
@@ -95,8 +95,10 @@ static void Sys_Run_Tasks(void *arg)
{
{
testcnt
=
0
;
testcnt
=
0
;
printf
(
"BT_User.BT_Sts = %d
\r\n
"
,
BT_User
.
BT_Sts
);
// printf("BT_User.BT_Sts = %d\r\n", BT_User.BT_Sts);
printf
(
"Ble_User.Ble_Sts = %d
\r\n
"
,
Ble_User
.
Ble_Sts
);
// printf("Ble_User.Ble_Sts = %d\r\n", Ble_User.Ble_Sts);
ESP_LOGI
(
"SYS RUN"
,
"HEART"
);
// esp_log_buffer_hex(TAG, peer_addr, 6);
// esp_log_buffer_hex(TAG, peer_addr, 6);
...
...
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