]> sigrok.org Git - libsigrok.git/commitdiff
agilent-dmm: Assume all A and B models are identical on the wire.
authorBert Vermeulen <redacted>
Fri, 29 Aug 2014 21:39:00 +0000 (23:39 +0200)
committerBert Vermeulen <redacted>
Fri, 29 Aug 2014 21:42:06 +0000 (23:42 +0200)
src/hardware/agilent-dmm/agilent-dmm.h
src/hardware/agilent-dmm/api.c
src/hardware/agilent-dmm/sched.c

index 2277111f62c3d3ecc74f760af40f7b437dbc3799..789358c485c9f0b08458ac5dbfd965634e34858d 100644 (file)
 
 /* Supported models */
 enum {
-       AGILENT_U1231A = 1,
-       AGILENT_U1232A,
-       AGILENT_U1233A,
-       AGILENT_U1251A,
-       AGILENT_U1252A,
-       AGILENT_U1253A,
+       AGILENT_U1231 = 1,
+       AGILENT_U1232,
+       AGILENT_U1233,
+
+       AGILENT_U1251,
+       AGILENT_U1252,
+       AGILENT_U1253,
 };
 
 /* Supported device profiles */
index cb7baa603a6f623f0fecb47a493ee08c41794828..40c7990d11a66cf9ca36bd9c1ea8ea6a89a41cc5 100644 (file)
@@ -39,9 +39,8 @@ static const int32_t hwcaps[] = {
        SR_CONF_CONTINUOUS,
 };
 
-extern const struct agdmm_job agdmm_jobs_u123x[];
+extern const struct agdmm_job agdmm_jobs_u12xx[];
 extern const struct agdmm_recv agdmm_recvs_u123x[];
-extern const struct agdmm_job agdmm_jobs_u125x[];
 extern const struct agdmm_recv agdmm_recvs_u125x[];
 
 /* This works on all the Agilent U12xxA series, although the
@@ -49,13 +48,17 @@ extern const struct agdmm_recv agdmm_recvs_u125x[];
 #define SERIALCOMM "9600/8n1"
 
 static const struct agdmm_profile supported_agdmm[] = {
-       { AGILENT_U1231A, "U1231A", agdmm_jobs_u123x, agdmm_recvs_u123x },
-       { AGILENT_U1232A, "U1232A", agdmm_jobs_u123x, agdmm_recvs_u123x },
-       { AGILENT_U1233A, "U1233A", agdmm_jobs_u123x, agdmm_recvs_u123x },
-       { AGILENT_U1251A, "U1251A", agdmm_jobs_u125x, agdmm_recvs_u125x },
-       { AGILENT_U1252A, "U1252A", agdmm_jobs_u125x, agdmm_recvs_u125x },
-       { AGILENT_U1253A, "U1253A", agdmm_jobs_u125x, agdmm_recvs_u125x },
-       { 0, NULL, NULL, NULL }
+       { AGILENT_U1231, "U1231A", agdmm_jobs_u12xx, agdmm_recvs_u123x },
+       { AGILENT_U1232, "U1232A", agdmm_jobs_u12xx, agdmm_recvs_u123x },
+       { AGILENT_U1233, "U1233A", agdmm_jobs_u12xx, agdmm_recvs_u123x },
+
+       { AGILENT_U1251, "U1251A", agdmm_jobs_u12xx, agdmm_recvs_u125x },
+       { AGILENT_U1252, "U1252A", agdmm_jobs_u12xx, agdmm_recvs_u125x },
+       { AGILENT_U1253, "U1253A", agdmm_jobs_u12xx, agdmm_recvs_u125x },
+       { AGILENT_U1251, "U1251B", agdmm_jobs_u12xx, agdmm_recvs_u125x },
+       { AGILENT_U1252, "U1252B", agdmm_jobs_u12xx, agdmm_recvs_u125x },
+       { AGILENT_U1253, "U1253B", agdmm_jobs_u12xx, agdmm_recvs_u125x },
+       ALL_ZERO
 };
 
 SR_PRIV struct sr_dev_driver agdmm_driver_info;
index a697e1ec47ed62b9b14bff1fbd882491e3f53c2d..08292585803d7793c8aa0ba80a325a8047423243 100644 (file)
@@ -448,7 +448,8 @@ static int recv_switch(const struct sr_dev_inst *sdi, GMatchInfo *match)
        return SR_OK;
 }
 
-SR_PRIV const struct agdmm_job agdmm_jobs_u123x[] = {
+/* Poll keys/switches and values at 7Hz, mode at 1Hz. */
+SR_PRIV const struct agdmm_job agdmm_jobs_u12xx[] = {
        { 143, send_stat },
        { 1000, send_conf },
        { 143, send_fetc },
@@ -465,13 +466,6 @@ SR_PRIV const struct agdmm_recv agdmm_recvs_u123x[] = {
        { NULL, NULL }
 };
 
-SR_PRIV const struct agdmm_job agdmm_jobs_u125x[] = {
-       { 143, send_stat },
-       { 1000, send_conf },
-       { 143, send_fetc },
-       { 0, NULL }
-};
-
 SR_PRIV const struct agdmm_recv agdmm_recvs_u125x[] = {
        { "^\"(\\d\\d.{18}\\d)\"$", recv_stat_u125x },
        { "^\\*([0-9])$", recv_switch },