X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=libsigrok-internal.h;h=93434ab3eb1acdf9d29ce924034c323d18dc5014;hb=1b142b78274d74563a084299a01ef1a92206356f;hp=6f70c78f226c57cca2e7564e2a1be35e10428862;hpb=522a34343f78eb55ff7213e34ff3e002867dbad3;p=libsigrok.git diff --git a/libsigrok-internal.h b/libsigrok-internal.h index 6f70c78f..93434ab3 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2013 Bert Vermeulen * @@ -119,16 +119,17 @@ SR_PRIV int sr_source_add(int fd, int events, int timeout, SR_PRIV int sr_session_send(const struct sr_dev_inst *sdi, const struct sr_datafeed_packet *packet); SR_PRIV int sr_session_stop_sync(void); +SR_PRIV int sr_sessionfile_check(const char *filename); /*--- std.c -----------------------------------------------------------------*/ typedef int (*dev_close_t)(struct sr_dev_inst *sdi); typedef void (*std_dev_clear_t)(void *priv); -SR_PRIV int std_hw_init(struct sr_context *sr_ctx, struct sr_dev_driver *di, +SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di, const char *prefix); -SR_PRIV int std_hw_dev_acquisition_stop_serial(struct sr_dev_inst *sdi, - void *cb_data, dev_close_t hw_dev_close_fn, +SR_PRIV int std_dev_acquisition_stop_serial(struct sr_dev_inst *sdi, + void *cb_data, dev_close_t dev_close_fn, struct sr_serial_dev_inst *serial, const char *prefix); SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi, const char *prefix); @@ -199,8 +200,21 @@ SR_PRIV int sr_es51922_parse(const uint8_t *buf, float *floatval, /*--- hardware/common/dmm/fs9922.c ------------------------------------------*/ -SR_PRIV int sr_dmm_parse_fs9922(const uint8_t *buf, float *floatval, - struct sr_datafeed_analog *analog); +#define FS9922_PACKET_SIZE 14 + +struct fs9922_info { + gboolean is_auto, is_dc, is_ac, is_rel, is_hold, is_bpn, is_z1, is_z2; + gboolean is_max, is_min, is_apo, is_bat, is_nano, is_z3, is_micro; + gboolean is_milli, is_kilo, is_mega, is_beep, is_diode, is_percent; + gboolean is_z4, is_volt, is_ampere, is_ohm, is_hfe, is_hertz, is_farad; + gboolean is_celsius, is_fahrenheit; + int bargraph_sign, bargraph_value; +}; + +SR_PRIV gboolean sr_fs9922_packet_valid(const uint8_t *buf); +SR_PRIV int sr_fs9922_parse(const uint8_t *buf, float *floatval, + struct sr_datafeed_analog *analog, void *info); +SR_PRIV void sr_fs9922_z1_diode(struct sr_datafeed_analog *analog, void *info); /*--- hardware/common/dmm/fs9721.c ------------------------------------------*/ @@ -213,10 +227,13 @@ struct fs9721_info { gboolean is_c2c1_11, is_c2c1_10, is_c2c1_01, is_c2c1_00, is_sign; }; -SR_PRIV gboolean sr_fs9721_is_packet_start(uint8_t b); SR_PRIV gboolean sr_fs9721_packet_valid(const uint8_t *buf); SR_PRIV int sr_fs9721_parse(const uint8_t *buf, float *floatval, struct sr_datafeed_analog *analog, void *info); +SR_PRIV void sr_fs9721_00_temp_c(struct sr_datafeed_analog *analog, void *info); +SR_PRIV void sr_fs9721_01_temp_c(struct sr_datafeed_analog *analog, void *info); +SR_PRIV void sr_fs9721_10_temp_c(struct sr_datafeed_analog *analog, void *info); +SR_PRIV void sr_fs9721_01_10_temp_f_c(struct sr_datafeed_analog *analog, void *info); /*--- hardware/common/dmm/metex14.c -----------------------------------------*/