Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

di_simplest.c File Reference

Simplest possible DI-194(RS) test program. More...

#include <sys/types.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <stdint.h>
#include "di194.h"

Go to the source code of this file.

Functions

void sighandler (int signal)
 Control-break handler. Sets global flag to indicate exit request.

int main (int argc, char *argv[])
 Driver / test routine to exercise the DI code.


Variables

bool do_exit
 Global boolean set by signal handler to force exit.


Detailed Description

Simplest possible DI-194(RS) test program.

Author:
Paul Hubbard
Date:
4/2/03

Definition in file di_simplest.c.


Function Documentation

int main int  argc,
char *  argv[]
 

Driver / test routine to exercise the DI code.

Note:
Uses contents of "DI194_PORT" if set
Main. Open the port, init the card, do a daq.

Too: -p port parsing, will need for USB serial. getopt!

Parameters:
argc Argc as passed by shell
argv Argv as passed by shell
Returns:
0 All is good

Non-zero All is not good

Definition at line 67 of file di_simplest.c.

References daq_reading_t::analog, di_close(), di_daq_sync(), di_open(), di_read(), di_start(), daq_reading_t::digital, do_exit, and sighandler().

void sighandler int  signal  ) 
 

Control-break handler. Sets global flag to indicate exit request.

Assumes Installed in interrupt chain by someone else

Parameters:
signal Signal number
Date:
3/25/02

Definition at line 34 of file di_simplest.c.

References do_exit.

Referenced by main().


Variable Documentation

bool do_exit
 

Global boolean set by signal handler to force exit.

Definition at line 21 of file di_simplest.c.


Generated on Thu May 1 11:31:46 2003 for DI-194 driver by doxygen1.3