IORegHandler Class Reference
|
yasimavr
|
#include <sim_ioreg.h>
Public Member Functions | |
| virtual | ~IORegHandler ()=default |
| virtual uint8_t | ioreg_read_handler (reg_addr_t addr, uint8_t value)=0 |
| virtual uint8_t | ioreg_peek_handler (reg_addr_t addr, uint8_t value)=0 |
| virtual void | ioreg_write_handler (reg_addr_t addr, const ioreg_write_t &data)=0 |
Detailed Description
Abstract interface for I/O register handlers The handler is notified when the register is accessed by the CPU It is meant to be implemented by I/O peripherals
Constructor & Destructor Documentation
◆ ~IORegHandler()
|
virtualdefault |
Member Function Documentation
◆ ioreg_peek_handler()
|
pure virtual |
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
Implemented in ArchAVR_SPI, ArchAVR_Timer, ArchXT_RTC, ArchXT_SPI, ArchXT_TimerA, ArchXT_TimerB, ArchXT_TWI, ArchXT_USART, IORegDispatcher, and Peripheral.
◆ ioreg_read_handler()
|
pure virtual |
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
Implemented in ArchAVR_ADC, ArchAVR_SPI, ArchAVR_Timer, ArchAVR_USART, ArchXT_ADC, ArchXT_MiscRegCtrl, ArchXT_Port, ArchXT_RTC, ArchXT_SPI, ArchXT_TimerA, ArchXT_TimerB, ArchXT_TWI, ArchXT_USART, IORegDispatcher, and Peripheral.
◆ ioreg_write_handler()
|
pure virtual |
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.
Implemented in ArchAVR_IntCtrl, ArchAVR_ACP, ArchAVR_ADC, ArchAVR_ExtInt, ArchAVR_ResetCtrl, ArchAVR_NVM, ArchAVR_Port, ArchAVR_SPI, ArchAVR_Timer, ArchAVR_TWI, ArchAVR_USART, ArchAVR_USI, ArchAVR_WDT, ArchXT_ACP, ArchXT_ADC, ArchXT_VREF, ArchXT_IntCtrl, ArchXT_ResetCtrl, ArchXT_MiscRegCtrl, ArchXT_PortMuxCtrl, ArchXT_USERROW, ArchXT_NVM, ArchXT_Port, ArchXT_RTC, ArchXT_SPI, ArchXT_TimerA, ArchXT_TimerB, ArchXT_TWI, ArchXT_USART, ArchXT_WDT, Peripheral, and IORegDispatcher.
The documentation for this class was generated from the following file:
Generated by