# validated: 2015-12-22 DS 6d854af athena/java/edu/wpi/first/wpilibj/Utility.java
#----------------------------------------------------------------------------
# Copyright (c) FIRST 2008-2012. All Rights Reserved.
# Open Source Software - may be modified and shared by FRC teams. The code
# must be accompanied by the FIRST BSD license file in the root directory of
# the project.
#----------------------------------------------------------------------------
import hal
__all__ = ["Utility"]
[docs]class Utility:
"""Contains global utility functions"""
@staticmethod
[docs] def getFPGAVersion():
"""Return the FPGA Version number.
:returns: FPGA Version number.
:rtype: int
"""
return hal.getFPGAVersion()
@staticmethod
[docs] def getFPGARevision():
"""Return the FPGA Revision number. The format of the revision is 3
numbers. The 12 most significant bits are the Major Revision. the
next 8 bits are the Minor Revision. The 12 least significant bits
are the Build Number.
:returns: FPGA Revision number.
:rtype: int
"""
return hal.getFPGARevision()
@staticmethod
[docs] def getFPGATime():
"""Read the microsecond timer from the FPGA.
:returns: The current time in microseconds according to the FPGA.
:rtype: int
"""
return hal.getFPGATime()
@staticmethod