btIsOpen (Function)

Top  Previous  Next

Architecture:

X32 / NX32

Device support:

MX2 pro, DX4 pro, AX9 pro, MX2 turbo/encore/warp, AX9 turbo

Firmware version:

1.05


This gets the open status of the Bluetooth library. If the library is open, the function will return the number of the serial port the module is connected to.

 

Input:

None

 

Returns: INT

>=0

- Open on returned serial port number.

-1

- Bluetooth library is not open.

 

Declaration:

FUNCTION btIsOpen : INT;

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Open the Bluetooth library
btOpen(name := "RTCU MX2");
 
BEGIN
  ...
  IF btIsOpen() = 0 THEN
     ...
  END_IF;
  .  
  ...
END;
 
END_PROGRAM;