X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Flibsigrok-internal.h;h=5004fc7b630afe47afa9e5671528d88e750935fd;hb=32af282c5e1d64e878438aafe7c69efd2b4a4bd6;hp=4b3daf441151c9d5ed1cfef08c83a4855febc77d;hpb=5a1afc0907abfee5848484f944789213d6be9752;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index 4b3daf44..5004fc7b 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -632,6 +632,8 @@ enum { SR_PRIV struct sr_channel *sr_channel_new(struct sr_dev_inst *sdi, int index, int type, gboolean enabled, const char *name); +SR_PRIV struct sr_channel *sr_next_enabled_channel(const struct sr_dev_inst *sdi, + struct sr_channel *cur_channel); /** Device instance data */ struct sr_dev_inst { @@ -866,6 +868,7 @@ SR_PRIV int ezusb_upload_firmware(libusb_device *dev, int configuration, #ifdef HAVE_LIBUSB_1_0 SR_PRIV GSList *sr_usb_find(libusb_context *usb_ctx, const char *conn); SR_PRIV int sr_usb_open(libusb_context *usb_ctx, struct sr_usb_dev_inst *usb); +SR_PRIV void sr_usb_close(struct sr_usb_dev_inst *usb); SR_PRIV int usb_source_add(struct sr_session *session, struct sr_context *ctx, int timeout, sr_receive_data_callback cb, void *cb_data); SR_PRIV int usb_source_remove(struct sr_session *session, struct sr_context *ctx); @@ -1126,4 +1129,17 @@ SR_PRIV gboolean sr_ut372_packet_valid(const uint8_t *buf); SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval, struct sr_datafeed_analog *analog, void *info); +/*--- hardware/scale/kern.c -------------------------------------------------*/ + +struct kern_info { + gboolean is_gram, is_carat, is_ounce, is_pound, is_troy_ounce; + gboolean is_pennyweight, is_grain, is_tael, is_momme, is_tola; + gboolean is_percentage, is_piece, is_unstable, is_stable, is_error; + int buflen; +}; + +SR_PRIV gboolean sr_kern_packet_valid(const uint8_t *buf); +SR_PRIV int sr_kern_parse(const uint8_t *buf, float *floatval, + struct sr_datafeed_analog *analog, void *info); + #endif