blePower (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

LX2

Firmware version:

2.20.00


 

This function turns the Bluetooth interface on and off.

 

 

 

Input:

power : BOOL (default ON)

If the power should be turned on or off

 

 

Returns: INT

1

-

_BLE_OK


Success

0

-

_BLE_ERR_NOT_SUPPORTED


The API is not supported.

-2

 

_BLE_ERR_ALREADY_OPEN


The interface is already on.

-4

 

_BLE_ERR_NOT_OPEN


The interface is already off.

-5

-

_BLE_ERR_NO_ADAP


Could not find interface.

 

 

Declaration:

FUNCTION blePower : INT;
VAR_INPUT
  power  : BOOL := ON;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
  // Turn on power
  blePower();
 
BEGIN
 ...
END;
 
END_PROGRAM;