+ return TRUE;
+}
+
+SR_PRIV int mso_configure_channels(const struct sr_dev_inst *sdi)
+{
+ struct dev_context *devc;
+ struct sr_channel *ch;
+ GSList *l;
+ char *tc;
+
+ devc = sdi->priv;
+
+ devc->la_trigger_mask = 0xFF; //the mask for the LA_TRIGGER (bits set to 0 matter, those set to 1 are ignored).
+ devc->la_trigger = 0x00; //The value of the LA byte that generates a trigger event (in that mode).
+ devc->dso_trigger_voltage = 3;
+ devc->dso_probe_attn = 1;
+ devc->trigger_outsrc = 0;
+ devc->trigger_chan = 3; //LA combination trigger
+ devc->use_trigger = FALSE;
+
+ for (l = sdi->channels; l; l = l->next) {
+ ch = (struct sr_channel *)l->data;
+ if (ch->enabled == FALSE)
+ continue;
+
+ int channel_bit = 1 << (ch->index);
+ if (!(ch->trigger))
+ continue;
+
+ devc->use_trigger = TRUE;
+ //Configure trigger mask and value.
+ for (tc = ch->trigger; *tc; tc++) {
+ devc->la_trigger_mask &= ~channel_bit;
+ if (*tc == '1')
+ devc->la_trigger |= channel_bit;
+ }
+ }
+
+ return SR_OK;