class Origen::Pins::PowerPin
Attributes
current_limit[RW]
Public Instance Methods
voltage()
click to toggle source
Like voltages but if there is only one voltage known then it will be returned directly instead of being wrapped in an array. If no voltages are known this returns nil whereas voltages will return an empty array. For more than one voltages present this behaves like an alias of voltages.
# File lib/origen/pins/power_pin.rb, line 23 def voltage if voltages.size > 0 if voltages.size > 1 voltages else voltages.first end end end
voltage=(val)
click to toggle source
Set the operating voltage for the pin, can be a single value or an array
# File lib/origen/pins/power_pin.rb, line 14 def voltage=(val) @voltages = [val].flatten.uniq end
voltages()
click to toggle source
Returns an array of known operating voltages for the given pin
# File lib/origen/pins/power_pin.rb, line 34 def voltages @voltages ||= [] end