/* * File Name : hrt.h * * This is a device driver for the High Resolution Technologies * Pixelsmart 512-8 frame grabber. * This file contains structures, constants, and ioctl numbers in * the driver that a user program might wish to use. * Copyright (C) 2003, Florida State University * * This is free software; you can redistribute it and/or modify it under * terms of the GNU General Public License as published by the Free Soft- * ware Foundation, Version 2. This software is distributed in the hope * that it will be useful, but WITH OUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License for more details. You should have * received a copy of the GNU General Public License distributed with this * software; see file COPYING. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /** * struct subwindow - describes a region-of-interest, i.e., * a part of the frame */ struct subwindow { int width, height; int startx, starty; }; /** * struct i2c_regval - this is for the I2C register ioctl */ struct i2c_regval { int reg; /* Register number */ unsigned char val; /* Value to set it to */ }; /** * Card specific constants */ #define HRT_VENDOR_ID 0x0004 #define HRT_DEVICE_ID_GRAY 0x0404 #define HRT_DEVICE_ID_COLOR 0x0408 #define HRT_CONTROL_REG 0x2000 #define HRT_Y_LOW_REG 0x2002 #define HRT_Y_HIGH_REG 0x2003 /* The unique I2C bus address of the SAA7110 (A/D) device */ #define HRT_AD_DEVICE_ID (128+16+8+4) /* NTSC 8-bit greyscale */ #define HRT_WIDTH 512 #define HRT_HEIGHT 480 #define HRT_BYTES_PER_PIXEL 2 #define HRT_BYTES_PER_LINE (HRT_WIDTH * HRT_BYTES_PER_PIXEL) #define HRT_FRAMESIZE (HRT_WIDTH * HRT_HEIGHT * HRT_BYTES_PER_PIXEL) /* Number of bytes of the device's memory that we ioremap() */ #define BYTES_NEEDED 0x4000 /* * The commands for freeze, live, etc. */ #define HRT_FIELD_MASK 0x01 #define HRT_LIVE_CMD 0x91 #define HRT_FREEZE_IMM_CMD 0x5B #define HRT_FREEZE_NEXT_CMD 0x99 /* A/D registers */ #define HRT_BRIGHTNESS_REG 0x19 #define HRT_CONTRAST_REG 0x13 #define HRT_VID_TYPE (VID_TYPE_CAPTURE | VID_TYPE_MONOCHROME) /* Maximum number of buffers for streaming */ #define MAX_CAPTURE_BUFFERS 16 /* Private ioctl's */ #define IOC_HRT_SET_I2CREG _IOW('v', BASE_VIDIOCPRIVATE + 30, struct i2c_regval) #define IOC_HRT_GET_I2CREG _IOR('v', BASE_VIDIOCPRIVATE + 31, struct i2c_regval) #define IOC_HRT_SET_WIDTH _IOW('v', BASE_VIDIOCPRIVATE + 32, int) #define IOC_HRT_SET_HEIGHT _IOW('v', BASE_VIDIOCPRIVATE + 33, int) #define IOC_HRT_SET_STARTX _IOW('v', BASE_VIDIOCPRIVATE + 34, int) #define IOC_HRT_SET_STARTY _IOW('v', BASE_VIDIOCPRIVATE + 35, int) #define IOC_HRT_SET_ROI _IOW('v', BASE_VIDIOCPRIVATE + 36, struct subwindow) #define IOC_HRT_GET_ROI _IOR('v', BASE_VIDIOCPRIVATE + 37, struct subwindow) #define IOC_HRT_SET_I2CREGS _IOW('v', BASE_VIDIOCPRIVATE + 38, char *)