Skip to content

Commit

Permalink
Switch multiosc to using libiio
Browse files Browse the repository at this point in the history
Most of the multiosc is now using libiio. However, some parts are
still using iio_utils.c (libini.c).

Also, the plugin_data_capture() function has not been converted,
as I couldn't think of a proper way to switch it to libiio without
having conflicts everywhere.

Signed-off-by: Paul Cercueil <[email protected]>
  • Loading branch information
Paul Cercueil committed Apr 14, 2014
1 parent e36da68 commit b5e4994
Show file tree
Hide file tree
Showing 9 changed files with 707 additions and 800 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ PKG_CONFIG := env PKG_CONFIG_SYSROOT_DIR="$(SYSROOT)" \
PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)" pkg-config

LDFLAGS := $(shell $(PKG_CONFIG) --libs gtk+-2.0 gthread-2.0 gtkdatabox fftw3) \
$(shell $(SYSROOT)/usr/bin/xml2-config --libs) -lmatio -lz
$(shell $(SYSROOT)/usr/bin/xml2-config --libs) -lmatio -lz -liio

CFLAGS := $(shell $(PKG_CONFIG) --cflags gtk+-2.0 gthread-2.0 gtkdatabox fftw3) \
$(shell $(SYSROOT)/usr/bin/xml2-config --cflags) \
Expand Down
40 changes: 16 additions & 24 deletions datatypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <stdbool.h>
#include <fftw3.h>

#include "iio_utils.h"
#include <iio.h>

#define FORCE_UPDATE TRUE
#define NORMAL_UPDATE FALSE
Expand All @@ -39,9 +39,19 @@ typedef struct _transform Transform;
typedef struct _tr_list TrList;

struct extra_info {
struct _device_list *device_parent;
struct iio_device *dev;
gfloat *data_ref;
off_t offset;
int shadow_of_enabled;
bool may_be_enabled;
};

struct extra_dev_info {
struct iio_buffer *buffer;
unsigned int sample_count;
double adc_freq, lo_freq;
char adc_scale;
GSList *plots_sample_counts;
};

struct buffer {
Expand Down Expand Up @@ -69,30 +79,12 @@ struct _fft_alg_data{
int num_active_channels;
};

struct _device_list {
char *device_name;
struct iio_channel_info *channel_list;
unsigned int num_channels;
unsigned int sample_count;
GSList *plots_sample_counts;
double adc_freq;
double lo_freq;
char adc_scale[10];
void *settings_dialog_builder;
struct buffer data_buffer;
unsigned int num_active_channels;
unsigned int bytes_per_sample;
unsigned int current_sample;
gfloat **channel_data;
int buffer_fd;
};

struct _transform {
int type_id;
struct iio_channel_info *channel_parent;
struct iio_channel_info *channel_parent2;
struct iio_channel_info *channel_parent3;
struct iio_channel_info *channel_parent4;
struct iio_channel *channel_parent,
*channel_parent2,
*channel_parent3,
*channel_parent4;
gfloat **in_data;
gfloat *x_axis;
gfloat *y_axis;
Expand Down
Loading

0 comments on commit b5e4994

Please sign in to comment.