class RubimCode::UserIO

Attributes

name[RW]
pin[RW]
port[RW]
type[RW]

Public Class Methods

new(name, port: nil, pin: nil, type: "normal") click to toggle source
# File lib/rubimc/io_ports.rb, line 47
def initialize(name, port: nil, pin: nil, type: "normal")
        # ToDo: check type of params:
        # name, port - only symbol
        # pin - only UserVariable with type 'fixed' (feature: pin can receive also instance vars: @pin_num)
        # type - only 'normal' (feature: realize 'tri-state' type)
        @name = name.to_s
        @port = port.to_s
        @pin = pin.name.to_s
        @type = type.to_s
end