X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fvictor-dmm%2Fprotocol.c;h=18b0cd1f73ecb33087b5701ce1febef9678c91d2;hb=b0e1a1ecc4be698fb2cd48179ee48cf41e8f7f52;hp=13a9befa2322f636b7b7d4c3b3b194d048d91a60;hpb=fbbafc6909a4c3d75f77f1c770ef2e8aaab1b306;p=libsigrok.git diff --git a/src/hardware/victor-dmm/protocol.c b/src/hardware/victor-dmm/protocol.c index 13a9befa..18b0cd1f 100644 --- a/src/hardware/victor-dmm/protocol.c +++ b/src/hardware/victor-dmm/protocol.c @@ -269,13 +269,13 @@ static void decode_buf(struct sr_dev_inst *sdi, unsigned char *data) SR_PRIV int victor_dmm_receive_data(struct sr_dev_inst *sdi, unsigned char *buf) { + static const unsigned char obfuscation[DMM_DATA_SIZE] = "jodenxunickxia"; + static const unsigned char shuffle[DMM_DATA_SIZE] = { + 6, 13, 5, 11, 2, 7, 9, 8, 3, 10, 12, 0, 4, 1 + }; GString *dbg; int i; unsigned char data[DMM_DATA_SIZE]; - unsigned char obfuscation[DMM_DATA_SIZE] = "jodenxunickxia"; - unsigned char shuffle[DMM_DATA_SIZE] = { - 6, 13, 5, 11, 2, 7, 9, 8, 3, 10, 12, 0, 4, 1 - }; for (i = 0; i < DMM_DATA_SIZE && buf[i] == 0; i++); if (i == DMM_DATA_SIZE) {