/*! @fn NMI_API sint8 m2m_wifi_request_sleep(void) @brief Request from WINC1500 device to Sleep for specific time in the M2M_PS_MANUAL Power save mode (only). @param [in] u32SlpReqTime Request Sleep in ms @return The function SHALL return M2M_SUCCESS for success and a negative value otherwise. @sa tenuPowerSaveModes , m2m_wifi_set_sleep_mode @warning the Function should be called in M2M_PS_MANUAL power save only */ sint8 m2m_wifi_request_sleep(uint32 u32SlpReqTime) { sint8 ret = M2M_SUCCESS; uint8 psType; psType = hif_get_sleep_mode(); if(psType == M2M_PS_MANUAL) { tstrM2mSlpReqTime strPs; strPs.u32SleepTime = u32SlpReqTime; ret = hif_send(M2M_REQ_GRP_WIFI, M2M_WIFI_REQ_DOZE, (uint8*) &strPs,sizeof(tstrM2mSlpReqTime), NULL, 0, 0); } return ret; }
uint8 m2m_wifi_get_sleep_mode(void) { return hif_get_sleep_mode(); }