lib/origen/pins/pin.rb
# Restores the state of the pin at the end of the given block
# to the state it was in at the start of the block
#
#   pin(:invoke).driving?  # => true
#   pin(:invoke).restore_state do
#     pin(:invoke).dont_care
#     pin(:invoke).driving?  # => false
#   end
#   pin(:invoke).driving?  # => true
Restores the state of the pin at the end of the given block
to the state it was in at the start of the block

invoke).driving.
Restores the state of the pin at the end of the given block to the state it was in at the start of the block invoke ) . driving .
def restore_state
        save
        yield
        restore
      end
def restore_state save yield restore end
Restores the state of the pin at the end of the given block
to the state it was in at the start of the block
Restores the state of the pin at the end of the given block to the state it was in at the start of the block