blob: ee0e7acd0bfe7ff5b3c334c3bfb89f67d49bedc1 [file] [log] [blame]
jerrymf1579332013-02-07 01:56:28 +00001// Base class for generated chip objects
2// Copyright (c) National Instruments 2008. All Rights Reserved.
3
4#ifndef __tSystem_h__
5#define __tSystem_h__
6
7#include "NiRio.h"
8#include <vxWorks.h>
9
10#define FRC_FPGA_PRELOAD_BITFILE
11
12typedef uint32_t NiFpga_Session;
13
14namespace nFPGA
15{
16
17class tSystem
18{
19public:
20 tSystem(tRioStatusCode *status);
21 ~tSystem();
22 void getFpgaGuid(uint32_t *guid_ptr, tRioStatusCode *status);
23
24protected:
25 static NiFpga_Session _DeviceHandle;
26
27#ifdef FRC_FPGA_PRELOAD_BITFILE
28 void NiFpga_SharedOpen_common(const char* bitfile);
29 NiFpga_Status NiFpga_SharedOpen(const char* bitfile,
30 const char* signature,
31 const char* resource,
32 uint32_t attribute,
33 NiFpga_Session* session);
34 NiFpga_Status NiFpgaLv_SharedOpen(const char* const bitfile,
35 const char* const apiSignature,
36 const char* const resource,
37 const uint32_t attribute,
38 NiFpga_Session* const session);
39private:
40 static char *_FileName;
41 static char *_Bitfile;
42#endif
43};
44
45}
46
47#endif // __tSystem_h__