sr_err("Can't set measurable parameter %d.", target);
g_mutex_unlock(&devc->rw_mutex);
return SR_ERR;
sr_err("Can't set measurable parameter %d.", target);
g_mutex_unlock(&devc->rw_mutex);
return SR_ERR;
ret = korad_kaxxxxp_send_cmd(serial, "IOUT1?");
value = &(devc->current);
break;
ret = korad_kaxxxxp_send_cmd(serial, "IOUT1?");
value = &(devc->current);
break;
/* Read set current from device. */
ret = korad_kaxxxxp_send_cmd(serial, "ISET1?");
/* Read set current from device. */
ret = korad_kaxxxxp_send_cmd(serial, "ISET1?");
break;
case KAXXXXP_VOLTAGE:
/* Read voltage from device. */
ret = korad_kaxxxxp_send_cmd(serial, "VOUT1?");
value = &(devc->voltage);
break;
break;
case KAXXXXP_VOLTAGE:
/* Read voltage from device. */
ret = korad_kaxxxxp_send_cmd(serial, "VOUT1?");
value = &(devc->voltage);
break;
/* Read set voltage from device. */
ret = korad_kaxxxxp_send_cmd(serial, "VSET1?");
/* Read set voltage from device. */
ret = korad_kaxxxxp_send_cmd(serial, "VSET1?");
sr_spew("Status: CH1: constant %s CH2: constant %s. "
"Tracking would be %s. Device is "
"%s and %s. Buttons are %s. Output is %s "
sr_spew("Status: CH1: constant %s CH2: constant %s. "
"Tracking would be %s. Device is "
"%s and %s. Buttons are %s. Output is %s "
(status_byte & (1 << 0)) ? "voltage" : "current",
(status_byte & (1 << 1)) ? "voltage" : "current",
(status_byte & (1 << 2)) ? "parallel" : "series",
(status_byte & (1 << 0)) ? "voltage" : "current",
(status_byte & (1 << 1)) ? "voltage" : "current",
(status_byte & (1 << 2)) ? "parallel" : "series",
serial_read_blocking(serial, &status_byte, 1, 10);
g_mutex_unlock(&devc->rw_mutex);
serial_read_blocking(serial, &status_byte, 1, 10);
g_mutex_unlock(&devc->rw_mutex);