您好,我配置GPIO16和GPIO0这两个GPIO唤醒,,但是只有最后一个GPIO0起作用,是我的用法不对吗,请大佬指点一下。
/*
进入休眠
*/
void enter_sleep(void)
{
TUYA_WAKEUP_SOURCE_BASE_CFG_T wake_cfg;
////////////////////////////gpio
wake_cfg.source=TUYA_WAKEUP_SOURCE_GPIO;
wake_cfg.wakeup_para.gpio_param.gpio_num=TUYA_GPIO_NUM_16;
wake_cfg.wakeup_para.gpio_param.level=TUYA_GPIO_LEVEL_HIGH;
tkl_wakeup_source_set(&wake_cfg);
Code: Select all
wake_cfg.source=TUYA_WAKEUP_SOURCE_GPIO;
wake_cfg.wakeup_para.gpio_param.gpio_num=TUYA_GPIO_NUM_0;
wake_cfg.wakeup_para.gpio_param.level=TUYA_GPIO_LEVEL_HIGH;
tkl_wakeup_source_set(&wake_cfg);
/////////////////////////timer
wake_cfg.source=TUYA_WAKEUP_SOURCE_TIMER;
wake_cfg.wakeup_para.timer_param.mode=TUYA_TIMER_MODE_ONCE;
wake_cfg.wakeup_para.timer_param.timer_num=0;
wake_cfg.wakeup_para.timer_param.ms=480*1000+1000;
tkl_wakeup_source_set(&wake_cfg); /* 调用该函数进入deep sleep */
}