#ifndef IO_POLL_H
   #define IO_POLL_H

//#include "./digital_interface/digital_in.h"
//#include "./analog_interface/analog_in.h"
#include "./io_element_control.h"

#include <cmath>
#include <stdio.h>
#include <memory>
#include <string>
#include <assert.h>
#include <pthread.h>
#include <linux/rtc.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>

extern int globalStatus;
extern int send_status;
extern int ioElement_busy;
extern int topDigitalChannel[73];

/* for 1st analog IO */
   struct curr_adc {
	unsigned char loByte;
	unsigned char hiByte;
	float volt;
	int intVolt;
	float volt_old[5]; 
   };




extern struct curr_adc current_adc[];
extern struct curr_adc current_adc2[];

void tsetup_serial(int);
void tlineout(int, char*);
char* tconcat(char str[]);

void	initialize();
void*	pollIO(void* args);
void* 	pollDig(void* args);
#endif
