1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

add a writeMemory function to IpCore class

This commit is contained in:
Steffen Vogel 2020-05-26 15:24:15 +02:00
parent dd1a17c4a5
commit 02f60eb86e

View file

@ -199,6 +199,10 @@ protected:
template<typename T>
T readMemory(const std::string& block, uintptr_t address) const
{ return *(reinterpret_cast<T*>(getLocalAddr(block, address))); }
template<typename T>
void writeMemory(const std::string& block, uintptr_t address, T value)
{ T* ptr = reinterpret_cast<T*>(getLocalAddr(block, address)); *ptr = value; }
protected:
struct IrqPort {