class FakeMmioReg
Defined at line 19 of file ../../sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h
Fakes a single MMIO register. This class is intended to be used with a fdf::MmioBuffer;
operations on an instance of that class will be directed to the fake if the fake-mmio-reg library
is a dependency of the test.
Public Methods
void FakeMmioReg ()
Reads from the faked register. Returns the value set by the next expectation, or the default
value. The default is initially zero and can be set by calling ReadReturns() or Write(). This
method is expected to be called (indirectly) by the code under test.
Defined at line 24 of file ../../sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h
void SetReadCallback (fit::function<uint64_t ()> read)
Ses the read callback function. The function is invoked every time the faked register is read.
Defined at line 30 of file ../../sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h
void SetWriteCallback (fit::function<void (uint64_t)> write)
Sets the write callback function. The function is invoked every time the faked register is
written.
Defined at line 34 of file ../../sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h
uint64_t Read ()
Reads the faked register by calling the read callback and returning its value.
Defined at line 37 of file ../../sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h
void Write (uint64_t value)
Writes to the faked register. This method is expected to be called (indirectly) by the code
under test.
Defined at line 41 of file ../../sdk/lib/driver/fake-mmio-reg/cpp/fake-mmio-reg.h