Skip to content

Commit 0984bfe

Browse files
committed
Use a #define instead of including a file
1 parent fdb42e5 commit 0984bfe

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

cfoInterfaceLib/CFO_Registers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace CFOLib {
1616
// struct CFO_Register : public DTCLib::CFOandDTC_Register {
1717
enum CFO_Register : uint16_t
1818
{
19-
#include "dtcInterfaceLib/CFOandDTC_Register.def"
19+
DTCLIB_COMMON_REGISTERS,
2020
CFO_Register_KernelDriverVersion = 0x9040,
2121
CFO_Register_VivadoVersion = 0x9080,
2222
CFO_Register_CFOControl = 0x9100,

dtcInterfaceLib/CFOandDTC_Register.def

Lines changed: 0 additions & 14 deletions
This file was deleted.

dtcInterfaceLib/CFOandDTC_Registers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ using namespace DTCLib;
2222
// struct CFOandDTC_Register {
2323
enum CFOandDTC_Register : uint16_t
2424
{
25-
#include "CFOandDTC_Register.def"
25+
DTCLIB_COMMON_REGISTERS
2626
};
2727

2828
// }; //end CFOandDTC_Register enum

dtcInterfaceLib/CFOandDTC_Registers.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,19 @@
99

1010
#include "mu2edev.h"
1111

12+
#define DTCLIB_COMMON_REGISTERS \
13+
CFOandDTC_Register_DesignVersion = 0x9000, \
14+
CFOandDTC_Register_DesignDate = 0x9004, \
15+
CFOandDTC_Register_DesignStatus = 0x9008, \
16+
/* CFOandDTC_Register_VivadoVersion = 0x900C, */ \
17+
CFOandDTC_Register_FPGA_Temperature = 0x9010, \
18+
CFOandDTC_Register_FPGA_VCCINT = 0x9014, \
19+
CFOandDTC_Register_FPGA_VCCAUX = 0x9018, \
20+
CFOandDTC_Register_FPGA_VCCBRAM = 0x901C, \
21+
/* CFOandDTC_Register_Scratch = 0x9030, */ \
22+
/* CFOandDTC_Register_KernelDriverVersion = 0x9040 */ \
23+
CFOandDTC_Register_FPGA_MonitorAlarm = 0x9020
24+
1225
namespace DTCLib {
1326

1427
typedef uint16_t CFOandDTC_Register; //defined enum in CFOandDTC_Registers.cpp

dtcInterfaceLib/DTC_Registers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace DTCLib {
1212
// struct DTC_Register : public DTCLib::CFOandDTC_Register {
1313
enum DTC_Register : uint16_t
1414
{
15-
#include "CFOandDTC_Register.def"
15+
DTCLIB_COMMON_REGISTERS,
1616
DTC_Register_VivadoVersion = 0x900C,
1717

1818
DTC_Register_Scratch = 0x9030,

0 commit comments

Comments
 (0)