From 8493d29fe4ba4a2dcc810cd977a073d95127ec36 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 4 Nov 2024 18:03:30 +0800 Subject: [PATCH] =?utf8?q?=E6=8F=90=E9=AB=98cywee=20service=20=E4=BC=98?= =?utf8?q?=E5=85=88=E7=BA=A7=E4=BB=A5=E4=BC=98=E5=8C=96acc=E6=95=B0?= =?utf8?q?=E6=8D=AE=E8=BE=93=E5=85=A5=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/bluetooth/src/BluetoothModel.cpp | 5 +++++ code/sdk/drivers/peripheral/cywee/service/cywee_service.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp index 296584dcc..a07c8b790 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/bluetooth/src/BluetoothModel.cpp @@ -209,6 +209,10 @@ static int bluetooth_init_all(void) void bluetooth_enable_all(void) { //初始化过的则直接开启扫描即可 + + //加锁避免bt 初始化失败 + uint32_t irq_sts = osal_irq_lock(); + if (bluetooth_init_all() == 1) { @@ -228,6 +232,7 @@ void bluetooth_enable_all(void) /**开始ble广播*/ // custom_ble_service_start(); } + osal_irq_restore(irq_sts); } void bluetooth_close_all(void) diff --git a/code/sdk/drivers/peripheral/cywee/service/cywee_service.c b/code/sdk/drivers/peripheral/cywee/service/cywee_service.c index d506a65eb..cdcce1c22 100644 --- a/code/sdk/drivers/peripheral/cywee/service/cywee_service.c +++ b/code/sdk/drivers/peripheral/cywee/service/cywee_service.c @@ -442,7 +442,7 @@ errcode_t uapi_cywee_service_init(void) app_task_definition_t taskcfg = {0}; taskcfg.create_queue_handle = create_cywee_queue; taskcfg.attr.name = "cywee_service"; - taskcfg.attr.priority = osPriorityBelowNormal4; + taskcfg.attr.priority = osPriorityAboveNormal3; taskcfg.attr.stack_size = CYWEE_APP_BOARD_TASK_SIZE; taskcfg.func = cywee_service_check_task; taskcfg.use_mem = USE_EXTEND_MEM; -- 2.17.1