From 4ba1336827e5595b75d9b36229c800f23de7ac45 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 8 Sep 2025 19:30:35 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D4G=E6=97=A0=E6=B3=95=E6=AD=A3?= =?utf8?q?=E5=B8=B8=E5=BC=80=E5=90=AFbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../zhihui/4g/cat1Service/Service/cat1_ctl.c | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c b/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c index 06a51b42c..497398029 100644 --- a/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c +++ b/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c @@ -245,21 +245,34 @@ bool cat1_api_is_cat1_enabled(void) uint32_t uapi_cat1_reset(uint32_t pwron) { - pin_t reset_pin = S_AGPIO_L28; -#if defined(BOARD_LEINIAO) - reset_pin = S_AGPIO_L24; -#endif - +// pin_t reset_pin = S_AGPIO_L28; +// #if defined(BOARD_LEINIAO) +// reset_pin = S_AGPIO_L24; +// #endif + +// if( pwron == 0) +// { +// uapi_gpio_set_dir(reset_pin, GPIO_DIRECTION_OUTPUT); +// uapi_gpio_set_val(reset_pin, GPIO_LEVEL_HIGH); +// printf("clear reset Cat1! L28 high \r\n"); +// }else{ +// uapi_gpio_set_dir(reset_pin, GPIO_DIRECTION_OUTPUT); +// uapi_gpio_set_val(reset_pin, GPIO_LEVEL_LOW); +// printf("Reset Cat1! L28 low\r\n"); +// } + +#if defined(BOARD_FD230) if( pwron == 0) { - uapi_gpio_set_dir(reset_pin, GPIO_DIRECTION_OUTPUT); - uapi_gpio_set_val(reset_pin, GPIO_LEVEL_HIGH); + uapi_gpio_set_dir(S_AGPIO_L28, GPIO_DIRECTION_OUTPUT); + uapi_gpio_set_val(S_AGPIO_L28, GPIO_LEVEL_HIGH); printf("clear reset Cat1! L28 high \r\n"); }else{ - uapi_gpio_set_dir(reset_pin, GPIO_DIRECTION_OUTPUT); - uapi_gpio_set_val(reset_pin, GPIO_LEVEL_LOW); + uapi_gpio_set_dir(S_AGPIO_L28, GPIO_DIRECTION_OUTPUT); + uapi_gpio_set_val(S_AGPIO_L28, GPIO_LEVEL_LOW); printf("Reset Cat1! L28 low\r\n"); } +#endif return 0; } @@ -285,10 +298,12 @@ uint32_t uapi_cat1_power_on(uint32_t pwron) uint32_t uapi_cat1_bat_on(uint32_t pwron) { + pin_t bat_en_pin = 0; #if defined(BOARD_W9) || defined(BOARD_N9) - pin_t bat_en_pin = S_AGPIO_L17; + bat_en_pin = S_AGPIO_L17; #elif defined(BOARD_LEINIAO) - pin_t bat_en_pin = S_AGPIO_L18; + bat_en_pin = S_AGPIO_L18; +#endif if( pwron == 0) { uapi_gpio_set_dir(bat_en_pin, GPIO_DIRECTION_OUTPUT); @@ -299,7 +314,7 @@ uint32_t uapi_cat1_bat_on(uint32_t pwron) uapi_gpio_set_val(bat_en_pin, GPIO_LEVEL_HIGH); printf("BAT ON Cat1! %d high \r\n",bat_en_pin); } -#endif + return 0; } -- 2.17.1