Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
m2m_wifi_set_sleep_mode

Synchronous power-save mode setting function for the NMC1500.

Functions

NMI_API sint8 m2m_wifi_set_sleep_mode (uint8 PsTyp, uint8 BcastEn)
 Set the power saving mode for the WILC1000. More...
 

NMI_API sint8 m2m_wifi_set_sleep_mode ( uint8  PsTyp,
uint8  BcastEn 
)

Set the power saving mode for the WILC1000.

Parameters
[in]PsTypDesired power saving mode. Supported types are defined in tenuPowerSaveModes.
[in]BcastEnBroadcast reception enable flag. If it is 1, the WILC1000 must be awake each DTIM Beacon for receiving Broadcast traffic. If it is 0, the WILC1000 will not wakeup at the DTIM Beacon, but its wakeup depends only on the the configured Listen Interval.
Returns
The function SHALL return 0 for success and a negative value otherwise.
See Also
tenuPowerSaveModes
Warning
The function called once after initialization.
Parameters
[in]PsTypDesired power saving mode. Supported types are defined in tenuPowerSaveModes.
[in]BcastEnBroadcast reception enable flag. If it is 1, the WILC1000 must be awake each DTIM beacon for receiving broadcast traffic. If it is 0, the WILC1000 will not wakeup at the DTIM beacon, but its wakeup depends only on the the configured Listen Interval.
See Also
tenuPowerSaveModes m2m_wifi_get_sleep_mode
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.

References hif_get_sleep_mode(), hif_send(), hif_set_sleep_mode(), M2M_INFO, M2M_NO_PS, M2M_REQ_GRP_WIFI, M2M_SUCCESS, M2M_WIFI_REQ_SLEEP, NULL, tstrM2mPsType::u8BcastEn, and tstrM2mPsType::u8PsType.

Referenced by os_m2m_wifi_set_sleep_mode_imp().