]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/norma-dmm/protocol.c
Fix a bunch of typos.
[libsigrok.git] / src / hardware / norma-dmm / protocol.c
index 035e991e8f1d40db9544acc531fc99bef4b8623a..28f733c60ff5605570c213c22aaa64f51a7e82ad 100644 (file)
@@ -48,7 +48,7 @@ static int nma_send_req(const struct sr_dev_inst *sdi, int req, char *params)
        devc->last_req = req;
        devc->last_req_pending = TRUE;
 
-       if (serial_write_blocking(serial, buf, len) < 0) {
+       if (serial_write_blocking(serial, buf, len, 0) < 0) {
                sr_err("Unable to send request.");
                devc->last_req_pending = FALSE;
                return SR_ERR;
@@ -116,7 +116,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi)
        /* Start decoding. */
        value = 0.0;
        scale = 1.0;
-       memset(&analog, 0, sizeof(analog));
+       memset(&analog, 0, sizeof(struct sr_datafeed_analog));
 
        /*
         * The numbers are hex digits, starting from 0.
@@ -317,7 +317,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi)
                sr_warn("Low battery, measurement quality degraded!");
        }
        /* 0x08: SCALED */
-       /* 0x04: RATE (=lower resolution, allows higher rata rate up to 10/s. */
+       /* 0x04: RATE (=lower resolution, allows higher data rate up to 10/s. */
        /* 0x02: Current clamp */
        if (flags & 0x01) { /* dB */
                /*
@@ -359,7 +359,7 @@ static void nma_process_line(const struct sr_dev_inst *sdi)
        analog.num_samples = 1;
        analog.data = &value;
 
-       memset(&packet, 0, sizeof(packet));
+       memset(&packet, 0, sizeof(struct sr_datafeed_packet));
        packet.type = SR_DF_ANALOG;
        packet.payload = &analog;
        sr_session_send(devc->cb_data, &packet);