libsigrok  0.4.0
sigrok hardware access and backend library
Functions
analog.c File Reference

Handling and converting analog data. More...

#include <config.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include <libsigrok/libsigrok.h>
#include "libsigrok-internal.h"
+ Include dependency graph for analog.c:

Go to the source code of this file.

Functions

SR_PRIV int sr_analog_init (struct sr_datafeed_analog *analog, struct sr_analog_encoding *encoding, struct sr_analog_meaning *meaning, struct sr_analog_spec *spec, int digits)
 
int sr_analog_to_float (const struct sr_datafeed_analog *analog, float *outbuf)
 Convert an analog datafeed payload to an array of floats. 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...
 

Detailed Description

Handling and converting analog data.

Definition in file analog.c.