X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fzketech-ebd-usb%2Fprotocol.h;h=d0c8389ce170d752917f8958227853ff04dfeb50;hb=HEAD;hp=0d8ebecf6d0236020ccd4406cd192c7524a801a8;hpb=ab3e9c8af67b5919dd7cfb3119081bfd5858cc81;p=libsigrok.git diff --git a/src/hardware/zketech-ebd-usb/protocol.h b/src/hardware/zketech-ebd-usb/protocol.h index 0d8ebecf..d0c8389c 100644 --- a/src/hardware/zketech-ebd-usb/protocol.h +++ b/src/hardware/zketech-ebd-usb/protocol.h @@ -36,26 +36,31 @@ struct dev_context { struct sr_sw_limits limits; GMutex rw_mutex; float current_limit; - float voltage_limit; + float uvc_threshold; gboolean running; gboolean load_activated; }; /* Communication via serial. */ -SR_PRIV int ebd_read_message(struct sr_serial_dev_inst *serial, int length, uint8_t *buf); +SR_PRIV int ebd_read_message(struct sr_serial_dev_inst *serial, size_t length, + uint8_t *buf); /* Commands. */ -SR_PRIV int ebd_init(struct sr_serial_dev_inst *serial, struct dev_context *devc); -SR_PRIV int ebd_loadstart(struct sr_serial_dev_inst *serial, struct dev_context *devc); +SR_PRIV int ebd_init(struct sr_serial_dev_inst *serial, + struct dev_context *devc); +SR_PRIV int ebd_loadstart(struct sr_serial_dev_inst *serial, + struct dev_context *devc); SR_PRIV int ebd_receive_data(int fd, int revents, void *cb_data); -SR_PRIV int ebd_stop(struct sr_serial_dev_inst *serial, struct dev_context *devc); -SR_PRIV int ebd_loadtoggle(struct sr_serial_dev_inst *serial, struct dev_context *devc); +SR_PRIV int ebd_stop(struct sr_serial_dev_inst *serial, + struct dev_context *devc); +SR_PRIV int ebd_loadtoggle(struct sr_serial_dev_inst *serial, + struct dev_context *devc); /* Configuration. */ SR_PRIV int ebd_get_current_limit(const struct sr_dev_inst *sdi, float *current); SR_PRIV int ebd_set_current_limit(const struct sr_dev_inst *sdi, float current); -SR_PRIV int ebd_get_voltage_limit(const struct sr_dev_inst *sdi, float *voltage); -SR_PRIV int ebd_set_voltage_limit(const struct sr_dev_inst *sdi, float voltage); +SR_PRIV int ebd_get_uvc_threshold(const struct sr_dev_inst *sdi, float *voltage); +SR_PRIV int ebd_set_uvc_threshold(const struct sr_dev_inst *sdi, float voltage); SR_PRIV gboolean ebd_current_is0(struct dev_context *devc); #endif