class RubimCode::UserInput
Public Class Methods
new(name, port: nil, pin: nil, type: "normal")
click to toggle source
Calls superclass method
RubimCode::UserIO::new
# File lib/rubimc/io_ports.rb, line 80 def initialize(name, port: nil, pin: nil, type: "normal") super RubimCode.pout(RubimCode.rubim_cbit("DDR#{port}", "#{pin}") + " /* #{self.name} configure as output */ ") end
Public Instance Methods
hi?()
click to toggle source
# File lib/rubimc/io_ports.rb, line 86 def hi? "bit_is_set(PORT#{port}, #{pin})" + " /*#{self.name}.#{__method__}*/" end
low?()
click to toggle source
# File lib/rubimc/io_ports.rb, line 90 def low? "bit_is_clear(PORT#{port}, #{pin})" + " /*#{self.name}.#{__method__}*/" end