X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=include%2Flibsigrok%2Fproto.h;h=c799919e267a710dfed69de94db5a303dec8edd9;hb=962172e4950f3fbc42d5a79cdf63dc179d7513be;hp=bd7250571cb9c75143c59fa215b3d9fa7b5136b8;hpb=ee1b6054d6d6a00698ddae421eae63019c452b6d;p=libsigrok.git diff --git a/include/libsigrok/proto.h b/include/libsigrok/proto.h index bd725057..c799919e 100644 --- a/include/libsigrok/proto.h +++ b/include/libsigrok/proto.h @@ -30,12 +30,15 @@ SR_API int sr_analog_to_float(const struct sr_datafeed_analog *analog, float *buf); +SR_API const char *sr_analog_si_prefix(float *value, int *digits); SR_API int sr_analog_unit_to_string(const struct sr_datafeed_analog *analog, char **result); SR_API void sr_rational_set(struct sr_rational *r, int64_t p, uint64_t q); SR_API int sr_rational_eq(const struct sr_rational *a, const struct sr_rational *b); SR_API int sr_rational_mult(struct sr_rational *res, const struct sr_rational *a, const struct sr_rational *b); +SR_API int sr_rational_div(struct sr_rational *res, const struct sr_rational *num, + const struct sr_rational *div); /*--- backend.c -------------------------------------------------------------*/