001 // Copyright (c) National Instruments 2009. All Rights Reserved. 002 // Do Not Edit... this file is generated! 003 004 package edu.wpi.first.wpilibj.fpga; 005 006 import com.ni.rio.*; 007 008 public class tGlobal extends tSystem 009 { 010 011 public tGlobal() 012 { 013 super(); 014 015 } 016 017 protected void finalize() 018 { 019 super.finalize(); 020 } 021 022 public static final int kNumSystems = 1; 023 024 025 026 027 028 029 030 031 ////////////////////////////////////////////////////////////////////////////////////////////////// 032 // Accessors for Version 033 ////////////////////////////////////////////////////////////////////////////////////////////////// 034 private static final int kGlobal_Version_Address = 0x8118; 035 036 public static int readVersion() 037 { 038 039 return (int)((NiFpga.readU32(m_DeviceHandle, kGlobal_Version_Address, status)) & 0x0000FFFF); 040 } 041 042 ////////////////////////////////////////////////////////////////////////////////////////////////// 043 // Accessors for LocalTime 044 ////////////////////////////////////////////////////////////////////////////////////////////////// 045 private static final int kGlobal_LocalTime_Address = 0x8110; 046 047 public static long readLocalTime() 048 { 049 050 return (long)((NiFpga.readU32(m_DeviceHandle, kGlobal_LocalTime_Address, status)) & 0xFFFFFFFFl); 051 } 052 053 ////////////////////////////////////////////////////////////////////////////////////////////////// 054 // Accessors for FPGA_LED 055 ////////////////////////////////////////////////////////////////////////////////////////////////// 056 private static final int kGlobal_FPGA_LED_Address = 0x810C; 057 058 public static void writeFPGA_LED(final boolean value) 059 { 060 061 NiFpga.writeU32(m_DeviceHandle, kGlobal_FPGA_LED_Address, (value ? 1 : 0), status); 062 } 063 public static boolean readFPGA_LED() 064 { 065 066 return ((NiFpga.readU32(m_DeviceHandle, kGlobal_FPGA_LED_Address, status)) != 0 ? true : false); 067 } 068 069 ////////////////////////////////////////////////////////////////////////////////////////////////// 070 // Accessors for Revision 071 ////////////////////////////////////////////////////////////////////////////////////////////////// 072 private static final int kGlobal_Revision_Address = 0x8114; 073 074 public static long readRevision() 075 { 076 077 return (long)((NiFpga.readU32(m_DeviceHandle, kGlobal_Revision_Address, status)) & 0xFFFFFFFFl); 078 } 079 080 081 082 083 }