return;
}
- sr_spew("State changed from %i to %i.", devc->state, devc->next_state);
+ if (devc->state != devc->next_state)
+ sr_spew("State changed from %i to %i.",
+ devc->state, devc->next_state);
devc->state = devc->next_state;
if (devc->state == STATE_WAIT_DATA_READY) {
return;
}
- sr_spew("State changed from %i to %i.", devc->state, devc->next_state);
+ if (devc->state != devc->next_state)
+ sr_spew("State changed from %i to %i.",
+ devc->state, devc->next_state);
devc->state = devc->next_state;
if (devc->state == STATE_IDLE) {
SR_PRIV int sl2_transfer_in(libusb_device_handle *dev_handle, uint8_t *data)
{
return libusb_control_transfer(dev_handle, USB_REQUEST_TYPE_IN,
- USB_HID_SET_REPORT, USB_HID_REPORT_TYPE_FEATURE, USB_INTERFACE,
+ USB_HID_GET_REPORT, USB_HID_REPORT_TYPE_FEATURE, USB_INTERFACE,
(unsigned char *)data, PACKET_LENGTH, USB_TIMEOUT);
}