]> sigrok.org Git - libsigrok.git/blobdiff - hardware/saleae-logic/saleae-logic.c
sr: s/acquisition_*/dev_acquisition_*/.
[libsigrok.git] / hardware / saleae-logic / saleae-logic.c
index b23bbbd7ab0ec1fdc9daf6bfde526fc244f5c84d..8307220578ba0084b0b5c7e6de9b9fc541e3cc3d 100644 (file)
@@ -87,14 +87,14 @@ static struct sr_samplerates samplerates = {
        supported_samplerates,
 };
 
-/* List of struct sr_dev_inst, maintained by opendev()/closedev(). */
+/* List of struct sr_dev_inst, maintained by dev_open()/dev_close(). */
 static GSList *dev_insts = NULL;
 static libusb_context *usb_context = NULL;
 
 static int new_saleae_logic_firmware = 0;
 
 static int hw_config_set(int dev_index, int hwcap, void *value);
-static int hw_stop_acquisition(int dev_index, gpointer session_dev_id);
+static int hw_dev_acquisition_stop(int dev_index, gpointer session_dev_id);
 
 /**
  * Check the USB configuration to determine if this is a Saleae Logic.
@@ -393,7 +393,7 @@ static int hw_init(const char *devinfo)
        return devcnt;
 }
 
-static int hw_opendev(int dev_index)
+static int hw_dev_open(int dev_index)
 {
        GTimeVal cur_time;
        struct sr_dev_inst *sdi;
@@ -448,7 +448,7 @@ static int hw_opendev(int dev_index)
        return SR_OK;
 }
 
-static int hw_closedev(int dev_index)
+static int hw_dev_close(int dev_index)
 {
        struct sr_dev_inst *sdi;
 
@@ -534,7 +534,7 @@ static void *hw_dev_info_get(int dev_index, int dev_info_id)
        return info;
 }
 
-static int hw_get_status(int dev_index)
+static int hw_dev_status_get(int dev_index)
 {
        struct sr_dev_inst *sdi;
 
@@ -680,7 +680,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
        int cur_buflen, trigger_offset, i;
        unsigned char *cur_buf, *new_buf;
 
-       /* hw_stop_acquisition() is telling us to stop. */
+       /* hw_dev_acquisition_stop() is telling us to stop. */
        if (transfer == NULL)
                num_samples = -1;
 
@@ -723,7 +723,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
                         * The FX2 gave up. End the acquisition, the frontend
                         * will work out that the samplecount is short.
                         */
-                       hw_stop_acquisition(-1, fx2->session_data);
+                       hw_dev_acquisition_stop(-1, fx2->session_data);
                }
                return;
        } else {
@@ -797,7 +797,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
 
                num_samples += cur_buflen;
                if (fx2->limit_samples && (unsigned int) num_samples > fx2->limit_samples) {
-                       hw_stop_acquisition(-1, fx2->session_data);
+                       hw_dev_acquisition_stop(-1, fx2->session_data);
                }
        } else {
                /*
@@ -807,7 +807,7 @@ static void receive_transfer(struct libusb_transfer *transfer)
        }
 }
 
-static int hw_start_acquisition(int dev_index, gpointer session_data)
+static int hw_dev_acquisition_start(int dev_index, gpointer session_data)
 {
        struct sr_dev_inst *sdi;
        struct sr_datafeed_packet *packet;
@@ -873,7 +873,7 @@ static int hw_start_acquisition(int dev_index, gpointer session_data)
 }
 
 /* This stops acquisition on ALL devices, ignoring dev_index. */
-static int hw_stop_acquisition(int dev_index, gpointer session_data)
+static int hw_dev_acquisition_stop(int dev_index, gpointer session_data)
 {
        struct sr_datafeed_packet packet;
 
@@ -896,12 +896,12 @@ SR_PRIV struct sr_dev_plugin saleae_logic_plugin_info = {
        .api_version = 1,
        .init = hw_init,
        .cleanup = hw_cleanup,
-       .opendev = hw_opendev,
-       .closedev = hw_closedev,
+       .dev_open = hw_dev_open,
+       .dev_close = hw_dev_close,
        .dev_info_get = hw_dev_info_get,
-       .get_status = hw_get_status,
+       .dev_status_get = hw_dev_status_get,
        .hwcap_get_all = hw_hwcap_get_all,
        .config_set = hw_config_set,
-       .start_acquisition = hw_start_acquisition,
-       .stop_acquisition = hw_stop_acquisition,
+       .dev_acquisition_start = hw_dev_acquisition_start,
+       .dev_acquisition_stop = hw_dev_acquisition_stop,
 };