Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
generic_buffer.c File Reference
#include <unistd.h>
#include <dirent.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/dir.h>
#include <linux/types.h>
#include <string.h>
#include <poll.h>
#include <endian.h>
#include <getopt.h>
#include <inttypes.h>
#include "iio_utils.h"

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Functions

int size_from_channelarray (struct iio_channel_info *channels, int num_channels)
 
void print2byte (int input, struct iio_channel_info *info)
 
void process_scan (char *data, struct iio_channel_info *channels, int num_channels)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define _GNU_SOURCE

Definition at line 21 of file generic_buffer.c.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 141 of file generic_buffer.c.

void print2byte ( int  input,
struct iio_channel_info info 
)

Definition at line 62 of file generic_buffer.c.

void process_scan ( char data,
struct iio_channel_info channels,
int  num_channels 
)

process_scan() - print out the values in SI units : pointer to the start of the scan : information about the channels. Note size_from_channelarray must have been called first to fill the location offsets. : number of channels

Definition at line 95 of file generic_buffer.c.

int size_from_channelarray ( struct iio_channel_info channels,
int  num_channels 
)

size_from_channelarray() - calculate the storage size of a scan : the channel info array : number of channels

Has the side effect of filling the channels[i].location values used in processing the buffer output.

Definition at line 46 of file generic_buffer.c.