zxh_love_zqf 发表于 2020-7-4 17:00:54

大哥救救我 发表于 2020-6-28 20:16
请问大佬这个判断条件如何添加的呢
static void appInitNextEntry(void)
{


static void appInitNextEntry(void)
{
    initData *theInit = appGetInit();

    /* Move to next entry */
    theInit->init_index += 1;

    while (appInitTable.init)
    {
      /* Call init function */
      appInitTable.init();
      theInit->id = appInitTable.message_id;
      if (theInit->id)
            return;
#ifdef test
                if(press_flag==1)
                {
                        if(appChargerIsConnected()==CHARGER_DISCONNECTED)
                        return ;
                        else
                        {
                                press_flag=0;
                        }
                }
#endif
      /* Move to next entry */
      theInit->init_index += 1;
    }

av_headset_ui.c

      case APP_MFB_BUTTON_HELD_2:
            DEBUG_LOG("APP_MFB_BUTTON_HELD_2");
                        {
#ifdef test
                        if(press_flag==1 )
                        {
                        press_flag=0;
                        appInitNextEntry();
                        }

#endif                                 
                        }
            break;

后面的你自己去优化,考虑好关机的各种方式。不同的关机设置成不同的标志位,将这个保存在pskey中、下次开机就读取这个值进行判断

大哥救救我 发表于 2020-7-29 09:26:39

zxh_xw 发表于 2020-7-4 17:00
static void appInitNextEntry(void)
{
    initData *theInit = appGetInit();


谢谢老哥,对我很有帮助。

liser 发表于 2020-7-30 17:45:48

大哥救救我 发表于 2020-6-28 20:16
请问大佬这个判断条件如何添加的呢
static void appInitNextEntry(void)
{


哥哥救不了你
页: 1 [2]
查看完整版本: QCC3020要怎么修改才能改成长按2秒开机