memset(cmdstring, 0, sizeof(cmdstring));
cmdstring[0] = CMD_SET_FILTERS;
cmdstring[1] = 0x0f;
memset(cmdstring, 0, sizeof(cmdstring));
cmdstring[0] = CMD_SET_FILTERS;
cmdstring[1] = 0x0f;
- if (devc->filter_trigger) {
- /* TODO: supported on the DSO-2090? */
- sr_dbg("Turning on trigger filter.");
- cmdstring[2] |= 0x20;
- }
+ /*
+ * Not supported: filtering on the trigger
+ * cmdstring[2] |= 0x20;
+ */
- sr_dbg("CH1 vdiv index: %d.", devc->voltage_ch1);
- switch (devc->voltage_ch1) {
+ sr_dbg("CH1 vdiv index: %d.", devc->voltage[0]);
+ switch (devc->voltage[0]) {
- sr_dbg("CH2 vdiv index: %d.", devc->voltage_ch2);
- switch (devc->voltage_ch2) {
+ sr_dbg("CH2 vdiv index: %d.", devc->voltage[1]);
+ switch (devc->voltage[1]) {
- sr_dbg("CH1 coupling: %d.", devc->coupling_ch1);
- if (devc->coupling_ch1 != COUPLING_AC)
+ sr_dbg("CH1 coupling: %d.", devc->coupling[0]);
+ if (devc->coupling[0] != COUPLING_AC)
- sr_dbg("CH2 coupling: %d.", devc->coupling_ch1);
- if (devc->coupling_ch2 != COUPLING_AC)
+ sr_dbg("CH2 coupling: %d.", devc->coupling[1]);
+ if (devc->coupling[1] != COUPLING_AC)
offset = (ch_levels[1] - ch_levels[0]) * devc->voffset_ch1 + ch_levels[0];
offsets[0] = (offset >> 8) | 0x20;
offsets[1] = offset & 0xff;
offset = (ch_levels[1] - ch_levels[0]) * devc->voffset_ch1 + ch_levels[0];
offsets[0] = (offset >> 8) | 0x20;
offsets[1] = offset & 0xff;
offset = (ch_levels[1] - ch_levels[0]) * devc->voffset_ch2 + ch_levels[0];
offsets[2] = (offset >> 8) | 0x20;
offsets[3] = offset & 0xff;
offset = (ch_levels[1] - ch_levels[0]) * devc->voffset_ch2 + ch_levels[0];
offsets[2] = (offset >> 8) | 0x20;
offsets[3] = offset & 0xff;