#include <stdio.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <inttypes.h>
#include <glib.h>
#include <libusb.h>
/**
* 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. */
/* TODO: Check the debug channel... */
/* If we made it here, it must be an fx2lafw. */
- ret = true;
+ ret = TRUE;
}
if (conf_dsc)
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;
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);
(void)dev_index;
packet.type = SR_DF_END;
- sr_session_bus(session_data, &packet);
+ sr_session_send(session_data, &packet);
receive_transfer(NULL);
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,