/* Filename : $RCSfile: uio48.h,v $ * * The declarations here have to be in a header file, * because they need to be known both to the kernel * module (in chardev.c) and the process calling ioctl * (ioctl.c) */ /* * $Log: uio48.h,v $ * Revision 1.1 2005/04/22 20:12:06 steve * Initial revision * * */ #ifndef CHARDEV_H #define CHARDEV_H #include /* The major device number. We can't rely on dynamic * registration any more, because ioctls need to know * it. */ #define MAX_CHIPS 6 /* Set the message of the device driver */ #define IOCTL_SET_MSG _IOR(MAJOR_NUM, 0, char *) /* _IOR means that we're creating an ioctl command * number for passing information from a user process * to the kernel module. * * The first arguments, MAJOR_NUM, is the major device * number we're using. * * The second argument is the number of the command * (there could be several with different meanings). * * The third argument is the type we want to get from * the process to the kernel. */ /* Read the Port fromn the UIO48 */ #define IOCTL_READ_PORT _IOWR(MAJOR_NUM, 1, int) /* Write to the UIO48 Port */ #define IOCTL_WRITE_PORT _IOWR(MAJOR_NUM, 2, int) /* Bit read function */ #define IOCTL_READ_BIT _IOWR(MAJOR_NUM,3, int) /* Write bit function */ #define IOCTL_WRITE_BIT _IOWR(MAJOR_NUM, 4, int) /* Set Bit function */ #define IOCTL_SET_BIT _IOWR(MAJOR_NUM, 5, int) /* Clear bit function */ #define IOCTL_CLR_BIT _IOWR(MAJOR_NUM, 8, int) /* Enab_int function */ #define IOCTL_ENAB_INT _IOWR(MAJOR_NUM, 9, char *) /* DISAB_INT function */ #define IOCTL_DISAB_INT _IOWR(MAJOR_NUM,10,int) /* CLR_INT function */ #define IOCTL_CLR_INT _IOWR(MAJOR_NUM,11,int) /* GET_INT function */ #define IOCTL_GET_INT _IOWR(MAJOR_NUM,12,int) /* WAIT_INT function */ #define IOCTL_WAIT_INT _IOWR(MAJOR_NUM,13,int) /* The name of the device file */ #define DEVICE_FILE_NAME "uio48" #endif