2 * This file is part of the libsigrok project.
4 * Copyright (C) 2023 Gerhard Sittig <gerhard.sittig@gmx.net>
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 3 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_JUNTEK_JDS6600_PROTOCOL_H
21 #define LIBSIGROK_HARDWARE_JUNTEK_JDS6600_PROTOCOL_H
24 #include <libsigrok/libsigrok.h>
27 #include "libsigrok-internal.h"
29 #define LOG_PREFIX "juntek-jds6600"
31 #define MAX_GEN_CHANNELS 2
35 unsigned int device_type;
37 uint64_t max_output_frequency;
38 size_t channel_count_gen;
42 size_t arbitrary_count;
49 uint32_t waveform_code;
50 size_t waveform_index;
51 double output_frequency;
52 double amplitude, offset;
54 } channel_config[MAX_GEN_CHANNELS];
55 double channels_phase;
59 SR_PRIV int jds6600_identify(struct sr_dev_inst *sdi);
60 SR_PRIV int jds6600_setup_devc(struct sr_dev_inst *sdi);
62 SR_PRIV int jds6600_get_chans_enable(const struct sr_dev_inst *sdi);
63 SR_PRIV int jds6600_get_waveform(const struct sr_dev_inst *sdi, size_t ch_idx);
64 SR_PRIV int jds6600_get_frequency(const struct sr_dev_inst *sdi, size_t ch_idx);
65 SR_PRIV int jds6600_get_amplitude(const struct sr_dev_inst *sdi, size_t ch_idx);
66 SR_PRIV int jds6600_get_offset(const struct sr_dev_inst *sdi, size_t ch_idx);
67 SR_PRIV int jds6600_get_dutycycle(const struct sr_dev_inst *sdi, size_t ch_idx);
68 SR_PRIV int jds6600_get_phase_chans(const struct sr_dev_inst *sdi);
70 SR_PRIV int jds6600_set_chans_enable(const struct sr_dev_inst *sdi);
71 SR_PRIV int jds6600_set_waveform(const struct sr_dev_inst *sdi, size_t ch_idx);
72 SR_PRIV int jds6600_set_frequency(const struct sr_dev_inst *sdi, size_t ch_idx);
73 SR_PRIV int jds6600_set_amplitude(const struct sr_dev_inst *sdi, size_t ch_idx);
74 SR_PRIV int jds6600_set_offset(const struct sr_dev_inst *sdi, size_t ch_idx);
75 SR_PRIV int jds6600_set_dutycycle(const struct sr_dev_inst *sdi, size_t ch_idx);
76 SR_PRIV int jds6600_set_phase_chans(const struct sr_dev_inst *sdi);