From: Matthias Heidbrink Date: Thu, 17 Jul 2014 10:40:02 +0000 (+0200) Subject: gmc-mh-1x-2x-rs232: Support for Metrahit 16T and similiar models. X-Git-Tag: libsigrok-0.4.0~1259 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2c1a012ed243c39dc4ec1d24eede97e046224877;p=libsigrok.git gmc-mh-1x-2x-rs232: Support for Metrahit 16T and similiar models. --- diff --git a/hardware/gmc-mh-1x-2x/protocol.c b/hardware/gmc-mh-1x-2x/protocol.c index fc086a7d..dc1a683e 100644 --- a/hardware/gmc-mh-1x-2x/protocol.c +++ b/hardware/gmc-mh-1x-2x/protocol.c @@ -1379,21 +1379,23 @@ SR_PRIV int gmc_decode_model_sm(uint8_t mcode) return METRAHIT_16S; case 0x06: /* 0110b (undocumented by GMC!) */ return METRAHIT_16I; + case 0x07: /* 0111b (undocumented by GMC!) */ + return METRAHIT_16T; case 0x0D: /* 1101b */ return METRAHIT_18S; case 0x02: /* 0010b */ return METRAHIT_22SM; case 0x03: /* 0011b */ return METRAHIT_23S; - case 0x0f: /* 1111b */ + case 0x0F: /* 1111b */ return METRAHIT_24S; case 0x05: /* 0101b */ return METRAHIT_25S; case 0x01: /* 0001b */ return METRAHIT_26SM; - case 0x0c: /* 1100b */ + case 0x0C: /* 1100b */ return METRAHIT_28S; - case 0x0e: /* 1110b */ + case 0x0E: /* 1110b */ return METRAHIT_29S; default: sr_err("Unknown model code %d!", mcode); @@ -1458,7 +1460,9 @@ SR_PRIV const char *gmc_model_str(enum model mcode) case METRAHIT_16S: return "METRAHit 16S"; case METRAHIT_16I: - return "METRAHit 16I"; + return "METRAHit 16I/16L"; + case METRAHIT_16T: + return "METRAHit 16T/16U/KMM2002"; case METRAHIT_18S: return "METRAHit 18S"; case METRAHIT_22SM: diff --git a/hardware/gmc-mh-1x-2x/protocol.h b/hardware/gmc-mh-1x-2x/protocol.h index 3d34d9ab..aa19be38 100644 --- a/hardware/gmc-mh-1x-2x/protocol.h +++ b/hardware/gmc-mh-1x-2x/protocol.h @@ -60,10 +60,11 @@ enum model { METRAHIT_14S = 14, METRAHIT_15S = 15, METRAHIT_16S = 16, - METRAHIT_16I = 17, - METRAHIT_16X = METRAHIT_16I, /**< All Metrahit 16 */ + METRAHIT_16I = 17, /**< Metrahit 16I, L */ + METRAHIT_16T = 18, /**< Metrahit 16T, U, KMM2002 */ + METRAHIT_16X = METRAHIT_16T, /**< All Metrahit 16 */ /* A Metrahit 17 exists, but seems not to have an IR interface. */ - METRAHIT_18S = 18, + METRAHIT_18S = 19, METRAHIT_2X = 20, /**< For model type comparisons */ METRAHIT_22SM = METRAHIT_2X + 1, /**< Send mode */ METRAHIT_22S = METRAHIT_22SM + 1, /**< Bidi mode */