Private
Public Access
2
0

iio: initial pass at getting channel information from scan_elements

This commit creates a new structure inside each _iio device when used and can
then be used to understand the data being read after a trigger is run/executed

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
This commit is contained in:
Brendan Le Foll
2015-10-02 16:48:47 +01:00
parent b192e7a223
commit 2c97fd5953
5 changed files with 251 additions and 15 deletions

View File

@@ -29,6 +29,7 @@
#include "mraa.h"
#include "mraa_func.h"
#include "mraa_adv_func.h"
#include "iio.h"
// Bionic does not implement pthread cancellation API
#ifndef __BIONIC__
@@ -135,8 +136,13 @@ struct _uart {
struct _iio {
int num; /**< IIO device number */
char* name; /**< IIO device name */
int channum;
int attrnum;
int fp; /**< IIO device in /dev */
void (* isr)(char* data); /**< the interupt service request */
void *isr_args; /**< args return when interupt service request triggered */
int chan_num;
pthread_t thread_id; /**< the isr handler thread id */
mraa_iio_channel* channels;
int datasize;
};
/**