X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Fzeroplus-logic-cube%2Fzeroplus.c;h=8651e779b959ff537498fbc9039541ced70c3e28;hb=4cea9eb20dc8d816a67c57d111a3a4529d452e4d;hp=d7f6d4114e3d30d87084f5a6459d333948f0d5d0;hpb=8a2efef2d5900cb3dd935af92a0e22528660c4be;p=libsigrok.git diff --git a/hardware/zeroplus-logic-cube/zeroplus.c b/hardware/zeroplus-logic-cube/zeroplus.c index d7f6d411..8651e779 100644 --- a/hardware/zeroplus-logic-cube/zeroplus.c +++ b/hardware/zeroplus-logic-cube/zeroplus.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "analyzer.h" #define USB_VENDOR 0x0c12 @@ -51,7 +52,7 @@ typedef struct { * Note -- 16032, 16064 and 16128 *usually* -- but not always -- have the * same 128K sample depth. */ -model_t zeroplus_models[] = { +static model_t zeroplus_models[] = { {0x7009, "LAP-C(16064)", 16, 64, 100}, {0x700A, "LAP-C(16128)", 16, 128, 200}, {0x700B, "LAP-C(32128)", 32, 128, 200}, @@ -108,7 +109,7 @@ static uint64_t supported_samplerates[] = { 0, }; -static struct samplerates samplerates = { +static struct sr_samplerates samplerates = { 0, 0, 0, supported_samplerates, }; @@ -116,8 +117,8 @@ static struct samplerates samplerates = { /* TODO: All of these should go in a device-specific struct. */ static uint64_t cur_samplerate = 0; static uint64_t limit_samples = 0; -int num_channels = 32; /* TODO: This isn't initialized before it's needed :( */ -uint64_t memory_size = 0; +static int num_channels = 32; /* TODO: This isn't initialized before it's needed :( */ +static uint64_t memory_size = 0; static uint8_t probe_mask = 0; static uint8_t trigger_mask[NUM_TRIGGER_STAGES] = { 0 }; static uint8_t trigger_value[NUM_TRIGGER_STAGES] = { 0 }; @@ -189,7 +190,7 @@ static int opendev4(struct sr_device_instance **sdi, libusb_device *dev, return 0; } -struct sr_device_instance *zp_open_device(int device_index) +static struct sr_device_instance *zp_open_device(int device_index) { struct sr_device_instance *sdi; libusb_device **devlist; @@ -273,7 +274,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;