Class ArchAVR_Port

Inheritance Relationships

Base Type

Class Documentation

class ArchAVR_Port : public Port

Implementation of a GPIO port controller for AVR series.

Public Functions

explicit ArchAVR_Port(const ArchAVR_PortConfig &config)
virtual bool init(Device &device) override

Virtual method called when the device is initialised. This is where the peripheral can allocate its I/O registers, interrupts or connect signals.

Returns:

boolean indicates the success of all allocations.

virtual void reset() override

Virtual method called when the device is reset. Note that resetting I/O registers is only necessary here if their reset value is not zero.

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

Virtual method called when the CPU is writing a I/O register allocated by this peripheral. The value has already been written.

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

  • value – the new register content

Protected Functions

virtual void pin_state_changed(uint8_t num, Pin::State state) override

Callback method called when the resolved state of a pin has changed.