SCU722驱动替换更新

This commit is contained in:
lmx
2025-10-31 16:58:39 +08:00
parent a96264ec36
commit 830b4637dd
27 changed files with 171037 additions and 170624 deletions

View File

@ -51,7 +51,7 @@
#define LOG_TAG "[EARPHONE]"
#define LOG_ERROR_ENABLE
#define LOG_DEBUG_ENABLE
#define LOG_INFO_ENABLE
#define xlog_ENABLE
#if(USE_DMA_UART_TEST) //使用dm串口测试时不能同时打开
@ -212,7 +212,7 @@ static int bt_connction_status_event_handler(struct bt_event *bt)
/*
* 蓝牙初始化完成
*/
log_info("BT_STATUS_INIT_OK\n");
xlog("BT_STATUS_INIT_OK\n");
init_ok = 1;
__set_sbc_cap_bitpool(38);
@ -248,7 +248,7 @@ static int bt_connction_status_event_handler(struct bt_event *bt)
case BT_STATUS_SECOND_CONNECTED:
clear_current_poweron_memory_search_index(0);
case BT_STATUS_FIRST_CONNECTED:
log_info("BT_STATUS_CONNECTED\n");
xlog("BT_STATUS_CONNECTED\n");
xtell_bl_state = 1; //蓝牙连接成功 置1
if(strcmp(xt_ble_new_name,"CM-1111") != 0){
//蓝牙连接成功
@ -264,7 +264,7 @@ static int bt_connction_status_event_handler(struct bt_event *bt)
/* tone_play(TONE_CONN); */
/*os_time_dly(40); // for test*/
log_info("tone status:%d\n", tone_get_status());
xlog("tone status:%d\n", tone_get_status());
if (get_call_status() == BT_CALL_HANGUP) {
if (app_var.phone_dly_discon_time) {
sys_timeout_del(app_var.phone_dly_discon_time);
@ -275,12 +275,13 @@ static int bt_connction_status_event_handler(struct bt_event *bt)
}
}
/*int timeout = 5000 + rand32() % 10000;
sys_timeout_add(NULL, connect_phone_test, timeout);*/
break;
case BT_STATUS_FIRST_DISCONNECT:
case BT_STATUS_SECOND_DISCONNECT:
log_info("BT_STATUS_DISCONNECT\n");
xlog("BT_STATUS_DISCONNECT\n");
xtell_bl_state = 0; //断开蓝牙 清0
//蓝牙断开连接
if(bt_newname){ //已经改成新蓝牙名字,断开才播报
@ -315,7 +316,7 @@ static int bt_connction_status_event_handler(struct bt_event *bt)
break;
case BT_STATUS_SNIFF_STATE_UPDATE:
log_info(" BT_STATUS_SNIFF_STATE_UPDATE %d\n", bt->value); //0退出SNIFF
xlog(" BT_STATUS_SNIFF_STATE_UPDATE %d\n", bt->value); //0退出SNIFF
if (bt->value == 0) {
sniff_out = 1;
sys_auto_sniff_controle(MY_SNIFF_EN, bt->args);
@ -344,10 +345,10 @@ static int bt_connction_status_event_handler(struct bt_event *bt)
break;
case BT_STATUS_AVRCP_INCOME_OPID:
log_info("BT_STATUS_AVRCP_INCOME_OPID:%d\n", bt->value);
xlog("BT_STATUS_AVRCP_INCOME_OPID:%d\n", bt->value);
break;
default:
log_info(" BT STATUS DEFAULT\n");
xlog(" BT STATUS DEFAULT\n");
break;
}
return 0;