rfSetAntennaMode (Function)

Top  Previous  Next

Architecture:

X32

Device support:

SX1

Firmware version:

2.70


Switch between the on-board internal and optional external antenna. The selection is volatile and the default state after restart is to use the internal antenna.

 

 

Input:

mode : SINT ( 1, 2 )

Antenna mode where "1" internal and "2" is external.

 

Returns: INT

0


- Successful.

1


- Illegal mode.

 

 

Declaration:

FUNCTION rfSetAntennaMode : INT;
VAR_INPUT
  mode : SINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM example;
 
// switch to external antenna
rfSetAntennaMode(mode := 2);
BEGIN
  ...
END;
END_PROGRAM;