From: penglei <1624952103@qq.com> Date: Thu, 31 Jul 2025 09:57:11 +0000 (+0800) Subject: 修复编译问题(补) X-Git-Tag: leiniao_debug_1.0.0_20250922_020716~205^2 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=refs%2Fchanges%2F2028%2F1;p=mirrors%2FFD230.git 修复编译问题(补) --- diff --git a/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c b/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c index e0372348f..8117977e1 100644 --- a/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c +++ b/code/sdk/zhihui/4g/cat1Service/Service/cat1_ctl.c @@ -246,6 +246,26 @@ uint32_t uapi_cat1_power_on(uint32_t pwron) return 0; } +uint32_t uapi_cat1_bat_on(uint32_t pwron) +{ +#if defined(BOARD_W9) || defined(BOARD_N9) + pin_t bat_en_pin = S_AGPIO_L17; + + if( pwron == 0) + { + uapi_gpio_set_dir(bat_en_pin, GPIO_DIRECTION_OUTPUT); + uapi_gpio_set_val(bat_en_pin, GPIO_LEVEL_LOW); + printf("BAT OFF Cat1! %d low \r\n",bat_en_pin); + }else{ + uapi_gpio_set_dir(bat_en_pin, GPIO_DIRECTION_OUTPUT); + uapi_gpio_set_val(bat_en_pin, GPIO_LEVEL_HIGH); + printf("BAT ON Cat1! %d high \r\n",bat_en_pin); + } +#endif + + return 0; +} + void power_on_cat1(void) { #if defined(BOARD_FD230) diff --git a/code/sdk/zhihui/4g/cat1Service/include/cat1_ctl.h b/code/sdk/zhihui/4g/cat1Service/include/cat1_ctl.h index 67af1a2b9..e33eb4517 100644 --- a/code/sdk/zhihui/4g/cat1Service/include/cat1_ctl.h +++ b/code/sdk/zhihui/4g/cat1Service/include/cat1_ctl.h @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2025-05-15 11:28:07 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2025-07-31 17:29:02 + * @LastEditTime: 2025-07-31 17:46:49 * @FilePath: /FD230/code/sdk/zhihui/4g/cat1Service/include/cat1_ctl.h * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -36,6 +36,7 @@ void power_off_cat1(void); uint32_t uapi_cat1_reset(uint32_t pwron); uint32_t uapi_cat1_power_on(uint32_t pwron); +uint32_t uapi_cat1_bat_on(uint32_t pwron); void cat1_api_wakeup_cat1(uint8_t wakeup); void cat1_api_keep_wakeup(uint8_t keep_wakeup); diff --git a/code/sdk/zhihui/drivers/cywee/ble_service/cywee_ble_Service.h b/code/sdk/zhihui/drivers/cywee/ble_service/cywee_ble_service.h similarity index 100% rename from code/sdk/zhihui/drivers/cywee/ble_service/cywee_ble_Service.h rename to code/sdk/zhihui/drivers/cywee/ble_service/cywee_ble_service.h