]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/chronovu-la/protocol.h
output/csv: use intermediate time_t var, silence compiler warning
[libsigrok.git] / src / hardware / chronovu-la / protocol.h
index be7e64a660be2b9636e6822b8da2271508742041..5a051da3882238e49f1ab673ff8f0ceb2e4b3244 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef LIBSIGROK_HARDWARE_CHRONOVU_LA_PROTOCOL_H
 #define LIBSIGROK_HARDWARE_CHRONOVU_LA_PROTOCOL_H
 
 #include <glib.h>
+#include <libusb.h>
 #include <ftdi.h>
 #include <stdint.h>
 #include <string.h>
 #include <libsigrok/libsigrok.h>
 #include "libsigrok-internal.h"
 
-#define LOG_PREFIX "la8/la16"
+#define LOG_PREFIX "chronovu-la"
 
 #define SDRAM_SIZE                     (8 * 1024 * 1024)
 #define MAX_NUM_SAMPLES                        SDRAM_SIZE
@@ -44,32 +44,20 @@ enum {
 struct cv_profile {
        int model;
        const char *modelname;
-       const char *iproduct; /* USB iProduct string */
+       const char *iproduct;
        unsigned int num_channels;
        uint64_t max_samplerate;
        const int num_trigger_matches;
        float trigger_constant;
 };
 
-/* Private, per-device-instance driver context. */
 struct dev_context {
-       /** Device profile struct for this device. */
        const struct cv_profile *prof;
-
-       /** FTDI device context (used by libftdi). */
        struct ftdi_context *ftdic;
-
-       /** The currently configured samplerate of the device. */
        uint64_t cur_samplerate;
-
-       /** The current sampling limit (in ms). */
        uint64_t limit_msec;
-
-       /** The current sampling limit (in number of samples). */
        uint64_t limit_samples;
 
-       void *cb_data;
-
        /**
         * A buffer containing some (mangled) samples from the device.
         * Format: Pretty mangled-up (due to hardware reasons), see code.
@@ -126,7 +114,6 @@ struct dev_context {
        uint64_t samplerates[255];
 };
 
-/* protocol.c */
 extern SR_PRIV const char *cv_channel_names[];
 extern const struct cv_profile cv_profiles[];
 SR_PRIV void cv_fill_samplerates_if_needed(const struct sr_dev_inst *sdi);
@@ -136,6 +123,6 @@ SR_PRIV int cv_write(struct dev_context *devc, uint8_t *buf, int size);
 SR_PRIV int cv_convert_trigger(const struct sr_dev_inst *sdi);
 SR_PRIV int cv_set_samplerate(const struct sr_dev_inst *sdi, uint64_t samplerate);
 SR_PRIV int cv_read_block(struct dev_context *devc);
-SR_PRIV void cv_send_block_to_session_bus(struct dev_context *devc, int block);
+SR_PRIV void cv_send_block_to_session_bus(const struct sr_dev_inst *sdi, int block);
 
 #endif