这是按键的部分,按下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[]);