项目中是用两个GPIO口来控制host与devices之间切换,所以要控制两个GPIO口都拉高电压
+++ b/vendor/mediatek/proprIEtary/packages/apps/MtkSettings/src/com/androID/settings/fuelgauge/batterytip/AnomalyConfigReceiver.java@@ -22,6 +22,8 @@ import androID.content.broadcastReceiver; import androID.content.Context; import androID.content.Intent; import androID.util.Log;+import java.io.fileWriter;+import java.io.IOException; import com.androID.internal.annotations.VisibleForTesting;@@ -31,7 +33,7 @@ import com.androID.internal.annotations.VisibleForTesting; */ public class AnomalyConfigReceiver extends broadcastReceiver { private static final String TAG = "AnomalyConfigReceiver";-+ private fileWriter fw1; @OverrIDe public voID onReceive(Context context, Intent intent) { if (StatsManager.ACTION_STATSD_STARTED.equals(intent.getAction())@@ -51,5 +53,26 @@ public class AnomalyConfigReceiver extends broadcastReceiver { AnomalyCleanupJobService.scheduleCleanUp(context); } }+++ if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {++ try {+ fw1 = new fileWriter("/sys/devices/platform/1000b000.pinctrl/mt_gpio");+ fw1.write("out 73 1");+ fw1.close();+ } catch (IOException e) {+ e.printstacktrace();+ }+ try {+ fw1 = new fileWriter("/sys/devices/platform/1000b000.pinctrl/mt_gpio");+ fw1.write("out 86 1");+ fw1.close();+ } catch (IOException e) {+ e.printstacktrace();+ }+ + } } }
总结 以上是内存溢出为你收集整理的mt8788 Android9.0 开机默认host模式全部内容,希望文章能够帮你解决mt8788 Android9.0 开机默认host模式所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)