libsigrok
unreleased development snapshot
sigrok hardware access and backend library
|
Handling and converting analog data. More...
#include <config.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
Go to the source code of this file.
Functions | |
int | sr_analog_to_float (const struct sr_datafeed_analog *analog, float *outbuf) |
Convert an analog datafeed payload to an array of floats. More... | |
const char * | sr_analog_si_prefix (float *value, int *digits) |
Scale a float value to the appropriate SI prefix. More... | |
gboolean | sr_analog_si_prefix_friendly (enum sr_unit unit) |
Check if a unit "accepts" an SI prefix. More... | |
int | sr_analog_unit_to_string (const struct sr_datafeed_analog *analog, char **result) |
Convert the unit/MQ/MQ flags in the analog struct to a string. More... | |
void | sr_rational_set (struct sr_rational *r, int64_t p, uint64_t q) |
Set sr_rational r to the given value. More... | |
int | sr_rational_eq (const struct sr_rational *a, const struct sr_rational *b) |
Compare two sr_rational for equality. More... | |
int | sr_rational_mult (struct sr_rational *res, const struct sr_rational *a, const struct sr_rational *b) |
Multiply two sr_rational. More... | |
int | sr_rational_div (struct sr_rational *res, const struct sr_rational *num, const struct sr_rational *div) |
Divide rational a by rational b. More... | |
Handling and converting analog data.
Definition in file analog.c.