TI中文支持网
TI专业的中文技术问题搜集分享网站

请教一下,想CC2640R2F例程中SimpleBLEbroadcaster 通过按键控制 shutdown和唤醒,在设置shutdown按键时候,发现第一次按下手机搜不到;但是第二次按下去,又会搜索到simpleBLEbroadcaster,shutdown按键变成了唤醒按键,这是为什么,希望能够得到指导,谢谢

这是按键的部分,按下shutdown按键后,再按一次,设备又可以被手机搜到了
static void GUA_HandleKeys(uint8 GUA_keys)
{//按键if ( GUA_keys & GUA_KEY_VALUE ){GUA_Led_Set(HAL_LED_2, HAL_LED_MODE_OFF);Power_shutdown(0, 0);}if ( GUA_keys & GUA_KEY_VALUE_2 ){GUA_Led_Set(HAL_LED_2, HAL_LED_MODE_ON);}
}

Kevin Qiu1:

看下这里,是不是将其设为唤醒引脚了

/** @brief Configure wakeup (from shutdown) on pins**@param aPinCfg #PIN_Config list identifying pin ID and relevant pin*configuration as one of:*- #PINCC26XX_NO_WAKEUP(default)*- #PINCC26XX_WAKEUP_POSEDGE*- #PINCC26XX_WAKEUP_NEGEDGE*@return #PIN_SUCCESS if successful, else error code**@par Usage*@code*PIN_setWakeup(NULL, PIN_ID(9)|PIN_WAKEUP_NEGEDGE);*Power_shutdown(0, 0);*@endcode**@note A wake-up event to wake up from shutdown is not detected until*the device reaches shutdown. Wake-up events happening after a shutdown*is initiated but before actual shutdown are not captured and thus will*not cause the device to wake up.*/
extern PIN_Status PINCC26XX_setWakeup(const PIN_Config aPinCfg[]);

赞(0)
未经允许不得转载:TI中文支持网 » 请教一下,想CC2640R2F例程中SimpleBLEbroadcaster 通过按键控制 shutdown和唤醒,在设置shutdown按键时候,发现第一次按下手机搜不到;但是第二次按下去,又会搜索到simpleBLEbroadcaster,shutdown按键变成了唤醒按键,这是为什么,希望能够得到指导,谢谢
分享到: 更多 (0)