2525#include "protocol.h"
2626#include "scpi.h"
2727
28- static struct sr_dev_driver tektronix_ocp2k5_driver_info ;
29-
3028/**
3129 * Documentation for the SCPI commands can be found in
3230 * https://download.tek.com/manual/TBS1000-B-EDU-TDS2000-B-C-TDS1000-B-C-EDU-TDS200-TPS2000-B-Programmer-077044403_RevB.pdf
3331 * and is referred to as "doc page $PDF_PAGE/$PRINTED_PAGE"
3432 */
3533
36- static const uint32_t scanopts [] = {SR_CONF_CONN , SR_CONF_SERIALCOMM };
3734
38- static const uint32_t drvopts [] = {SR_CONF_OSCILLOSCOPE };
3935/**
40- * TODOS
41- *
42- * General cleanup
43- * current options?
36+ * Missing semi-important features:
37+ * bandwidth limiting ch<x>:bandwidth
38+ * chanel invert ch<x>:invert
39+ * volt/amp configuration ch:<x>:yunit
40+ * pulse triggering
41+ * ext trigger coupling
42+ * peak-detect mode (data retreival)
43+ *
44+ * Missing less important features:
45+ * capture/savefiles
46+ * screenshots
47+ * fine adjust of vdivs
48+ * video triggering
4449 */
4550
51+
52+ static struct sr_dev_driver tektronix_ocp2k5_driver_info ;
53+
54+ static const uint32_t scanopts [] = {SR_CONF_CONN , SR_CONF_SERIALCOMM };
55+
56+ static const uint32_t drvopts [] = {SR_CONF_OSCILLOSCOPE };
57+
4658static const uint32_t devopts [] = {
4759 SR_CONF_TIMEBASE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST ,
4860 SR_CONF_TRIGGER_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST ,
@@ -58,37 +70,20 @@ static const uint32_t devopts[] = {
5870 SR_CONF_BUFFERSIZE | SR_CONF_GET ,
5971 SR_CONF_DATA_SOURCE | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST ,
6072 SR_CONF_PEAK_DETECTION | SR_CONF_GET | SR_CONF_SET ,
61-
62- // capturefile or session file?
63-
64- // SR_CONF_LIMIT_SAMPLES? (could be here or per-channel, but
65- // realistically, 2.5k samples isn't going to overwhelm anyone)
66-
67- // TODO: voltage threshold?
6873};
6974
70- /**
71- * Missing semi-important features:
72- * bandwidth limiting ch<x>:bandwidth
73- * chanel invert ch<x>:invert
74- * volt/amp configuration ch:<x>:yunit
75- */
76-
7775static const uint32_t devopts_cg_analog [] = {
7876 SR_CONF_NUM_VDIV | SR_CONF_GET ,
7977 SR_CONF_VDIV | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST ,
8078 SR_CONF_COUPLING | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST ,
8179 SR_CONF_PROBE_FACTOR | SR_CONF_GET | SR_CONF_SET | SR_CONF_LIST ,
8280 SR_CONF_ENABLED | SR_CONF_GET | SR_CONF_SET ,
83-
84- // Is SR_CONF_CHANNEL_CONFIG how "advanced" features are supported?
8581};
8682
87- // TODO: Compensation adjusts the vdivs, and I implemented a semi-proper
88- // configuration of that, but it wasn't ideal, so for now
89- // all possible compensation vdivs are present
83+ // TODO: Compensation adjusts the vdivs, but PulseView doesn't pick up
84+ // any such dynamic changes, nor does it seem to support fine-adjust,
85+ // so for now all possible compensation vdivs are present
9086
91- // TODO: allow fine adjust
9287// validated in doc page 75/2-57
9388static const uint64_t vdivs [][2 ] = {
9489 /* millivolts */
@@ -118,7 +113,7 @@ static const uint64_t vdivs[][2] = {
118113 {5000 , 1 },
119114};
120115
121- // everyone uses the same voltrange
116+ // everyone uses the same voltrange, only modified by compensation ranges (also the same)
122117#define VOLTRANGE_2m_5V 0, 0
123118
124119static const uint64_t timebases [][2 ] = {
@@ -165,7 +160,6 @@ static const uint64_t timebases[][2] = {
165160#define TIMEBASE_10n_50s 2, 0
166161#define TIMEBASE_5ns_5s 1, 3
167162
168- // TODO: edge trigger has other options
169163// validated in doc page 71/2-53
170164static const char * coupling [] = {
171165 "AC" ,
@@ -175,25 +169,9 @@ static const char *coupling[] = {
175169
176170// validated in doc page 74/2-53
177171static const uint64_t probe_factor_new [] = {1 , 10 , 20 , 50 , 100 , 500 , 1000 };
178- // tds200, tds2000, tds1000
172+ // Only for tds200, tds2000, tds1000
179173static const uint64_t probe_factor_old [] = {1 , 10 , 100 , 1000 };
180174
181-
182- // TODO: current probe factor FIXME: 0.2x current probes are supported but this
183- // is an int setting
184-
185- // {5,1,.5,.2,.1,.02,.01,.001} tbs1000B/EDU,
186- // {5,1,.5,.2,.1,.02,.01,.001} tbs1000,
187- // {5,1,.5,.2,.1,.02,.01,.001} tds2000c,
188- // {5,1,.5,.2,.1,.02,.01,.001} tds1000C-edu,
189- // {5,1,.5,.2,.1,.02,.01,.001} tds2000b,
190- // {5,1,.5,.2,.1,.02,.01,.001} tds1000B,
191-
192- // {5,1,.2,.1,.05.02,.01,.001} tps2000/B
193- // N/A tds200
194- // tds2000
195- // tds1000 ?
196-
197175static const char * trigger_slopes [] = {
198176 "r" ,
199177 "f" ,
@@ -247,18 +225,19 @@ static const char *trigger_sources_models_TPS_2k[] = {
247225 4 + channels \
248226 }
249227
250- /* The doc is for :
228+ /* This table was generated from the documentation :
251229 *
252- * [x] TBS1000B/EDU: https://download.tek.com/manual/TBS1000B-User-Manual-077088602-RevA.pdf
253- * [x] TBS1000: https://download.tek.com/manual/TBS1000-Oscilloscope-User-Manual_077076001.pdf
254- * [x] TDS2000C/TDS1000C-EDU: https://download.tek.com/manual/TDS2000C-and-TDS1000C-EDU-Oscilloscope-User-Manual-EN_077082600.pdf
255- * [x] TDS2000B/TDS1000B: https://download.tek.com/manual/071181702web.pdf
256- * [x] TDS2000/TDS1000: https://download.tek.com/manual/TDS2000_TDS1000_User_071106400_Revision_A.pdf
257- * [x] TDS200: https://download.tek.com/manual/071039803.pdf
258- * [x] TPS2000B:https://download.tek.com/manual/TPS2000B-Digital-Oscilloscope-User-Manual-077137901.pdf
259- * [x] TPS2000: https://download.tek.com/manual/071144105web.pdf
230+ * TBS1000B/EDU: https://download.tek.com/manual/TBS1000B-User-Manual-077088602-RevA.pdf
231+ * TBS1000: https://download.tek.com/manual/TBS1000-Oscilloscope-User-Manual_077076001.pdf
232+ * TDS2000C/TDS1000C-EDU: https://download.tek.com/manual/TDS2000C-and-TDS1000C-EDU-Oscilloscope-User-Manual-EN_077082600.pdf
233+ * TDS2000B/TDS1000B: https://download.tek.com/manual/071181702web.pdf
234+ * TDS2000/TDS1000: https://download.tek.com/manual/TDS2000_TDS1000_User_071106400_Revision_A.pdf
235+ * TDS200: https://download.tek.com/manual/071039803.pdf
236+ * TPS2000B:https://download.tek.com/manual/TPS2000B-Digital-Oscilloscope-User-Manual-077137901.pdf
237+ * TPS2000: https://download.tek.com/manual/071144105web.pdf
260238 *
261239 * All specs can be found in Appendix A's of the linked pdfs
240+ * EDU series are badge-only, and respond as if they are non-EDU products
262241 */
263242static const struct device_spec device_models [] = {
264243
@@ -690,7 +669,7 @@ static int config_set(uint32_t key, GVariant *data,
690669 tmp_str = "EXT10" ;
691670 else
692671 tmp_str = (char * )devc -> trigger_source ;
693- // TODO : pulse and video
672+ // Note : pulse and video triggering isn't set here
694673 return tektronix_ocp2k5_config_set (
695674 sdi , "TRIG:mai:edge:sou %s" , tmp_str );
696675 case SR_CONF_VDIV :
0 commit comments