]> sigrok.org Git - libsigrok.git/blobdiff - hardware/fx2lafw/fx2lafw.c
sr: s/sr_session_bus/sr_session_send/.
[libsigrok.git] / hardware / fx2lafw / fx2lafw.c
index 170e3baa107e0a34d04fa9f8d28fc5f40d099819..af7b2f06c7a2b2a9689ceac25470bb1808f2471f 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdbool.h>
 #include <inttypes.h>
 #include <glib.h>
 #include <libusb.h>
@@ -83,15 +82,15 @@ static int hw_dev_acquisition_stop(int dev_index, gpointer session_dev_id);
 /**
  * Check the USB configuration to determine if this is an fx2lafw device.
  *
- * @return true if the device's configuration profile match fx2lafw
- *         configuration, false otherwise.
+ * @return TRUE if the device's configuration profile match fx2lafw
+ *         configuration, FALSE otherwise.
  */
-static bool check_conf_profile(libusb_device *dev)
+static gboolean check_conf_profile(libusb_device *dev)
 {
        struct libusb_device_descriptor des;
        struct libusb_config_descriptor *conf_dsc = NULL;
        const struct libusb_interface_descriptor *intf_dsc;
-       bool ret = false;
+       gboolean ret = FALSE;
 
        while (!ret) {
                /* Assume it's not a Saleae Logic unless proven wrong. */
@@ -133,7 +132,7 @@ static bool check_conf_profile(libusb_device *dev)
                /* TODO: Check the debug channel... */
 
                /* If we made it here, it must be an fx2lafw. */
-               ret = true;
+               ret = TRUE;
        }
 
        if (conf_dsc)
@@ -566,7 +565,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
        logic.length = cur_buflen;
        logic.unitsize = 1;
        logic.data = cur_buf;
-       sr_session_bus(ctx->session_data, &packet);
+       sr_session_send(ctx->session_data, &packet);
        g_free(cur_buf);
 
        num_samples += cur_buflen;
@@ -634,7 +633,7 @@ static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
        gettimeofday(&header->starttime, NULL);
        header->samplerate = 24000000UL;
        header->num_logic_probes = ctx->profile->num_probes;
-       sr_session_bus(session_data, packet);
+       sr_session_send(session_data, packet);
        g_free(header);
        g_free(packet);
 
@@ -650,7 +649,7 @@ static int hw_dev_acquisition_stop(int dev_index, gpointer session_data)
        (void)dev_index;
 
        packet.type = SR_DF_END;
-       sr_session_bus(session_data, &packet);
+       sr_session_send(session_data, &packet);
 
        receive_transfer(NULL);
 
@@ -659,7 +658,7 @@ static int hw_dev_acquisition_stop(int dev_index, gpointer session_data)
        return SR_OK;
 }
 
-SR_PRIV struct sr_dev_plugin fx2lafw_plugin_info = {
+SR_PRIV struct sr_dev_driver fx2lafw_driver_info = {
        .name = "fx2lafw",
        .longname = "fx2lafw",
        .api_version = 1,