summaryrefslogtreecommitdiffstats
path: root/include/bcm5719_SHM.h
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2019-04-03 18:36:07 -0600
committerEvan Lojewski <github@meklort.com>2019-04-03 18:36:07 -0600
commitd864aaff9a2a58e3e180824389cff21f38669186 (patch)
treeeb095d9945a6d43cbee7618a8e6ac62b36428197 /include/bcm5719_SHM.h
parentc588cad2f7b451ca24e0482fa9164308905332a0 (diff)
downloadbcm5719-ortega-d864aaff9a2a58e3e180824389cff21f38669186.tar.gz
bcm5719-ortega-d864aaff9a2a58e3e180824389cff21f38669186.zip
Regenerate headers + simulation code to allow arbitrary read/writes from the base component.
Diffstat (limited to 'include/bcm5719_SHM.h')
-rw-r--r--include/bcm5719_SHM.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/bcm5719_SHM.h b/include/bcm5719_SHM.h
index b3ec0ae..8394c82 100644
--- a/include/bcm5719_SHM.h
+++ b/include/bcm5719_SHM.h
@@ -1887,6 +1887,18 @@ typedef struct {
/** @brief */
RegSHMNcsiChannel0CtrlstatRx_t NcsiChannel0CtrlstatRx;
+#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 */
} SHM_t;
/** @brief Device SHM Registers */
OpenPOWER on IntegriCloud