X-Git-Url: https://sigrok.org/gitweb/?p=libsigrok.git;a=blobdiff_plain;f=src%2Fhardware%2Fasix-sigma%2Fprotocol.h;h=edd15dffdb1f03e65dd8ae3998160a0a85d7cfcc;hp=d2a190c99ee2bc14dea6c736166b0d9da130bebc;hb=7fe1f91f7550d63ea4a09c0f0e1ce5b88c59c6fb;hpb=88a5f9eabe72113d70c29d45dc12eabc0add9c49 diff --git a/src/hardware/asix-sigma/protocol.h b/src/hardware/asix-sigma/protocol.h index d2a190c9..edd15dff 100644 --- a/src/hardware/asix-sigma/protocol.h +++ b/src/hardware/asix-sigma/protocol.h @@ -325,7 +325,10 @@ struct dev_context { uint16_t prefix; enum asix_device_type type; } id; - struct ftdi_context ftdic; + struct { + struct ftdi_context ctx; + gboolean is_open, must_close; + } ftdi; uint64_t samplerate; struct sr_sw_limits cfg_limits; /* Configured limits (user specified). */ struct sr_sw_limits acq_limits; /* Acquisition limits (internal use). */ @@ -343,6 +346,12 @@ struct dev_context { extern SR_PRIV const uint64_t samplerates[]; extern SR_PRIV const size_t samplerates_count; +/* "Automatic" and forced USB connection open/close support. */ +SR_PRIV int sigma_check_open(const struct sr_dev_inst *sdi); +SR_PRIV int sigma_check_close(struct dev_context *devc); +SR_PRIV int sigma_force_open(const struct sr_dev_inst *sdi); +SR_PRIV int sigma_force_close(struct dev_context *devc); + SR_PRIV int sigma_write_register(struct dev_context *devc, uint8_t reg, uint8_t *data, size_t len); SR_PRIV int sigma_set_register(struct dev_context *devc,