From: SnickerSun Date: Fri, 5 Jul 2024 13:02:53 +0000 (+0800) Subject: cat1 power on off 指令合并 X-Git-Tag: release_V1.2.70_20241020_135402~828^2~19 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=605c2dc2d8e8c8c74a879125a76af19ab5afd1b9;p=mirrors%2FFD230.git cat1 power on off 指令合并 --- diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp index c26491bfe..8d4a7ab08 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp @@ -276,8 +276,7 @@ namespace OHOS - uapi_cat1_power_on(1); - uapi_cat1_reset(0); + power_on_cat1(); cat1_getsignal(); cat1_getver(); diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_at_cmd.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_at_cmd.cpp index 717dc45f1..d83f91622 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_at_cmd.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_at_cmd.cpp @@ -77,11 +77,9 @@ static uint32_t cat1_power(uint8_t *para, uint32_t paraLen, char *strCommonCmd) if(enabled == 1) { - uapi_cat1_power_on(1); - uapi_cat1_reset(0); + power_on_cat1(); }else{ - uapi_cat1_power_on(0); - uapi_cat1_reset(1); + power_off_cat1(); } return ERRCODE_SUCC; diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ctl.h b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ctl.h index f72fba726..07d99b297 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ctl.h +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_ctl.h @@ -10,8 +10,18 @@ extern "C" { #endif /* __cplusplus */ #endif /* __cplusplus */ + + +/**set powerpin 1/0*/ uint32_t uapi_cat1_power_on(uint32_t pwron); +/**set resetpin 0/1*/ uint32_t uapi_cat1_reset(uint32_t pwron); + +/**¸´ºÏº¯Êý£¬set powerpin 1 £¬set resetpin 0*/ +void power_on_cat1(void); +/**¸´ºÏº¯Êý£¬set powerpin 0 £¬set resetpin 1*/ +void power_off_cat1(void); + void cat1_ring_isr_callback(pin_t pin, uintptr_t param); void uapi_cat1_start_volte_voice(void); void uapi_cat1_stop_volte_voice(void); diff --git a/code/sdk/drivers/peripheral/utils/custom_utils.c b/code/sdk/drivers/peripheral/utils/custom_utils.c index ff3d9883f..7a9d2ea48 100644 --- a/code/sdk/drivers/peripheral/utils/custom_utils.c +++ b/code/sdk/drivers/peripheral/utils/custom_utils.c @@ -22,6 +22,7 @@ #include "pinctrl.h" #include "errcode.h" #include "power_display_service.h" +#include "los_base.h" // #include "config/include/ConfigModelC.h" #ifdef FD230 @@ -304,13 +305,11 @@ void startup_post_init_task(void) { PRINT("PowerOn Cat1 !\r\n"); - uapi_cat1_power_on(1); - uapi_cat1_reset(0); + power_on_cat1(); }else{ PRINT("PowerOff Cat1 !\r\n"); - uapi_cat1_power_on(0); - uapi_cat1_reset(1); + power_off_cat1(); } }