summaryrefslogtreecommitdiffstats
path: root/include/bcm5719_RXMBUF.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_RXMBUF.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_RXMBUF.h')
-rw-r--r--include/bcm5719_RXMBUF.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/bcm5719_RXMBUF.h b/include/bcm5719_RXMBUF.h
index bec1c08..923fe9a 100644
--- a/include/bcm5719_RXMBUF.h
+++ b/include/bcm5719_RXMBUF.h
@@ -83,6 +83,18 @@ typedef uint32_t BCM5719_RXMBUF_H_uint32_t;
/** @brief Component definition for @ref RXMBUF. */
typedef struct {
+#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 */
} RXMBUF_t;
/** @brief RX MBuf */
OpenPOWER on IntegriCloud