diff options
Diffstat (limited to 'mpm/include')
-rw-r--r-- | mpm/include/mpm/types/regs_iface.hpp | 13 | ||||
-rw-r--r-- | mpm/include/mpm/types/types_python.hpp | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/mpm/include/mpm/types/regs_iface.hpp b/mpm/include/mpm/types/regs_iface.hpp index 78e590b23..80005a4b0 100644 --- a/mpm/include/mpm/types/regs_iface.hpp +++ b/mpm/include/mpm/types/regs_iface.hpp @@ -41,6 +41,19 @@ namespace mpm { namespace types { const uint32_t addr, const uint8_t data ) = 0; + + /*! Return a 16-bit value from a given address + */ + virtual uint16_t peek16( + const uint32_t addr + ) = 0; + + /*! Write a 16-bit value to a given address + */ + virtual void poke16( + const uint32_t addr, + const uint16_t data + ) = 0; }; }}; /* namespace mpm::regs */ diff --git a/mpm/include/mpm/types/types_python.hpp b/mpm/include/mpm/types/types_python.hpp index a0a00aa48..ef31408e7 100644 --- a/mpm/include/mpm/types/types_python.hpp +++ b/mpm/include/mpm/types/types_python.hpp @@ -31,6 +31,8 @@ void export_types() { bp::class_<regs_iface, boost::noncopyable, std::shared_ptr<regs_iface> >("regs_iface", bp::no_init) .def("peek8", ®s_iface::peek8) .def("poke8", ®s_iface::poke8) + .def("peek16", ®s_iface::peek16) + .def("poke16", ®s_iface::poke16) ; } |