X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fhung-chang-dso-2100%2Fprotocol.c;h=c1c8dacb6df40f6dc8375215ae7a1636323dbe57;hb=3db03efa4ad43f6d127c3d949a300596cac74ce9;hp=6f997db020389ed30d8abdaee0c05651ecc19c84;hpb=c9404469185faf035390aeb6ced077a70601b756;p=libsigrok.git diff --git a/src/hardware/hung-chang-dso-2100/protocol.c b/src/hardware/hung-chang-dso-2100/protocol.c index 6f997db0..c1c8dacb 100644 --- a/src/hardware/hung-chang-dso-2100/protocol.c +++ b/src/hardware/hung-chang-dso-2100/protocol.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include #include "protocol.h" @@ -330,7 +331,7 @@ static void push_samples(const struct sr_dev_inst *sdi, uint8_t *buf, size_t num { 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, @@ -339,7 +340,7 @@ static void push_samples(const struct sr_dev_inst *sdi, uint8_t *buf, size_t num .data = data, }; struct sr_datafeed_packet packet = { - .type = SR_DF_ANALOG, + .type = SR_DF_ANALOG_OLD, .payload = &analog, }; float factor = devc->factor; @@ -434,7 +435,7 @@ SR_PRIV int hung_chang_dso_2100_poll(int fd, int revents, void *cb_data) 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; }