From 0235c59d69e930398c7a75f40d3ebf93f3b16985 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E7=BD=97=E6=AD=A3?= <1732036298@qq.com> Date: Wed, 11 Dec 2024 12:52:54 +0000 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E8=A7=A3=E7=BB=91=E9=BB=91?= =?utf8?q?=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit thread main 函数开始将gpio34设置为不使能,鸿蒙os启动后使能gpio34,解决因串口中断导致osmain死机问题 - thread main 函数开始将gpio34设置为不使能,鸿蒙os启动后使能gpio34 --- .../brandy/brandy_standard/thread_pri_init.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c index aa4391fdc..e915f6e3e 100755 --- a/code/sdk/application/brandy/brandy_standard/thread_pri_init.c +++ b/code/sdk/application/brandy/brandy_standard/thread_pri_init.c @@ -43,6 +43,8 @@ #include "soc_uapi_audio_sys.h" #include "soc_uapi_vendor.h" #include "soc_uapi_sound.h" +#include "gpio.h" +#include "pinctrl.h" /* Audio codec vendor select according to hardware connection: * define AUDIO_SMARTPA_AW88166 : macro to init smartpa aw88166; * define AUDIO_SMARTPA_AW88166_I2S_ID UAPI_SND_OUT_PORT_I2S0 : macro to specify i2s id connecting to smartpa aw88166; @@ -369,7 +371,9 @@ static void thread_main(const void *unused) { PRINT("thread_main start "NEWLINE); unused(unused); - +#ifdef FD230 + uapi_pin_set_ie(S_MGPIO34, HAL_PIO_IE_DISABLE); +#endif rc_calibration_func_notify(); bt_acore_btc_ipc_receive_init(); uapi_pm_control(PM_BT_POWER_UP_AND_RUN); @@ -519,6 +523,11 @@ uapi_pm_remove_sleep_veto(PM_ID_DEBUG); #ifdef SUPPORT_A5133_SERVICE uapi_a5133_service_init(); #endif + +#ifdef FD230 + uapi_pin_set_ie(S_MGPIO34, HAL_PIO_IE_ENBALE); +#endif + #ifdef SUPPORT_AT_OHOSFWK //开始播放开机动画,并启动ohos系统 ohos_startup(); -- 2.17.1