X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Funi-t-dmm%2Fprotocol.h;h=3376861aca982c76528b61b0a1cff023b4822dc0;hb=3ece1dff6ce9d29021215a1aa4a4ae8cff25aa49;hp=73fa75825825498e37ddfe50a604c143109e8256;hpb=c8852687778a33b9de218af800eec4ae7e3848a6;p=libsigrok.git diff --git a/hardware/uni-t-dmm/protocol.h b/hardware/uni-t-dmm/protocol.h index 73fa7582..3376861a 100644 --- a/hardware/uni-t-dmm/protocol.h +++ b/hardware/uni-t-dmm/protocol.h @@ -1,7 +1,7 @@ /* * This file is part of the libsigrok project. * - * Copyright (C) 2012 Uwe Hermann + * Copyright (C) 2012-2013 Uwe Hermann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,11 +60,9 @@ struct dmm_info { extern SR_PRIV struct dmm_info udmms[DMM_COUNT]; -#define UT_D04_CABLE_USB_VID 0x1a86 -#define UT_D04_CABLE_USB_DID 0xe008 - #define CHUNK_SIZE 8 -#define NUM_DATA_BYTES 14 + +#define DMM_BUFSIZE 256 /** Private, per-device-instance driver context. */ struct dev_context { @@ -80,9 +78,11 @@ struct dev_context { /** The current number of already received samples. */ uint64_t num_samples; - struct sr_usb_dev_inst *usb; + gboolean first_run; - uint8_t protocol_buf[14]; + uint8_t protocol_buf[DMM_BUFSIZE]; + uint8_t bufoffset; + uint8_t buflen; }; SR_PRIV int receive_data_UNI_T_UT61D(int fd, int revents, void *cb_data);