]> sigrok.org Git - libsigrok.git/blobdiff - hardware/kecheng-kc-330b/protocol.c
Replace 'probe' with 'channel' in most places.
[libsigrok.git] / hardware / kecheng-kc-330b / protocol.c
index a3a09514a419663edb0b423d194d8fa76b797ccf..072eb7efa45454234a6aa281a6e01cbf6d7e91bb 100644 (file)
@@ -34,7 +34,7 @@ SR_PRIV int kecheng_kc_330b_handle_events(int fd, int revents, void *cb_data)
        struct timeval tv;
        const uint64_t *intv_entry;
        gint64 now, interval;
-       int offset, len, ret, i;
+       int offset, len, ret;
        unsigned char buf[4];
 
        (void)fd;
@@ -51,8 +51,7 @@ SR_PRIV int kecheng_kc_330b_handle_events(int fd, int revents, void *cb_data)
 
        if (sdi->status == SR_ST_STOPPING) {
                libusb_free_transfer(devc->xfer);
-               for (i = 0; devc->usbfd[i] != -1; i++)
-                       sr_source_remove(devc->usbfd[i]);
+               usb_source_remove(drvc->sr_ctx);
                packet.type = SR_DF_END;
                sr_session_send(cb_data, &packet);
                sdi->status = SR_ST_ACTIVE;
@@ -115,7 +114,7 @@ static void send_data(const struct sr_dev_inst *sdi, void *buf, unsigned int buf
        analog.mq = SR_MQ_SOUND_PRESSURE_LEVEL;
        analog.mqflags = devc->mqflags;
        analog.unit = SR_UNIT_DECIBEL_SPL;
-       analog.probes = sdi->probes;
+       analog.channels = sdi->channels;
        analog.num_samples = buf_len;
        analog.data = buf;
        packet.type = SR_DF_ANALOG;
@@ -337,15 +336,3 @@ SR_PRIV int kecheng_kc_330b_log_info_get(const struct sr_dev_inst *sdi,
 
        return SR_OK;
 }
-
-SR_PRIV int kecheng_kc_330b_log_date_time_get(const struct sr_dev_inst *sdi,
-               gboolean *tmp)
-{
-
-       (void)sdi;
-       (void)tmp;
-
-       /* TODO */
-
-       return SR_OK;
-}