diff options
author | Evan Lojewski <github@meklort.com> | 2019-04-03 18:36:07 -0600 |
---|---|---|
committer | Evan Lojewski <github@meklort.com> | 2019-04-03 18:36:07 -0600 |
commit | d864aaff9a2a58e3e180824389cff21f38669186 (patch) | |
tree | eb095d9945a6d43cbee7618a8e6ac62b36428197 /libs/NVRam/bcm5719_NVM.h | |
parent | c588cad2f7b451ca24e0482fa9164308905332a0 (diff) | |
download | bcm5719-ortega-d864aaff9a2a58e3e180824389cff21f38669186.tar.gz bcm5719-ortega-d864aaff9a2a58e3e180824389cff21f38669186.zip |
Regenerate headers + simulation code to allow arbitrary read/writes from the base component.
Diffstat (limited to 'libs/NVRam/bcm5719_NVM.h')
-rw-r--r-- | libs/NVRam/bcm5719_NVM.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 */ |