Class IO_RegDispatcher

Inheritance Relationships

Base Type

Class Documentation

class IO_RegDispatcher : public IO_RegHandler

Public Functions

inline void add_handler(IO_RegHandler &handler)
inline virtual uint8_t ioreg_read_handler(reg_addr_t addr, uint8_t value) override

Callback for a CPU I/O read access. On-the-fly modifications of the register content are possible.

Parameters:
  • addr – address of the register read, in I/O address space

  • value – current cached value of the register

Returns:

actual value of the register

inline virtual void ioreg_write_handler(reg_addr_t addr, const ioreg_write_t &value) override

Callback for a CPU I/O write access. Note that the register has already been updated so it’s ok for the callback to overwrite it. (a typical use case is implementing write-one-to-clear bits)

Parameters:
  • addr – address of the register read, in I/O address space

  • data – struct containing the data change.

inline virtual uint8_t ioreg_peek_handler(reg_addr_t addr, uint8_t value) override

Callback for a I/O peek access. On-the-fly modifications of the register content are possible.

Parameters:
  • addr – address of the register read, in I/O address space

  • value – current cached value of the register

Returns:

actual value of the register