Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

adxl_util.h

Go to the documentation of this file.
00001 
00033 #if !defined(_ADXL_UTIL_H_)
00034 #define _ADXL_UTIL_H_
00035 
00036 #include <sys/types.h>
00037 #include <stdlib.h>
00038 #include <stdio.h>
00039 #include <math.h>
00040 #include <unistd.h>
00041 #include <stdint.h>
00042 #include <string.h>
00043 #include <signal.h>
00044 #include <time.h>
00045 
00046 #include <sys/termios.h>
00047 #include <fcntl.h>
00048 
00049 extern bool control_break;
00050 
00051 
00053 #define NUM_ADXL_CHANNELS 2
00054 
00056 #define ADXL_READ_LEN 4
00057 
00059 #define ADXL_DATUM_LEN 24
00060 
00062 #define ADXL_MAX_RATE_HZ 250
00063 
00065 typedef struct
00066 {
00067     int16_t       raw[NUM_ADXL_CHANNELS];
00068     double        G[NUM_ADXL_CHANNELS];
00069 } adxl_reading_t;
00070 
00071 // Function prototypes
00072 int adxl_open(const char *comport_file);
00073 int adxl_read(const int comm_fd, adxl_reading_t *result);
00074 int adxl_close(const int comm_fd);
00075 void adxl_sighandler(int signal);
00076 
00077 #endif

Generated on Fri May 2 15:13:15 2003 for ADXL202-NEESgrid driver by doxygen1.3