This function gets the wireless LAN enable / disable setting.

Syntax

int SysGetWLANPower(
  int *powerStatus
);

Parameters

powerStatus
[out] A pointer to a variable that gets a value that indicates whether to enable wireless LAN.
The following values is returned:
ValueDescription
SYS_WLAN_POWER_MANUAL The wireless LAN is disabled.
SYS_WLAN_POWER_OFF The wireless LAN is disabled. (Default state)
SYS_WLAN_POWER_AUTO The wireless LAN is enabled.

Return value

Returns TRUE if the function succeeds, FALSE otherwise.

Remarks

Gets the wireless LAN enable / disable settings.

Requirements

Header file:
lib.h
Library file:
libSTARTUPOPH5000.a

Sample

#include <stdio.h>
#include <stdlib.h>
#include "lib.h"

void main(void)
{
    int errorcode, powerStatus;
    printf("\fSysGetWLANPower \r\n\n");
    errorcode = SysGetWLANPower (&powerStatus);
    printf("error = %d\r\n", errorcode);
    printf("power = %d\r\n", powerStatus);

    errorcode = SysSetWLANPower (SYS_WLAN_POWER_AUTO);
    printf("Power ON\r\n");
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();
    errorcode = SysGetWLANPower (&powerStatus);
    printf("error = %d\r\n", errorcode);
    printf("power = %d\r\n",powerStatus);
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();
}

Last updated: 2020/11/23