Class: AVR::SREG

Inherits:
MemoryByteRegisterWithNamedBits show all
Defined in:
lib/avr/register/sreg.rb

Constant Summary collapse

STATUS_BITS =
T.let(%i[C Z N V S H T I].freeze, T::Array[Symbol])

Instance Attribute Summary

Attributes inherited from MemoryByteRegisterWithNamedBits

#bit_names

Attributes inherited from MemoryByteRegister

#memory_byte

Attributes inherited from Register

#cpu

Attributes inherited from Value

#name, #value

Instance Method Summary collapse

Methods inherited from MemoryByteRegisterWithNamedBits

#bit_values, #diff_values, #fetch, #fetch_bit, #from_h, #hash_for_value, #inspect, #mask_for_flags, #reset, #value_for_hash

Methods inherited from MemoryByteRegister

#value, #value=

Methods inherited from Value

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

Constructor Details

#initialize(cpu) ⇒ SREG



8
9
10
# File 'lib/avr/register/sreg.rb', line 8

def initialize(cpu)
  super(cpu, 'SREG', cpu.sram.memory[cpu.device.data_memory_map[:SREG]], STATUS_BITS)
end