zoukankan      html  css  js  c++  java
  • 关机充电如何实现短按pwrkey灭屏

    目前关机充电PWRKEY实现长按开机和短按亮屏功能,灭屏是根据BL_SWITCH_TIMEOUTS时间,自动灭屏的;如果需要实现PWRKEY主动灭屏,请按照如下方法修改:
     
     
    alps/mediatek/platform/mt6577/uboot/mt6577_bat.c 函数mt65xx_bat_init
     
     1、修改:
      if (mt6577_detect_key(BACKLIGHT_KEY) || (!mt6577_detect_powerkey() && press_pwrkey_count > 0))
    修改为:if (mt6577_detect_key(BACKLIGHT_KEY))
     
     
    2、添加:
    在if (mt6577_detect_key(BACKLIGHT_KEY))
    {
    .......
    }
    后面添加如下语句:
    // add start
     if(!mt6577_detect_powerkey() && press_pwrkey_count > 0)
        {
            if(g_bl_on)
         {
            bl_switch = false;
                        bl_switch_timer = BL_SWITCH_TIMEOUT;
                        g_bl_on = true; 
                        printf("[BATTERY] ready to mt65xx_backlight_off ");
            }
         else
         {
         bl_switch = false;
                        bl_switch_timer = 0;
                        g_bl_on = true;
                        printf("[BATTERY] mt65xx_backlight_on ");
         }
        }
    // add end
  • 相关阅读:
    node.js fs,http
    node.js global object,util and so on
    node.js second day
    node.js
    mysql 多个and的简写
    mysql 返回结果按照指定的id顺序返回
    php file_get_contents fopen 连接远程文件
    软考例题1
    Skyline中使用AxTE3DWindowEx打开新的一个球体
    使用AE进行点的坐标投影变换
  • 原文地址:https://www.cnblogs.com/liang123/p/6325370.html
Copyright © 2011-2022 走看看