if (bytes_read < 0) {
sr_err("Failed to read FTDI data (%d): %s.",
bytes_read, ftdi_get_error_string(devc->ftdic));
if (bytes_read < 0) {
sr_err("Failed to read FTDI data (%d): %s.",
bytes_read, ftdi_get_error_string(devc->ftdic));
sr_spew("Received byte 0x%.2x.", byte);
if ((devc->flag_reg & FLAG_DEMUX) && (devc->flag_reg & FLAG_RLE)) {
sr_spew("Received byte 0x%.2x.", byte);
if ((devc->flag_reg & FLAG_DEMUX) && (devc->flag_reg & FLAG_RLE)) {
* since in this case the RLE encoder is operating on pairs of samples.
*/
if (devc->num_bytes == num_channels * 2) {
* since in this case the RLE encoder is operating on pairs of samples.
*/
if (devc->num_bytes == num_channels * 2) {
}
/* Clear out the most significant bit of the sample */
devc->tmp_sample[devc->num_bytes - 1] &= 0x7f;
}
/* Clear out the most significant bit of the sample */
devc->tmp_sample[devc->num_bytes - 1] &= 0x7f;
}
/* Clear out the most significant bit of the sample */
devc->tmp_sample2[devc->num_bytes - 1] &= 0x7f;
}
/* Clear out the most significant bit of the sample */
devc->tmp_sample2[devc->num_bytes - 1] &= 0x7f;
}
memcpy(devc->sample, devc->tmp_sample, 4);
sr_spew("Expanded sample: 0x%.8x.", sample);
}
memcpy(devc->sample, devc->tmp_sample, 4);
sr_spew("Expanded sample: 0x%.8x.", sample);
logic.unitsize = 4;
logic.data = devc->raw_sample_buf + devc->trigger_at * 4 +
(devc->limit_samples - devc->num_samples) * 4;
logic.unitsize = 4;
logic.data = devc->raw_sample_buf + devc->trigger_at * 4 +
(devc->limit_samples - devc->num_samples) * 4;