X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=libsigrok-internal.h;h=0b92a488bfa43b43bd0cfc94b11e5582572b50b6;hb=3b20367381bcd955e604c40d05f489f2221c036a;hp=d96803cb32725d7ed06017a1cd27b1922dff17af;hpb=ac913e5c3522fcf5a5633eaa8e19f6579dda554c;p=libsigrok.git diff --git a/libsigrok-internal.h b/libsigrok-internal.h index d96803cb..0b92a488 100644 --- a/libsigrok-internal.h +++ b/libsigrok-internal.h @@ -125,6 +125,12 @@ SR_PRIV int sr_session_send(const struct sr_dev_inst *sdi, /*--- hardware/common/serial.c ----------------------------------------------*/ +enum { + SERIAL_RDWR = 1, + SERIAL_RDONLY = 2, + SERIAL_NONBLOCK = 4, +}; + typedef gboolean (*packet_valid_t)(const uint8_t *buf); SR_PRIV int serial_open(struct sr_serial_dev_inst *serial, int flags); @@ -135,7 +141,7 @@ SR_PRIV int serial_write(struct sr_serial_dev_inst *serial, SR_PRIV int serial_read(struct sr_serial_dev_inst *serial, void *buf, size_t count); SR_PRIV int serial_set_params(struct sr_serial_dev_inst *serial, int baudrate, - int bits, int parity, int stopbits, int flowcontrol); + int bits, int parity, int stopbits, int flowcontrol, int rts, int dtr); SR_PRIV int serial_set_paramstr(struct sr_serial_dev_inst *serial, const char *paramstr); SR_PRIV int serial_readline(struct sr_serial_dev_inst *serial, char **buf, @@ -181,8 +187,7 @@ struct fs9721_info { 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, - struct fs9721_info *info); + struct sr_datafeed_analog *analog, void *info); /*--- hardware/common/dmm/metex14.c -----------------------------------------*/ @@ -192,12 +197,12 @@ struct metex14_info { gboolean is_ac, is_dc, is_resistance, is_capacity, is_temperature; gboolean is_diode, is_frequency, is_ampere, is_volt, is_farad; gboolean is_hertz, is_ohm, is_celsius, is_nano, is_micro, is_milli; - gboolean is_kilo, is_mega; + gboolean is_kilo, is_mega, is_gain, is_decibel, is_hfe, is_unitless; }; +SR_PRIV int sr_metex14_packet_request(struct sr_serial_dev_inst *serial); SR_PRIV gboolean sr_metex14_packet_valid(const uint8_t *buf); SR_PRIV int sr_metex14_parse(const uint8_t *buf, float *floatval, - struct sr_datafeed_analog *analog, - struct metex14_info *info); + struct sr_datafeed_analog *analog, void *info); #endif