};
static const char *channel_names[] = {
- "0", "1", "2", "3", "4", "5", "6", "7",
- "8", "9", "10", "11", "12", "13", "14", "15",
+ "CH0", "CH1", "CH2", "CH3", "CH4", "CH5", "CH6", "CH7",
+ "CH8", "CH9", "CH10", "CH11", "CH12", "CH13", "CH14", "CH15",
};
static const uint64_t samplerates_la2016[] = {
static int configure_channels(const struct sr_dev_inst *sdi)
{
struct dev_context *devc;
+ GSList *l;
+ struct sr_channel *ch;
devc = sdi->priv;
+
devc->cur_channels = 0;
- for (GSList *l = sdi->channels; l; l = l->next) {
- struct sr_channel *ch = (struct sr_channel*)l->data;
- if (ch->enabled == FALSE)
+ for (l = sdi->channels; l; l = l->next) {
+ ch = l->data;
+ if (!ch->enabled)
continue;
- devc->cur_channels |= 1 << ch->index;
+ devc->cur_channels |= 1UL << ch->index;
}
return SR_OK;