Changed from HEI_READ_ONLY to HEI_ENABLE_HW_WRITE
Changed conditional flag from from HEI_READ_ONLY to HEI_ENABLE_HW_WRITE
Signed-off-by: Ben Tyner <ben.tyner@ibm.com>
Change-Id: Id93d33e35d1026822a2081f5e10f5b6488aad9c3
diff --git a/src/chip_data/CHIP_DATA.md b/src/chip_data/CHIP_DATA.md
index 0d89540..c7ad234 100644
--- a/src/chip_data/CHIP_DATA.md
+++ b/src/chip_data/CHIP_DATA.md
@@ -7,8 +7,8 @@
* A definition of how errors propagate from register to register.
* A list of top level registers to use as a starting point for isolation.
* A list of additional registers to capture for each register bit (for debug).
- * Rules defining how to clear and mask register bits (not available if
- `__HEI_READ_ONLY` is defined).
+ * Rules defining how to clear and mask register bits (only applicable if
+ `__HEI_ENABLE_HW_WRITE` is defined).
File extensions are not required, but it is recommended to use the
extension `.cdb` (chip data binary).
diff --git a/src/hei_user_interface.hpp b/src/hei_user_interface.hpp
index 17bccb1..09cbcfb 100644
--- a/src/hei_user_interface.hpp
+++ b/src/hei_user_interface.hpp
@@ -47,7 +47,7 @@
bool registerRead(const Chip& i_chip, void* o_buffer, size_t& io_bufSize,
uint64_t i_regType, uint64_t i_address);
-#ifndef __HEI_READ_ONLY
+#ifdef __HEI_ENABLE_HW_WRITE
/**
* @brief Performs a hardware register write operation.
@@ -81,7 +81,7 @@
bool registerWrite(const Chip& i_chip, void* i_buffer, size_t& io_bufSize,
uint64_t i_regType, uint64_t i_address);
-#endif
+#endif // __HEI_ENABLE_HW_WRITE
/**
* @brief Prints an informational trace/log.
diff --git a/src/register/hei_hardware_register.cpp b/src/register/hei_hardware_register.cpp
index 213991d..0f994c0 100644
--- a/src/register/hei_hardware_register.cpp
+++ b/src/register/hei_hardware_register.cpp
@@ -99,7 +99,7 @@
//------------------------------------------------------------------------------
-#ifndef __HEI_READ_ONLY
+#ifdef __HEI_ENABLE_HW_WRITE
bool HardwareRegister::write(const Chip& i_chip) const
{
@@ -135,7 +135,7 @@
return accessFailure;
}
-#endif // __HEI_READ_ONLY
+#endif // __HEI_ENABLE_HW_WRITE
//------------------------------------------------------------------------------
diff --git a/src/register/hei_hardware_register.hpp b/src/register/hei_hardware_register.hpp
index 2a4dcfe..40e0f82 100644
--- a/src/register/hei_hardware_register.hpp
+++ b/src/register/hei_hardware_register.hpp
@@ -157,7 +157,7 @@
*/
bool read(const Chip& i_chip, bool i_force = false) const;
-#ifndef __HEI_READ_ONLY
+#ifdef __HEI_ENABLE_HW_WRITE
/**
* @brief Writes the value stored in the register cache to hardware via the
@@ -167,7 +167,7 @@
*/
bool write(const Chip& i_chip) const;
-#endif // __HEI_READ_ONLY
+#endif // __HEI_ENABLE_HW_WRITE
protected:
/**