Enables / disables wireless LAN.

Syntax

int SysSetWLANPower(
  int powerStatus
);

Parameters

powerStatus
[in] Specifies whether to enable wireless LAN.
Specify one of the following values.
ValueDescription
SYS_WLAN_POWER_MANUAL This value is for compatibility with older versions. Do not use unless there is a special reason.
SYS_WLAN_POWER_OFF Disable the wireless LAN.
SYS_WLAN_POWER_AUTO Enable the wireless LAN.

Return value

Returns TRUE if the function succeeds, FALSE otherwise.

Remarks

Setting SYS_WLAN_POWER_AUTO enables wireless LAN.
Setting SYS_WLAN_POWER_OFF disables wireless LAN.

SYS_WLAN_POWER_MANUAL is for compatibility with older versions. Do not use unless there is a special reason.

Requirements

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

Sample

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

void main(void)
{
    int errorcode;
    printf("\fSysSetWLANPower \r\n\n");

    errorcode = SysSetWLANPower(SYS_WLAN_POWER_AUTO);
    if(errorcode == TRUE) {
        printf("Result:TRUE\r\n");
    } else {
        printf("Result:FALSE\r\n");
    }
    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();

    errorcode = SysSetWLANPower (SYS_WLAN_POWER_OFF);
    if(errorcode == TRUE) {
        printf("Result:TRUE\r\n");
    } else {
        printf("Result:FALSE\r\n");
    }

    printf("Please any key\r\n");
    ResetKey();
    while(!kbhit())
        Idle();
}

Last updated: 2020/11/23