Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  1 /*
  2  * File Name : hrt.h
  3  * 
  4  * This is a device driver for the High Resolution Technologies
  5  * Pixelsmart 512-8 frame grabber.
  6 
  7  * This file contains structures, constants, and ioctl numbers in
  8  * the driver that a user program might wish to use.
  9 
 10  *         Copyright (C) 2003, Florida State University
 11  *
 12  * This is free software; you can redistribute it and/or modify it under 
 13  * terms of the GNU General Public License as published  by the Free Soft- 
 14  * ware Foundation, Version 2.  This software is distributed in the hope
 15  * that it will be useful, but WITH OUT ANY WARRANTY;  without even the
 16  * implied warranty of MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
 17  * See the GNU General Public License for  more details. You should have
 18  * received  a copy of the GNU General Public License distributed with this
 19  * software; see file COPYING.  If not, write to  the Free Software Foundation,
 20  * 59 Temple Place - Suite 330,  Boston, MA 02111-1307, USA.
 21  */
 22 
 23 /**
 24  * struct i2c_regval - this is for the I2C register ioctl 
 25  */
 26 struct i2c_regval {
 27         int reg; /* Register number */
 28         unsigned char val; /* Value to set it to */
 29 };
 30 
 31 /**
 32  * Card specific constants
 33  */
 34 #define HRT_VENDOR_ID         0x0004
 35 #define HRT_DEVICE_ID_GRAY    0x0404
 36 #define HRT_DEVICE_ID_COLOR   0x0408
 37 
 38 #define HRT_CONTROL_REG       0x2000
 39 #define HRT_Y_LOW_REG         0x2002
 40 #define HRT_Y_HIGH_REG        0x2003
 41 
 42 /* The unique I2C bus address of the SAA7110 (A/D) device */
 43 #define HRT_AD_DEVICE_ID (128+16+8+4)
 44 
 45 /* NTSC 8-bit greyscale */
 46 #define HRT_WIDTH             512
 47 #define HRT_HEIGHT            480
 48 #define HRT_BYTES_PER_PIXEL   1
 49 #define HRT_BYTES_PER_LINE    (HRT_WIDTH * HRT_BYTES_PER_PIXEL)
 50 #define HRT_FRAMESIZE         (HRT_WIDTH * HRT_HEIGHT * HRT_BYTES_PER_PIXEL)
 51 
 52 /* Number of bytes of the device's memory that we ioremap() */
 53 #define BYTES_NEEDED          0x4000
 54 
 55 /*
 56  * The commands for freeze, live, etc.
 57  */
 58 #define HRT_FIELD_MASK        0x01
 59 #define HRT_LIVE_CMD          0x91
 60 #define HRT_FREEZE_IMM_CMD    0x5B
 61 #define HRT_FREEZE_NEXT_CMD   0x99
 62 
 63 /* A/D registers */
 64 #define HRT_BRIGHTNESS_REG    0x19
 65 #define HRT_CONTRAST_REG      0x13
 66 
 67 #define HRT_VID_TYPE         (VID_TYPE_CAPTURE | VID_TYPE_MONOCHROME)
 68 
 69 /* Maximum number of buffers for streaming */
 70 #define MAX_CAPTURE_BUFFERS  16
 71 
 72 /* Pass this as the offset to mmap() to get direct access
 73    to the board's memory */
 74 #define HRT_MAGIC_MMAP_OFFSET (PAGE_SIZE*100)
 75 
 76 /* Private ioctl's */
 77 #define IOC_HRT_SET_I2CREG             _IOW('v', BASE_VIDIOCPRIVATE + 30, struct i2c_regval)
 78 #define IOC_HRT_GET_I2CREG             _IOR('v', BASE_VIDIOCPRIVATE + 31, struct i2c_regval)
 79 #define IOC_HRT_SET_I2CREGS            _IOW('v', BASE_VIDIOCPRIVATE + 32, char *)
 80 #define IOC_HRT_GET_MAGIC_MMAP_OFFSET  _IOW('v', BASE_VIDIOCPRIVATE + 33, int)
 81 
  This page was automatically generated by the LXR engine.