* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <config.h>
#include <ieee1284.h>
#include "protocol.h"
{
struct dev_context *devc = sdi->priv;
float *data = devc->samples;
- struct sr_datafeed_analog analog = {
+ struct sr_datafeed_analog_old analog = {
.channels = devc->enabled_channel,
.num_samples = num,
.mq = SR_MQ_VOLTAGE,
.data = data,
};
struct sr_datafeed_packet packet = {
- .type = SR_DF_ANALOG,
+ .type = SR_DF_ANALOG_OLD,
.payload = &analog,
};
float factor = devc->factor;
while (num--)
data[num] = (buf[num] - 0x80) * factor;
- sr_session_send(devc->cb_data, &packet);
+ sr_session_send(sdi, &packet);
}
static int read_subframe(const struct sr_dev_inst *sdi, uint8_t *buf)
};
push_samples(sdi, buf, 6);
- sr_session_send(devc->cb_data, &packet);
+ sr_session_send(sdi, &packet);
buf += 6;
num -= 6;
}
return TRUE;
if (state != 0x03) {
- sr_err("Unexpected state 0x%X while checking for trigger");
+ sr_err("Unexpected state 0x%X while checking for trigger", state);
return FALSE;
}
- sr_session_send(devc->cb_data, &packet);
+ sr_session_send(sdi, &packet);
if (devc->channel) {
while (read_subframe(sdi, buf)) {
}
packet.type = SR_DF_FRAME_END;
- sr_session_send(devc->cb_data, &packet);
+ sr_session_send(sdi, &packet);
if (++devc->frame >= devc->frame_limit)
- hung_chang_dso_2100_dev_acquisition_stop(sdi, devc->cb_data);
+ hung_chang_dso_2100_dev_acquisition_stop(sdi);
else
hung_chang_dso_2100_move_to(sdi, 0x21);