def on_wake(obj=nil, &block)
      @on_wake_obj = obj
      @on_wake = Proc.new { |obj_ptr|
        yield object_for(obj_ptr)
      }
      Phidgets::FFI::Common.set_OnWakeup_Handler(@on_wake, pointer_for(obj))
      true
	end
def on_wake(obj=nil, &block)
      @on_wake_obj = obj
      @on_wake = Proc.new { |obj_ptr|
        yield object_for(obj_ptr)
      }
      Phidgets::FFI::Common.set_OnWakeup_Handler(@on_wake, pointer_for(obj))
      true
	end
Sets a wake callback function. This is called when the MacOS X is waking up from sleep mode.

 @param [String] obj Object to pass to the callback function. This is optional.
 @param [Proc] Block When the callback is executed, the device and object are yielded to this block.
 @example
     ifkit.on_wake do |obj|
       puts "System waking up"
     end
 As this runs in it's own thread, be sure that all errors are properly handled or the thread will halt and not fire any more.
 @return [Boolean] returns true or raises an error
 @note Used only in Mac OS X