/***************************************************************** ** parint.h - header file for parint device driver ****************************************************************** */ #ifndef _PARINT_H #define _PARINT_H // ioctl() cmd defines #define PARINT_IOCTL_GET_TIME 1 // get time data #define PARINT_IOCTL_FLUSH 2 // waits for data. #define PARINT_IOCTL_PULSE 3 // toggle output bit (test/debug function). #define PARINT_IOCTL_T1 4 // debug/test function /*------------------------------------------------------------ ** parint_parms_t - a general structure used to pass arguments ** & return values to the ioctl() call. **------------------------------------------------------------ */ struct parint_parms_t { int ret; /* return code */ unsigned long l[4]; /* array of longs */ void * p[4]; /* pointers */ }; //----------------------------------------------------- // nice prototypes //---------------------------------------------------- int parint_get_time( int fd, unsigned int * i_cnt, int * num_ret, struct timeval * tv, int max_tv ); int parint_flush( int fd ); int parint_pulse( int fd, struct timeval * tv); int parint_t1( int fd ); #endif // _PARINT_H