Skip to content

Instantly share code, notes, and snippets.

@thekitchenscientist
Created February 25, 2015 19:52
Show Gist options
  • Save thekitchenscientist/e9545119ee9eaf33a6ac to your computer and use it in GitHub Desktop.
Save thekitchenscientist/e9545119ee9eaf33a6ac to your computer and use it in GitHub Desktop.
@safe_add
def add_input_device_ready_raw3(self, input_port,
mode=-1,
device_type=0,
layer=USB_CHAIN_LAYER_MASTER):
"""Waits until the device on the specified InputPort is ready and then
returns its value as a raw value.
"""
self._msg.append(Opcode.INPUT_DEVICE)
self._msg.append(InputDeviceSubcode.READY_RAW)
self._append_param(layer)
self._append_param(input_port)
self._append_param(device_type)
self._append_param(mode)
self._append_param(3) # Number of values
self._global_params_types.append(self._REPLY_TUPLE_OPEN_TOKEN)
self._append_reply_param(DataFormat.DATA32)
self._append_reply_param(DataFormat.DATA32)
self._append_reply_param(DataFormat.DATA32)
self._global_params_types.append(self._REPLY_TUPLE_CLOSE_TOKEN)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment