Class: AVR::MemoryByteRegister

Inherits:
Register show all
Extended by:
T::Sig
Defined in:
lib/avr/register/memory_byte_register.rb

Direct Known Subclasses

MemoryByteRegisterWithNamedBits

Instance Attribute Summary collapse

Attributes inherited from Register

#cpu

Attributes inherited from Value

#name

Instance Method Summary collapse

Methods inherited from Value

#format, #inspect, #to_i, #to_s, #value_hex

Constructor Details

#initialize(cpu, name, memory_byte) ⇒ MemoryByteRegister

Returns a new instance of MemoryByteRegister.



12
13
14
15
# File 'lib/avr/register/memory_byte_register.rb', line 12

def initialize(cpu, name, memory_byte)
  super(cpu, name)
  @memory_byte = memory_byte
end

Instance Attribute Details

#memory_byteObject (readonly)

Returns the value of attribute memory_byte.



9
10
11
# File 'lib/avr/register/memory_byte_register.rb', line 9

def memory_byte
  @memory_byte
end

Instance Method Details

#valueObject



18
19
20
# File 'lib/avr/register/memory_byte_register.rb', line 18

def value
  memory_byte.value
end

#value=(new_value) ⇒ Object



23
24
25
# File 'lib/avr/register/memory_byte_register.rb', line 23

def value=(new_value)
  memory_byte.value = new_value
end