/******************************************************************************* Function: void WF_PsPollDisable(void) Summary: Disables PS-Poll mode. Description: Disables PS Poll mode. The MRF24W will stay active and not go sleep. Precondition: MACInit must be called first. Parameters: None. Returns: None. Remarks: None. *****************************************************************************/ void WF_PsPollDisable(void) { UdDisablePsPoll(); t_WFPwrModeReq pwrModeReq; pwrModeReq.mode = PS_POLL_DISABLED; pwrModeReq.wake = 1; pwrModeReq.rcvDtims = 1; SendPowerModeMsg(&pwrModeReq); WFConfigureLowPowerMode(WF_LOW_POWER_MODE_OFF); PowerStateSet(WF_PS_OFF); }
//============================================================================== void UdStateInit(void) { #if defined(WF_ERROR_CHECKING) uint8_t defaultChannelList[] = {1,2,3,4,5,6,7,8,9,10,11}; #endif memset(&g_udState, 0x00, sizeof(g_udState)); UdSetInitInvalid(); // cleared after WF_Init() state machine complete UdSetConnectionState(CS_NOT_CONNECTED); UdSetRetryCount(DEFAULT_RETRY_COUNT); UdDisablePsPoll(); #if defined(WF_ERROR_CHECKING) UdSetSsid(NULL, 0); UdSetDomain(WF_DOMAIN_FCC); UdSetChannelList(defaultChannelList, sizeof(defaultChannelList)); UdSetNetworkType(DEFAULT_NETWORK_TYPE); UdSetSecurityOpen(); #endif }