Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT200T_ESP32
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
RT200T
RT200T_ESP32
Commits
f4f42f36
Commit
f4f42f36
authored
Aug 10, 2024
by
时昊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:屏蔽printf
parent
896a06f4
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
39 additions
and
39 deletions
+39
-39
Protocol_User.c
RT200T_2_ESP32/main/Protocol_User.c
+2
-2
app_BT_User.c
RT200T_2_ESP32/main/app_BT_User.c
+4
-4
bt_app_hf.c
RT200T_2_ESP32/main/bt_app_hf.c
+18
-18
gatts_table_creat_demo.c
RT200T_2_ESP32/main/gatts_table_creat_demo.c
+6
-6
main_user.c
RT200T_2_ESP32/main/main_user.c
+1
-1
simple_ota_example.c
RT200T_2_ESP32/main/simple_ota_example.c
+7
-7
softap.c
RT200T_2_ESP32/source/wifi/softap.c
+1
-1
No files found.
RT200T_2_ESP32/main/Protocol_User.c
View file @
f4f42f36
...
...
@@ -221,7 +221,7 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板
if
(
Prot_User
.
State
<
Prot_Start
)
{
Prot_User
.
State
=
Prot_Start
;
printf
(
"Prot_Start
\r\n
"
);
//
printf("Prot_Start \r\n");
}
}
else
if
(
pData
->
CmdID
==
0x03
)
//收到底板发送的电话状态,来控制esp32蓝牙电话
...
...
@@ -231,7 +231,7 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板
{
Prot_User
.
State
=
Prot_Normal
;
printf
(
"Prot_Normal
\r\n
"
);
//
printf("Prot_Normal \r\n");
}
if
(
Prot_User
.
State
>=
Prot_Start
)
...
...
RT200T_2_ESP32/main/app_BT_User.c
View file @
f4f42f36
...
...
@@ -28,7 +28,7 @@ void BT_Connect_Event_Pro(void )
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
500
;
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 )
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
500
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
printf
(
"TB DISCONN
\r\n
"
);
//
printf("TB DISCONN\r\n");
}
void
BT_User_Process
(
void
)
...
...
@@ -88,13 +88,13 @@ void BT_User_Process(void )
BT_User
.
ReconnTime
++
;
if
(
BT_User
.
ReconnTime
>=
BT_ReConn_T
)
{
printf
(
"Connect Start.................
\n
"
);
//
printf("Connect Start.................\n");
if
(
app_BT_Get_BondDev
()
==
1
)
{
esp_hf_client_connect
(
peer_addr
);
}
printf
(
"Connect Over
\n
"
);
//
printf("Connect Over\n");
BT_User
.
ReconnTime
=
0
;
}
...
...
RT200T_2_ESP32/main/bt_app_hf.c
View file @
f4f42f36
...
...
@@ -339,12 +339,12 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
{
BT_User
.
Call_Sts
=
Call_Idle
;
//电话空闲
printf
(
"call idle
\r\n
"
);
//
printf("call idle\r\n");
}
else
if
(
param
->
call
.
status
==
1
)
{
BT_User
.
Call_Sts
=
Call_InProcess
;
//正在接电话
printf
(
"call Call_InProcess
\r\n
"
);
//
printf("call Call_InProcess\r\n");
}
break
;
}
...
...
@@ -362,7 +362,7 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
{
BT_User
.
Call_Sts
=
Call_Idle
;
printf
(
"call idle
\r\n
"
);
//
printf("call idle\r\n");
}
break
;
}
...
...
@@ -370,19 +370,19 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
{
BT_User
.
Call_Sts
=
Call_IncomeCalling
;
printf
(
"call income
\r\n
"
);
//
printf("call income\r\n");
break
;
}
case
2
:
{
BT_User
.
Call_Sts
=
Call_OutCalling
;
printf
(
"call outcall
\r\n
"
);
//
printf("call outcall\r\n");
break
;
}
case
3
:
{
BT_User
.
Call_Sts
=
Call_OutCalling
;
printf
(
"call outcall
\r\n
"
);
//
printf("call outcall\r\n");
break
;
}
}
...
...
@@ -517,42 +517,42 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
HF_CMD_HANDLER
(
conn
)
{
printf
(
"connect
\n
"
);
//
printf("connect\n");
esp_hf_client_connect
(
peer_addr
);
return
0
;
}
HF_CMD_HANDLER
(
disc
)
{
printf
(
"disconnect
\n
"
);
//
printf("disconnect\n");
esp_hf_client_disconnect
(
peer_addr
);
return
0
;
}
HF_CMD_HANDLER
(
conn_audio
)
{
printf
(
"connect audio
\n
"
);
//
printf("connect audio\n");
esp_hf_client_connect_audio
(
peer_addr
);
return
0
;
}
HF_CMD_HANDLER
(
disc_audio
)
{
printf
(
"disconnect audio
\n
"
);
//
printf("disconnect audio\n");
esp_hf_client_disconnect_audio
(
peer_addr
);
return
0
;
}
HF_CMD_HANDLER
(
query_op
)
{
printf
(
"Query operator
\n
"
);
//
printf("Query operator\n");
esp_hf_client_query_current_operator_name
();
return
0
;
}
HF_CMD_HANDLER
(
answer
)
{
printf
(
"Answer call
\n
"
);
//
printf("Answer call\n");
esp_hf_client_answer_call
();
return
0
;
}
...
...
@@ -560,21 +560,21 @@ HF_CMD_HANDLER(reject)
{
esp_err_t
err
;
err
=
esp_hf_client_reject_call
();
printf
(
"Reject call err %d
\n
"
,
err
);
//
printf("Reject call err %d\n",err);
return
0
;
}
const
char
test_dial_num
[]
=
"17800536969"
;
HF_CMD_HANDLER
(
dial
)
{
printf
(
"Dial number %s
\n
"
,
test_dial_num
);
//
printf("Dial number %s\n", test_dial_num);
esp_hf_client_dial
(
test_dial_num
);
return
0
;
}
HF_CMD_HANDLER
(
redial
)
{
printf
(
"Dial number
\n
"
);
//
printf("Dial number\n");
esp_hf_client_dial
(
NULL
);
return
0
;
}
...
...
@@ -589,14 +589,14 @@ HF_CMD_HANDLER(dial_mem)
HF_CMD_HANDLER
(
start_vr
)
{
printf
(
"Start voice recognition
\n
"
);
//
printf("Start voice recognition\n");
esp_hf_client_start_voice_recognition
();
return
0
;
}
HF_CMD_HANDLER
(
stop_vr
)
{
printf
(
"Stop voice recognition
\n
"
);
//
printf("Stop voice recognition\n");
esp_hf_client_stop_voice_recognition
();
return
0
;
}
...
...
@@ -635,7 +635,7 @@ HF_CMD_HANDLER(btrh)
{
int
btrh
=
ESP_HF_BTRH_CMD_HOLD
;
printf
(
"respond and hold command: %d
\n
"
,
btrh
);
//
printf("respond and hold command: %d\n", btrh);
esp_hf_client_send_btrh_cmd
(
btrh
);
return
0
;
}
...
...
RT200T_2_ESP32/main/gatts_table_creat_demo.c
View file @
f4f42f36
...
...
@@ -515,7 +515,7 @@ int bsp_Ble_Gatts_Send_Indicate( uint8_t len, uint8_t *data)
if
(
err
!=
ESP_OK
)
{
printf
(
"ble trans fail!!
\r\n
"
);
//
printf("ble trans fail!!\r\n");
}
}
...
...
@@ -534,7 +534,7 @@ static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param
if
(
adv_config_done
==
0
){
esp_ble_gap_start_advertising
(
&
adv_params
);
printf
(
"adv 1
\r\n
"
);
//
printf("adv 1\r\n");
}
break
;
case
ESP_GAP_BLE_SCAN_RSP_DATA_RAW_SET_COMPLETE_EVT
:
...
...
@@ -542,7 +542,7 @@ static void gap_event_handler(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param
if
(
adv_config_done
==
0
){
esp_ble_gap_start_advertising
(
&
adv_params
);
printf
(
"adv 2
\r\n
"
);
//
printf("adv 2\r\n");
}
break
;
#else
...
...
@@ -896,7 +896,7 @@ void Get_Mac_Init(void )
esp_read_mac
(
ble_mac
,
ESP_MAC_BT
);
sprintf
(
temp
,
"%02X%02X"
,
ble_mac
[
4
],
ble_mac
[
5
]);
//
sprintf(temp, "%02X%02X", ble_mac[4], ble_mac[5]);
raw_adv_data
[
sizeof
(
raw_adv_data
)
-
4
]
=
temp
[
0
];
raw_adv_data
[
sizeof
(
raw_adv_data
)
-
3
]
=
temp
[
1
];
...
...
@@ -908,7 +908,7 @@ void Get_Mac_Init(void )
// ESP_LOGW(GATTS_TABLE_TAG, "BLE_MAC IS %s : ",
// temp);
printf
(
"My MAC:
\n
"
);
//
printf("My MAC:\n");
esp_log_buffer_hex
(
GATTS_TABLE_TAG
,
ble_mac
,
6
);
BT_Device_Name
[
sizeof
(
BT_Device_Name
)
-
11
]
=
temp
[
0
];
...
...
@@ -923,7 +923,7 @@ void Get_Mac_Init(void )
raw_adv_data
[
15
]
=
ble_mac
[
4
];
raw_adv_data
[
16
]
=
ble_mac
[
5
];
sprintf
(
temp1
,
"%02X%02X%02X%02X%02X%02X"
,
ble_mac
[
0
],
ble_mac
[
1
],
ble_mac
[
2
],
ble_mac
[
3
],
ble_mac
[
4
],
ble_mac
[
5
]);
//
sprintf(temp1, "%02X%02X%02X%02X%02X%02X", ble_mac[0], ble_mac[1], ble_mac[2], ble_mac[3], ble_mac[4], ble_mac[5]);
for
(
int
i
=
0
;
i
<
12
;
i
++
)
...
...
RT200T_2_ESP32/main/main_user.c
View file @
f4f42f36
...
...
@@ -161,7 +161,7 @@ void app_main(void)
app_tpms_main
();
bsp_Uart_Init
();
printf
(
"KL30 INIT OVER~~~~~~
\r\n
"
);
//
printf("KL30 INIT OVER~~~~~~\r\n");
xTaskCreatePinnedToCore
(
Sys_Run_Tasks
,
"Sys_Run_Tasks"
,
4096
,
NULL
,
3
,
Sys_Run_Taskshdl
,
1
);
//xTaskCreatePinnedToCore(wifi_service_task, "wifi_service_task", 4096, NULL, 5, &wifi_service_hdl, 1);
//xTaskCreatePinnedToCore(Upgrade_BAT32A239_Task, "Upgrade_BAT32A239_Task", 1024 * 4, NULL, 5, NULL, 1);
...
...
RT200T_2_ESP32/main/simple_ota_example.c
View file @
f4f42f36
...
...
@@ -130,16 +130,16 @@ void simple_ota_example_task(void *pvParameter)
if
(
ret
==
ESP_OK
)
{
ESP_LOGI
(
TAG
,
"OTA Succeed"
);
printf
(
"
\n
"
);
printf
(
"==========================================================
\n
"
);
//
printf("\n");
//
printf("==========================================================\n");
for
(
i
=
5
;
i
>
0
;
i
--
)
{
printf
(
"============ System will restart in %d second. ============
\n
"
,
i
);
//
printf("============ System will restart in %d second. ============\n", i);
vTaskDelay
(
1000
/
portTICK_PERIOD_MS
);
}
printf
(
"============ System rebooting... ============
\n
"
);
printf
(
"==========================================================
\n
"
);
printf
(
"
\n
"
);
//
printf("============ System rebooting... ============\n");
//
printf("==========================================================\n");
//
printf("\n");
esp_restart
();
}
else
{
...
...
@@ -155,7 +155,7 @@ static void print_sha256(const uint8_t *image_hash, const char *label)
char
hash_print
[
HASH_LEN
*
2
+
1
];
hash_print
[
HASH_LEN
*
2
]
=
0
;
for
(
int
i
=
0
;
i
<
HASH_LEN
;
++
i
)
{
sprintf
(
&
hash_print
[
i
*
2
],
"%02x"
,
image_hash
[
i
]);
//
sprintf(&hash_print[i * 2], "%02x", image_hash[i]);
}
ESP_LOGI
(
TAG
,
"%s %s"
,
label
,
hash_print
);
}
...
...
RT200T_2_ESP32/source/wifi/softap.c
View file @
f4f42f36
...
...
@@ -83,7 +83,7 @@ void softap_service_start(void)
esp_wifi_get_mac
(
WIFI_IF_AP
,
softap_mac
);
// 将MAC地址后两个字节转为字符串
char
softap_temp
[
5
];
sprintf
(
softap_temp
,
"%02X%02X"
,
softap_mac
[
4
],
softap_mac
[
5
]);
//
sprintf(softap_temp, "%02X%02X", softap_mac[4], softap_mac[5]);
// 将MAC地址拼接到 ESP_WIFI_SSID 后面
char
softap_ssid
[
32
]
=
ESP_WIFI_SSID
;
strcat
(
softap_ssid
,
softap_temp
);
...
...
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