summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/MII/include/bcm5719_MII.h12
-rw-r--r--libs/NVRam/bcm5719_NVM.h12
2 files changed, 24 insertions, 0 deletions
diff --git a/libs/MII/include/bcm5719_MII.h b/libs/MII/include/bcm5719_MII.h
index 1aa8581..50f6535 100644
--- a/libs/MII/include/bcm5719_MII.h
+++ b/libs/MII/include/bcm5719_MII.h
@@ -4240,6 +4240,18 @@ typedef struct {
/** @brief Note: Shadow Register Selector: 7 */
RegMIIMiscellaneousControl_t MiscellaneousControl;
+#ifdef CXX_SIMULATOR
+ typedef uint32_t (*read_callback_t)(uint32_t, void*);
+ read_callback_t mIndexReadCallback;
+ void* mIndexReadCallbackArgs;
+
+ typedef void (*write_callback_t)(uint32_t, uint32_t value, void*);
+ write_callback_t mIndexWriteCallback;
+ void* mIndexWriteCallbackArgs;
+
+ uint32_t read(int index) { return mIndexReadCallback(index, mIndexReadCallbackArgs); }
+ void write(int index, uint32_t value) { mIndexWriteCallback(index, value, mIndexWriteCallbackArgs); }
+#endif /* CXX_SIMULATOR */
} MII_t;
/** @brief MII Registers */
diff --git a/libs/NVRam/bcm5719_NVM.h b/libs/NVRam/bcm5719_NVM.h
index c74cb9a..664ea55 100644
--- a/libs/NVRam/bcm5719_NVM.h
+++ b/libs/NVRam/bcm5719_NVM.h
@@ -941,6 +941,18 @@ typedef struct {
/** @brief */
RegNVMAutoSenseStatus_t AutoSenseStatus;
+#ifdef CXX_SIMULATOR
+ typedef uint32_t (*read_callback_t)(uint32_t, void*);
+ read_callback_t mIndexReadCallback;
+ void* mIndexReadCallbackArgs;
+
+ typedef void (*write_callback_t)(uint32_t, uint32_t value, void*);
+ write_callback_t mIndexWriteCallback;
+ void* mIndexWriteCallbackArgs;
+
+ uint32_t read(int index) { return mIndexReadCallback(index, mIndexReadCallbackArgs); }
+ void write(int index, uint32_t value) { mIndexWriteCallback(index, value, mIndexWriteCallbackArgs); }
+#endif /* CXX_SIMULATOR */
} NVM_t;
/** @brief Non-Volatile Memory Registers */
OpenPOWER on IntegriCloud