如何在lk中修改gpio的值

diff --git a/target/msm8952/target_display.c b/target/msm8952/target_display.c
index e91759a..a5025c5 100644
--- a/target/msm8952/target_display.c
+++ b/target/msm8952/target_display.c
@@ -57,6 +57,9 @@
 static struct gpio_pin reset_gpio = {
   "msmgpio", 60, 3, 1, 0, 1
 };
+static struct gpio_pin reset_gpio_touch = {
+  "msmgpio", 64, 3, 1, 0, 1
+};
 
 static struct gpio_pin enable_gpio = {
   "msmgpio", 90, 3, 1, 0, 1
@@ -370,6 +373,7 @@ int target_panel_reset(uint8_t enable, struct panel_reset_sequence *resetseq,
  bkl_gpio.pin_id = 66;
  } else if (platform_is_msm8937()) {
  reset_gpio.pin_id = 60;
+ reset_gpio_touch.pin_id = 64;
  bkl_gpio.pin_id = 98;
  enable_gpio.pin_id = 99;
  } else if (platform_is_msmgold()) {
@@ -400,8 +404,14 @@ int target_panel_reset(uint8_t enable, struct panel_reset_sequence *resetseq,
  gpio_tlmm_config(reset_gpio.pin_id, 0,
  reset_gpio.pin_direction, reset_gpio.pin_pull,
  reset_gpio.pin_strength, reset_gpio.pin_state);
-
+              gpio_tlmm_config(reset_gpio_touch.pin_id, 0,
+ reset_gpio.pin_direction, reset_gpio.pin_pull,
+ reset_gpio.pin_strength, reset_gpio.pin_state);
  gpio_set_dir(reset_gpio.pin_id, 2);
+ gpio_set_dir(reset_gpio_touch.pin_id, 2);
+
+
+ gpio_set_dir(reset_gpio_touch.pin_id, GPIO_STATE_LOW);
 
  /* reset */
  for (int i = 0; i < RESET_GPIO_SEQ_LEN; i++) {
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值