upeksonly: Fix register write value

The value was set after the transfer was submitting, causing the value
to always be zero.
This commit is contained in:
Vasily Khoruzhick 2020-06-02 23:41:14 +02:00 committed by Benjamin Berg
parent 3f51e6dcb6
commit d276c3489e

View file

@ -627,9 +627,9 @@ write_regs_iterate (struct write_regs_data *wrdata)
1);
transfer->short_is_error = TRUE;
transfer->ssm = wrdata->ssm;
fpi_usb_transfer_submit (transfer, CTRL_TIMEOUT, NULL, write_regs_cb, wrdata);
transfer->buffer[0] = regwrite->value;
fpi_usb_transfer_submit (transfer, CTRL_TIMEOUT, NULL, write_regs_cb, wrdata);
}
static void
@ -668,10 +668,10 @@ sm_write_reg (FpiSsm *ssm,
1);
transfer->short_is_error = TRUE;
transfer->ssm = ssm;
transfer->buffer[0] = value;
fpi_usb_transfer_submit (transfer, CTRL_TIMEOUT, NULL,
fpi_ssm_usb_transfer_cb, NULL);
transfer->buffer[0] = value;
}
static void