boardSupplyType (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


boardSupplyType returns information about the type of power (battery, DC, or AC) the RTCU is currently operating on.

 

Input:

None

         

Returns: INT (1..3)

Type of supply:

1:

Operating on internal battery.

2:

Operating on external DC power.

3:

Operating on external AC power.

 

 

Declaration:

FUNCTION boardSupplyType : INT;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  IF boardSupplyType() = 1 THEN
    // Supply voltage is battery
     ...
  END_IF;
  IF boardSupplyType() = 2 THEN
    // Supply voltage is External DC
     ...
  END_IF;
END;
 
END_PROGRAM;