]> sigrok.org Git - libsigrok.git/blobdiff - hardware/saleae-logic/saleae-logic.c
Add SR_ prefix to the KHZ/MHZ/GHZ macros.
[libsigrok.git] / hardware / saleae-logic / saleae-logic.c
index 4d3e718fbc65d260358d1bfe846e93d9dec11c19..23ba69a9aa52f4f3b900d5a9941444ea056bb1e9 100644 (file)
@@ -73,22 +73,22 @@ static GTimeVal firmware_updated = { 0, 0 };
 static libusb_context *usb_context = NULL;
 
 static uint64_t supported_samplerates[] = {
-       KHZ(200),
-       KHZ(250),
-       KHZ(500),
-       MHZ(1),
-       MHZ(2),
-       MHZ(4),
-       MHZ(8),
-       MHZ(12),
-       MHZ(16),
-       MHZ(24),
+       SR_KHZ(200),
+       SR_KHZ(250),
+       SR_KHZ(500),
+       SR_MHZ(1),
+       SR_MHZ(2),
+       SR_MHZ(4),
+       SR_MHZ(8),
+       SR_MHZ(12),
+       SR_MHZ(16),
+       SR_MHZ(24),
        0,
 };
 
 static struct sr_samplerates samplerates = {
-       KHZ(200),
-       MHZ(24),
+       SR_KHZ(200),
+       SR_MHZ(24),
        0,
        supported_samplerates,
 };
@@ -291,7 +291,7 @@ static int configure_probes(GSList *probes)
  * API callbacks
  */
 
-static int hw_init(char *deviceinfo)
+static int hw_init(const char *deviceinfo)
 {
        struct sr_device_instance *sdi;
        struct libusb_device_descriptor des;
@@ -704,8 +704,8 @@ static int hw_start_acquisition(int device_index, gpointer session_device_id)
 
        lupfd = libusb_get_pollfds(usb_context);
        for (i = 0; lupfd[i]; i++)
-               source_add(lupfd[i]->fd, lupfd[i]->events, 40, receive_data,
-                          NULL);
+               sr_source_add(lupfd[i]->fd, lupfd[i]->events, 40, receive_data,
+                             NULL);
        free(lupfd);
 
        packet->type = SR_DF_HEADER;