1.3.9.4 WDRV_PIC32MZW_PowerSaveModeSet Function
C
WDRV_PIC32MZW_STATUS WDRV_PIC32MZW_PowerSaveModeSet ( DRV_HANDLE handle, WDRV_PIC32MZW_POWERSAVE_MODE powerSaveMode, WDRV_PIC32MZW_POWERSAVE_CORRELATION picCorrelation, WDRV_PIC32MZW_PS_NOTIFY_CALLBACK pfNotifyCallback )
Summary
Set the power-save/sleep mode for WiFi.
Description
Requests that the current power-save mode is changed to the one specified according to the parameters.
Precondition
WDRV_PIC32MZW_Initialize should have been called. WDRV_PIC32MZW_Open should have been called to obtain a valid handle. WiFi must not currently be configured as a Soft-AP
Parameters
Param | Description |
---|---|
handle | Client handle obtained by a call to WDRV_PIC32MZW_Open. |
powerSaveMode | Power-save mode for WiFi. |
picCorrelation | PIC-WiFi power-save correlation mode. |
pfNotifyCallback | Callback function to receive sleep entry notification. |
Returns
WDRV_PIC32MZW_STATUS_OK - The request has been accepted.
WDRV_PIC32MZW_STATUS_NOT_OPEN - The driver instance is not open.
WDRV_PIC32MZW_STATUS_INVALID_ARG - The parameters were incorrect.
WDRV_PIC32MZW_STATUS_REQUEST_ERROR - The request to the PIC32MZW was rejected.
WDRV_PIC32MZW_STATUS_OPERATION_NOT_SUPPORTED - The requested operation is not supported.
Remarks
Async Correlation Mode: powerSaveMode is applied immediately. WSM/WDS mode will apply even though the PIC is currently in the RUN state. Sync Correlation Mode: powerSaveMode is applied to the WiFi when the PIC next enters sleep mode. In either mode, powerSaveMode of RUN will cause the WiFi to leave power-save mode and enter RUN mode.