mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add all of the most recent headers and .SOs Also make DriverStation work with the new FRC comm protocol, using the new functions for getting status data Change-Id: I1c7fc5f90e72c5fbebf87d9923ce0967ed0ef3bc Initial HAL support for v13 ds Change-Id: I9a7f37ef8e24241598fa3981cb3df30c07c52e0f New ds stuff in the HAL Change-Id: I025910625453baf63f79f49bbc70ba8b2f093f50 New ds stuff in C++ Joysticks are still todo Driver station IO is pulled out Change-Id: I1bb59037c097713bd943e7bef00e12f67f13c3ac New ds works in C++ and Java. Joysticks still todo Change-Id: Ic93f8686856761badc592eceaf05964f52355578 Make joysticks work again with the v13 image protocol Change-Id: Ief7ee95d3398c2262ca07ab7d60499af3c8f60f7
43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
|
|
|
#ifndef __printFPGAVersion_h__
|
|
#define __printFPGAVersion_h__
|
|
|
|
namespace nFPGA
|
|
{
|
|
|
|
template<typename ttGlobal>
|
|
inline void printFPGAVersion(ttGlobal &global)
|
|
{
|
|
tRioStatusCode cleanStatus=0;
|
|
uint32_t hardwareGuid[4];
|
|
tSystemInterface &system = *global.getSystemInterface();
|
|
system.getHardwareFpgaSignature(hardwareGuid, &cleanStatus);
|
|
const uint32_t *softwareGuid = system.getExpectedFPGASignature();
|
|
printf("FPGA Hardware GUID: 0x");
|
|
for(int i=0; i<4; i++)
|
|
{
|
|
printf("%08X", hardwareGuid[i]);
|
|
}
|
|
printf("\n");
|
|
printf("FPGA Software GUID: 0x");
|
|
for(int i=0; i<4; i++)
|
|
{
|
|
printf("%08X", softwareGuid[i]);
|
|
}
|
|
printf("\n");
|
|
uint16_t fpgaHardwareVersion = global.readVersion(&cleanStatus);
|
|
uint16_t fpgaSoftwareVersion = system.getExpectedFPGAVersion();
|
|
printf("FPGA Hardware Version: %X\n", fpgaHardwareVersion);
|
|
printf("FPGA Software Version: %X\n", fpgaSoftwareVersion);
|
|
uint32_t fpgaHardwareRevision = global.readRevision(&cleanStatus);
|
|
uint32_t fpgaSoftwareRevision = system.getExpectedFPGARevision();
|
|
printf("FPGA Hardware Revision: %X.%X.%X\n", (fpgaHardwareRevision >> 20) & 0xFFF, (fpgaHardwareRevision >> 12) & 0xFF, fpgaHardwareRevision & 0xFFF);
|
|
printf("FPGA Software Revision: %X.%X.%X\n", (fpgaSoftwareRevision >> 20) & 0xFFF, (fpgaSoftwareRevision >> 12) & 0xFF, fpgaSoftwareRevision & 0xFFF);
|
|
}
|
|
|
|
}
|
|
|
|
#endif // __printFPGAVersion_h__
|
|
|