2 * This file is part of the libsigrok project.
4 * Copyright 2014 Google, Inc
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef LIBSIGROK_HARDWARE_CHROMIUM_TWINKIE_PROTOCOL_H
21 #define LIBSIGROK_HARDWARE_CHROMIUM_TWINKIE_PROTOCOL_H
25 #include <libsigrok/libsigrok.h>
26 #include "libsigrok-internal.h"
28 #define LOG_PREFIX "twinkie"
30 /** Private, per-CC logical channel context. */
38 /** Private, per-device-instance driver context. */
40 /** Maximum number of samples to capture, if nonzero. */
41 uint64_t limit_samples;
44 int submitted_transfers;
46 size_t convbuffer_size;
48 unsigned int num_transfers;
49 struct libusb_transfer **transfers;
50 struct sr_context *ctx;
52 struct cc_context cc[2];
55 SR_PRIV int twinkie_start_acquisition(const struct sr_dev_inst *sdi);
56 SR_PRIV int twinkie_init_device(const struct sr_dev_inst *sdi);
57 SR_PRIV void twinkie_receive_transfer(struct libusb_transfer *transfer);