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,
};
* 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;
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;