sdi->driver = di;
for (i = 0; i < ARRAY_SIZE(channel_names); i++)
- sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE,
- channel_names[i]);
+ sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_names[i]);
devices = g_slist_append(devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
SR_TRIGGER_EDGE,
};
-/* Channels are numbered 0-13 */
-SR_PRIV const char *beaglelogic_channel_names[] = {
- "P8_45", "P8_46", "P8_43", "P8_44", "P8_41", "P8_42", "P8_39", "P8_40",
- "P8_27", "P8_29", "P8_28", "P8_30", "P8_21", "P8_20", NULL,
+SR_PRIV const char *channel_names[] = {
+ "P8_45", "P8_46", "P8_43", "P8_44", "P8_41", "P8_42", "P8_39",
+ "P8_40", "P8_27", "P8_29", "P8_28", "P8_30", "P8_21", "P8_20",
};
/* Possible sample rates : 10 Hz to 100 MHz = (100 / x) MHz */
/* Fill the channels */
for (i = 0; i < maxch; i++)
sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE,
- beaglelogic_channel_names[i]);
+ channel_names[i]);
sdi->priv = devc;
drvc->instances = g_slist_append(drvc->instances, sdi);
static const char *channel_names[] = {
"T1", "T2", "T3", "T4",
- NULL,
};
SR_PRIV struct sr_dev_driver center_309_driver_info;
sdi->priv = devc;
sdi->driver = center_devs[idx].di;
- for (i = 0; i < center_devs[idx].num_channels; i++) {
- sr_channel_new(sdi, i, SR_CHANNEL_ANALOG,
- TRUE, channel_names[i]);
- }
+ for (i = 0; i < center_devs[idx].num_channels; i++)
+ sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel_names[i]);
drvc->instances = g_slist_append(drvc->instances, sdi);
devices = g_slist_append(devices, sdi);
for (i = 0; i < devc->prof->num_channels; i++)
sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE,
- cv_channel_names[i]);
+ cv_channel_names[i]);
*devices = g_slist_append(*devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
};
static const char *channel_names[] = {
- "0", "1", "2", "3", "4", "5", "6", "7",
- "8", "9", "10", "11", "12", "13", "14", "15",
- NULL,
+ "0", "1", "2", "3", "4", "5", "6", "7",
+ "8", "9", "10", "11", "12", "13", "14", "15",
};
static const int32_t soft_trigger_matches[] = {
static const char *channel_names[] = {
"CH1", "CH2",
- NULL,
};
static const uint64_t buffersizes_32k[] = {
* Add only the real channels -- EXT isn't a source of data, only
* a trigger source internal to the device.
*/
- for (i = 0; channel_names[i]; i++) {
+ for (i = 0; i < ARRAY_SIZE(channel_names); i++) {
ch = sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channel_names[i]);
cg = g_malloc0(sizeof(struct sr_channel_group));
cg->name = g_strdup(channel_names[i]);
static const char *channel_names[] = {
"0", "1", "2", "3",
- NULL,
};
SR_PRIV struct sr_dev_driver ikalogic_scanalogic2_driver_info;
sdi->inst_type = SR_INST_USB;
sdi->conn = usb;
- for (i = 0; channel_names[i]; i++)
- devc->channels[i] = sr_channel_new(sdi, i, SR_CHANNEL_LOGIC,
- TRUE, channel_names[i]);
+ for (i = 0; i < ARRAY_SIZE(channel_names); i++)
+ devc->channels[i] = sr_channel_new(sdi, i,
+ SR_CHANNEL_LOGIC, TRUE, channel_names[i]);
devc->state = STATE_IDLE;
devc->next_state = STATE_IDLE;
/* Channels are numbered 1-9. */
static const char *channel_names[] = {
"1", "2", "3", "4", "5", "6", "7", "8", "9",
- NULL,
};
/* Note: The IKALOGIC ScanaPLUS always samples at 100MHz. */
sdi->driver = di;
sdi->priv = devc;
- for (i = 0; channel_names[i]; i++)
- sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE,
- channel_names[i]);
+ for (i = 0; i < ARRAY_SIZE(channel_names); i++)
+ sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_names[i]);
devices = g_slist_append(devices, sdi);
drvc->instances = g_slist_append(drvc->instances, sdi);
*
* See also: http://www.linkinstruments.com/images/mso19_1113.gif
*/
-SR_PRIV const char *mso19_channel_names[] = {
+static const char *channel_names[] = {
/* Note: DSO needs to be first. */
- "DSO", "0", "1", "2", "3", "4", "5", "6", "7", NULL,
+ "DSO", "0", "1", "2", "3", "4", "5", "6", "7",
};
static const uint64_t samplerates[] = {
for (i = 0; i < NUM_CHANNELS; i++) {
chtype = (i == 0) ? SR_CHANNEL_ANALOG : SR_CHANNEL_LOGIC;
- sr_channel_new(sdi, i, chtype, TRUE,
- mso19_channel_names[i]);
+ sr_channel_new(sdi, i, chtype, TRUE, channel_names[i]);
}
//Add the driver
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
"13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23",
"24", "25", "26", "27", "28", "29", "30", "31",
- NULL,
};
/* Default supported samplerates, can be overridden by device metadata. */
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12",
"13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23",
"24", "25", "26", "27", "28", "29", "30", "31",
- NULL,
};
/* Default supported samplerates, can be overridden by device metadata. */
static const char *channel_names[] = {
"0", "1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15",
- NULL,
};
static const struct {
sdi->driver = di;
sdi->connection_id = g_strdup(connection_id);
- for (j = 0; channel_names[j]; j++)
+ for (j = 0; i < ARRAY_SIZE(channel_names); j++)
sr_channel_new(sdi, j, SR_CHANNEL_LOGIC, TRUE,
channel_names[j]);
SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST,
};
-static char *channels[] = {
- "T1",
- "T2",
- "T1-T2",
+static const char *channel_names[] = {
+ "T1", "T2", "T1-T2",
};
static const char *data_sources[] = {
sdi->inst_type = SR_INST_USB;
sdi->conn = l->data;
for (i = 0; i < 3; i++)
- sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE, channels[i]);
+ sr_channel_new(sdi, i, SR_CHANNEL_ANALOG, TRUE,
+ channel_names[i]);
devc = g_malloc0(sizeof(struct dev_context));
sdi->priv = devc;
devc->limit_samples = 0;
"B0", "B1", "B2", "B3", "B4", "B5", "B6", "B7",
"C0", "C1", "C2", "C3", "C4", "C5", "C6", "C7",
"D0", "D1", "D2", "D3", "D4", "D5", "D6", "D7",
- NULL,
};
SR_PRIV struct sr_dev_driver zeroplus_logic_cube_driver_info;