From 08e44cd19c6a9ed6f7394f0d2a595da05c843f4c Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Mon, 18 Mar 2024 15:45:52 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E5=AE=8F=E5=AE=9A=E4=B9=89?= =?utf8?q?=EF=BC=8C=E5=8F=96=E6=B6=88=E6=97=A0=E7=94=A8=E7=9A=84=E8=84=9A?= =?utf8?q?=E6=9C=AC=20=E4=BF=9D=E8=AF=81=E8=BF=9E=E6=8E=A5=E7=9A=84?= =?utf8?q?=E4=B8=89=E6=96=B9=E5=BA=93=E5=8F=AA=E6=9C=89=20=E5=AE=8F?= =?utf8?q?=E5=AE=9A=E4=B9=89=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8B=E6=89=8D?= =?utf8?q?=E7=BC=96=E8=AF=91=E8=BF=9B=E6=9D=A5=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/autuobuild.sh | 9 --------- code/sdk/drivers/peripheral/cywee/CMakeLists.txt | 9 ++++++--- code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt | 7 ++++--- code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp | 8 ++++++-- 4 files changed, 16 insertions(+), 17 deletions(-) delete mode 100644 code/sdk/autuobuild.sh diff --git a/code/sdk/autuobuild.sh b/code/sdk/autuobuild.sh deleted file mode 100644 index 2d17bf543..000000000 --- a/code/sdk/autuobuild.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ "$1" == "" ] -then -TARGET_PACK_NAME=pack_brandy_native_js -else -TARGET_PACK_NAME=$1 -fi -./build.py -nhso -c -debug $TARGET_PACK_NAME diff --git a/code/sdk/drivers/peripheral/cywee/CMakeLists.txt b/code/sdk/drivers/peripheral/cywee/CMakeLists.txt index 31984772b..f2beb18d2 100644 --- a/code/sdk/drivers/peripheral/cywee/CMakeLists.txt +++ b/code/sdk/drivers/peripheral/cywee/CMakeLists.txt @@ -46,8 +46,11 @@ set(MAIN_COMPONENT false ) -# find_library(LIB_PATH_CWM_LIB_DML Lib/CWM_LIB_DML_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) -# find_library(LIB_PATH_CWM_LIB Lib/CWM_LIB_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) -# target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_CWM_LIB_DML} ${LIB_PATH_CWM_LIB} PRIVATE -Wl,--whole-archive) + +if("SUPPORT_AT_CYWEE" IN_LIST DEFINES) + find_library(LIB_PATH_CWM_LIB_DML Lib/CWM_LIB_DML_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) + find_library(LIB_PATH_CWM_LIB Lib/CWM_LIB_clang_riscv.a ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_CWM_LIB_DML} ${LIB_PATH_CWM_LIB} PRIVATE -Wl,--whole-archive) +endif() build_component() diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt b/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt index ae485d716..c55141c0d 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt +++ b/code/sdk/drivers/peripheral/ppg/hx3695/CMakeLists.txt @@ -36,7 +36,6 @@ set(PRIVATE_DEFINES ) set(PUBLIC_DEFINES -# SUPPORT_AT_HX3695 ) # use this when you want to add ccflags like -include xxx @@ -54,7 +53,9 @@ set(MAIN_COMPONENT false ) +if("PPG_HX3695" IN_LIST DEFINES) + find_library(LIB_PATH_HX3695 libhx3695.a ${CMAKE_CURRENT_SOURCE_DIR}) + target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_HX3695} PRIVATE -Wl,--whole-archive) +endif() build_component() -find_library(LIB_PATH_HX3695 libhx3695.a ${CMAKE_CURRENT_SOURCE_DIR}) -target_link_libraries(${TARGET_NAME} PRIVATE -Wl,--whole-archive ${LIB_PATH_HX3695} PRIVATE -Wl,--whole-archive) \ No newline at end of file diff --git a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp index d484249a8..8a3eaa247 100644 --- a/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp +++ b/code/sdk/drivers/peripheral/ppg/service/ppg_service.cpp @@ -255,7 +255,9 @@ static void ppg_service_check_task(void const *arg) int32_t ret; uint32_t mail; uint32_t msgsize = (uint32_t)sizeof(PPG_CMD_TYPE_T); +#ifdef PPG_HX3695 hx3695_register_msg_callback(hx3695_msg_callback);//注册驱动回调 +#endif while (1) { ret = osal_msg_queue_read_copy(g_app_queue, (void *)&mail, &msgsize, OSAL_MSGQ_WAIT_FOREVER); @@ -298,8 +300,10 @@ static void ppg_service_check_task(void const *arg) PRINT_ERR("ppg service already stopped! \r\n"); continue ; } - ppg_send_cmd_to_driver(cmd,enable); - if(enable == 1) +#ifdef PPG_HX3695 + ppg_send_cmd_to_driver(cmd,enable); +#endif + if(enable == 1) ppg_service_running_stat = true; else ppg_service_running_stat = false; -- 2.17.1