/shares/Build/SERVICES/VISIONINSTALL/V7.14.0/Datapath/VISION/linux/modules/include/rgb133control.h

Go to the documentation of this file.
00001 /*
00002  * rgb133control.h
00003  *
00004  * Copyright (c) 2009 Datapath Ltd. All rights reserved.
00005  *
00006  * All information contained herein is proprietary and
00007  * confidential to Datapath Ltd. and is licensed under
00008  * the terms of the Datapath Ltd. Software License.
00009  * Please read the LICENCE file for full license terms
00010  * and conditions.
00011  *
00012  * http://www.datapath.co.uk/
00013  * support@datapath.co.uk
00014  *
00015  */
00016 
00017 #ifndef RGB133CONTROL_H_
00018 #define RGB133CONTROL_H_
00019 
00020 #include "rgb133defs.h"
00021 
00025 #define VW_DEVICE_NOT_FLASHABLE     0
00026 #define VW_DEVICE_IS_FLASHABLE      1
00027 #define VW_DEVICE_UNKNOWN_FLASHABLE 2
00028 
00032 typedef enum _eVWDeint {
00033    VW_DEINT_NONE,
00034    VW_DEINT_BOB,
00035    VW_DEINT_WEAVE,
00036 } eVWDeint;
00037 
00041 typedef enum _eVWSignalType {
00042    VW_TYPE_NOSIGNAL,
00043    VW_TYPE_DVI,
00044    VW_TYPE_DVI_DUAL_LINK,
00045    VW_TYPE_SDI,
00046    VW_TYPE_VIDEO,
00047    VW_TYPE_3WIRE_SOG,
00048    VW_TYPE_4WIRE_COMPOSITE_SYNC,
00049    VW_TYPE_5WIRE_SEPARATE_SYNCS,
00050    VW_TYPE_YPRPB,
00051    VW_TYPE_CVBS,
00052    VW_TYPE_YC,
00053    VW_TYPE_UNKNOWN,
00054 } eVWSignalType;
00055 
00059 typedef enum _eVWVidStd {
00060    VW_VIDSTD_UNKNOWN,
00061    VW_VIDSTD_NTSC_M,
00062    VW_VIDSTD_NTSC_J,
00063    VW_VIDSTD_NTSC_4_43_50,
00064    VW_VIDSTD_NTSC_4_43_60,
00065    VW_VIDSTD_PAL_I,
00066    VW_VIDSTD_PAL_M,
00067    VW_VIDSTD_PAL_NC,
00068    VW_VIDSTD_PAL_4_43_60,
00069    VW_VIDSTD_SECAM_L,
00070    VW_VIDSTD_NUM_STDS,
00071 } eVWVidStd;
00072 
00078 typedef enum _eAppEvent {
00079    RGB133_EV_OPEN_CONTROL = 1,
00080    RGB133_EV_CLOSE_CONTROL,
00081    RGB133_EV_ENABLE_CONTROL,
00082    RGB133_EV_REPORT_VID_PARMS_CONTROL,
00083    RGB133_EV_GET_CURRENT_PARMS,
00084    RGB133_EV_GET_DEFAULT_PARMS,
00085    RGB133_EV_GET_MINIMUM_PARMS,
00086    RGB133_EV_GET_MAXIMUM_PARMS,
00087    RGB133_EV_GET_ALL_PARMS,
00088    RGB133_EV_GET_ALL_DEVICE_PARMS,
00089    RGB133_EV_GET_VID_PARMS,
00090    RGB133_EV_GET_SET_CURRENT,
00091    RGB133_EV_GET_SET_VIDEO_TIMINGS,
00092    RGB133_EV_SET_VIDEO_TIMINGS,
00093    RGB133_EV_SET_COLOUR_BALANCE,
00094    RGB133_EV_GET_DETECT_FLAGS,
00095    RGB133_EV_GET_VID_MEAS_FLAGS,
00096    RGB133_EV_SET_PARAMETER,
00097    RGB133_EV_SET_SCALE_AOI,
00098    RGB133_EV_GET_CROPPING,
00099    RGB133_EV_SET_CROPPING,
00100    RGB133_EV_SET_PIXELFORMAT,
00101    RGB133_EV_REQ_DATA,
00102    RGB133_EV_WAIT_FOR_DATA,
00103    RGB133_EV_IS_BAD_SIGNAL,
00104    RGB133_EV_DRAW_NO_SIG,
00105    RGB133_EV_GET_CHANNELS,
00106    RGB133_EV_GET_VHDL_VERSION,
00107    RGB133_EV_GET_BOARD_TYPE,
00108    RGB133_EV_ADDRESS_PEEK,
00109    RGB133_EV_READ_FLASH_IMAGE,
00110    RGB133_EV_WRITE_FLASH_IMAGE,
00111    RGB133_EV_RATE_SET,
00112    RGB133_EV_GET_INPUT_RATE,
00113    RGB133_EV_GET_SIGNAL_TYPE,
00114    RGB133_EV_GET_VIDEO_STD,
00115    RGB133_EV_SET_EQUILISATION,
00116    RGB133_EV_SET_DEBUG_LEVEL,
00117 } eAppEvent;
00118 
00127 typedef enum _eVWMagic {
00128    VW_MAGIC_SYSTEM_NUM_DEVICES = 1,
00129    VW_MAGIC_SYSTEM_INFO,
00130    VW_MAGIC_DEVICE_INFO,
00131    VW_MAGIC_DEVICE_INIT_INFO,
00132    VW_MAGIC_INPUT_INFO,
00133    VW_MAGIC_DEVICE,
00134    VW_MAGIC_SET_DEVICE_PARMS,
00135    VW_MAGIC_READ_REG,
00136    VW_MAGIC_WRITE_FLASH,
00137    VW_MAGIC_READ_FLASH,
00138    VW_MAGIC_BOARD_TYPE,
00139    VW_MAGIC_SIGNAL_EVENT,
00140    VW_MAGIC_DEBUG_LEVEL,
00141    VW_MAGIC_FLASH_INFO,
00142    VW_MAGIC_INIT_USER,           
00143    VW_MAGIC_DEVICE_PARMS,        
00144    VW_MAGIC_CLIENT_PARMS,        
00145    VW_MAGIC_DEVICE_INFO_INT,     
00146    VW_MAGIC_CONTROL,             
00147    VW_MAGIC_IMAGE_DATA,          
00148    VW_MAGIC_APP_EVENT,           
00149    VW_MAGIC_IRQ_EVENT,           
00150    VW_MAGIC_USER_DMA,            
00151 } eVWMagic;
00152 
00156 typedef struct _sVWMagic {
00157    int magic; 
00158 } sVWMagic;
00159 
00163 typedef struct _sVWSignalEvent {
00164    int                     magic;
00165    struct _sVWSignalEvent *next;
00166    int                     device;  
00167    int                     channel; 
00168 } sVWSignalEvent;
00169 
00173 typedef struct _sVWUserInit {
00174    /* Magic struct number */
00175    int           magic;
00176 
00177    int           init;
00178 } sVWUserInit;
00179 
00183 typedef struct _sVWAOI {
00184    int top;
00185    int left;
00186    int bottom;
00187    int right;
00188 } sVWAOI;
00189 
00193 typedef struct _sVWClientParms {
00194    /* Magic struct number */
00195    int           magic;
00196 
00197    int           device;
00198 
00199    int           status;
00200 
00201    // Buffer Characteristics
00202    int           width;
00203    int           height;
00204    int           pixelformat;
00205 
00206    // Cropping
00207    sVWAOI        aoi;
00208 
00209    // Deinterlacing
00210    eVWDeint      deint;
00211 
00212    unsigned long SampleRate;
00213 } sVWClientParms;
00214 
00218 typedef struct _sVWVideoTimings {
00219    unsigned long  HorFrequency;     /* Line rate in Hz. */
00220    unsigned long  VerFrequency;     /* Refresh rate in Hz*1000. */
00221    unsigned long  PixelClock;       /* Dot clock in Hz. */
00222 
00223    unsigned short Flags;            /* Bitwise OR of VDIF_FLAG_.*. */
00224 
00225    /* The following values are in pixels. */
00226    unsigned long  HorAddrTime;      /* Amount of active video (resolution). */
00227    unsigned long  HorRightBorder;
00228    unsigned long  HorFrontPorch;
00229    unsigned long  HorSyncTime;
00230    unsigned long  HorBackPorch;
00231    unsigned long  HorLeftBorder;
00232 
00233    /* The following values are in lines. */
00234    unsigned long  VerAddrTime;      /* Amount of active video (resolution). */
00235    unsigned long  VerBottomBorder;
00236    unsigned long  VerFrontPorch;
00237    unsigned long  VerSyncTime;
00238    unsigned long  VerBackPorch;
00239    unsigned long  VerTopBorder;
00240 
00241    unsigned long  HScaled;
00242    unsigned long  VScaled;
00243 } sVWVideoTimings;
00244 
00245 typedef struct _sVWVideoMeasurement {
00246    unsigned long Flags;
00247 } sVWVideoMeasurement;
00248 
00249 typedef struct _sVWColourBalance {
00250    unsigned long RedGain;
00251    unsigned long GreenGain;
00252    unsigned long BlueGain;
00253    unsigned long RedOffset;
00254    unsigned long GreenOffset;
00255    unsigned long BlueOffset;
00256 } sVWColourBalance, *psVWColourBalance;
00257 
00261 typedef struct _sVWDeviceParms {
00262    int                 cap_parm;
00263 
00264    // Signal Type
00265    eVWSignalType       type;
00266 
00267    // Video Std
00268    eVWVidStd           VideoStandard;
00269 
00270    // Signal
00271    int                 no_signal;
00272    int                 transition;
00273 
00274    // Video Characteristics (ALL)
00275    unsigned long       Brightness;
00276    unsigned long       Contrast;
00277 
00278    // Video Characteristics (ANALOG)
00279    unsigned long       Saturation;
00280    unsigned long       Hue;
00281    unsigned long       Blacklevel;
00282    unsigned long       Phase;
00283 
00284    sVWColourBalance    Colour;
00285 
00286    // Video Std
00287    unsigned long       flags;
00288    unsigned long       Format;
00289 
00290    // VideoTimings
00291    sVWVideoTimings     VideoTimings;
00292    unsigned long       PixelFormat;
00293 
00294    // VideoMeasurement
00295    sVWVideoMeasurement VideoMeasurement;
00296 
00297    // AOI
00298    sVWAOI              aoi[RGB133_MAX_CAP_PER_CHANNEL];
00299 
00300    // Image manipulation
00301    int                 VFlip;
00302 
00303    // LiveStream
00304    unsigned long       LiveStream;
00305 
00306 } sVWDeviceParms;
00307 
00311 typedef struct _sVWAllDeviceParms {
00312    /* Magic struct number */
00313    int               magic;
00314 
00315    int               device;
00316 
00317    int               status;
00318 
00319    sVWDeviceParms    curr;
00320    sVWDeviceParms    det;
00321    sVWDeviceParms    def;
00322    sVWDeviceParms    min;
00323    sVWDeviceParms    max;
00324 } sVWAllDeviceParms;
00325 
00329 typedef struct _sVWClient {
00330    int            connected;
00331    sVWClientParms clientParms;
00332 } sVWClient;
00333 
00337 typedef struct _sVWInput {
00338    sVWClient      client[RGB133_MAX_CAP_PER_CHANNEL];
00339    int            clients;
00340    sVWDeviceParms curDeviceParms;
00341    sVWDeviceParms minDeviceParms;
00342    sVWDeviceParms maxDeviceParms;
00343    sVWDeviceParms defDeviceParms;
00344    sVWDeviceParms detDeviceParms;
00345 } sVWInput;
00346 
00352 typedef struct _sVWDevice {
00353    /* Magic struct number */
00354    int           magic;
00355 
00356    int           device;
00357    int           input;
00358    int           client;
00359    unsigned long flags;
00360 
00361    sVWInput      inputs[RGB133_MAX_CHANNEL_PER_CARD];
00362 } sVWDevice, *psVWDevice;
00363 
00368 typedef struct _sVWDeviceInputMap {
00369    int min;     // The minimum input number for the device
00370    int max;     // The maximum input number for the device
00371 } sVWDeviceInputMap;
00372 
00378 typedef struct _sVWDeviceInitInfo {
00379    /* Magic struct number */
00380    int magic;
00381 
00382    int device;
00383    int init;
00384 } sVWDeviceInitInfo;
00385 
00391 typedef struct _sVWSystemInfo {
00392    /* Magic struct number */
00393    int               magic;
00394 
00395    int               devices;
00396    int               inputs;
00397    sVWDeviceInputMap map[RGB133_MAX_DEVICES-1];
00398 
00399    char              version[16];
00400 } sVWSystemInfo, *psVWSystemInfo;
00401 
00402 #define MAX_NAME_LEN 20
00403 #define MAX_NODE_LEN 20
00404 
00408 typedef struct _sVWFW {
00409    unsigned long Version;
00410    unsigned long day;
00411    unsigned long month;
00412    unsigned long year;
00413 } sVWFW;
00414 
00420 typedef struct _sVWDeviceInfo {
00421    /* Magic struct number */
00422    int  magic;
00423 
00424    int  device;
00425 
00426    int  status;
00427 
00428    int  channels;
00429    char name[MAX_NAME_LEN];
00430    char node[MAX_NODE_LEN];
00431 
00432    int  link;
00433 
00434    sVWFW FW;
00435 
00436    int  flashable;
00437 } sVWDeviceInfo, *psVWDeviceInfo;
00438 
00443 typedef struct _sVWDriverInfo {
00444       unsigned int version;
00445 } sVWDriverInfo, *psDriverInfo;
00446 
00452 typedef struct _sVWInputInfo {
00453    /* Magic struct number */
00454    int magic;
00455 
00456    int device;
00457    int input;
00458 
00459    int clients;
00460 } sVWInputInfo, *psVWInputInfo;
00461 
00465 typedef struct _sVWFlashInfo {
00466     /* Magic struct number */
00467     int magic;
00468     int device;
00469 
00470     int flashable;
00471  } sVWFlashInfo, *psVWFlashInfo;
00472 
00476 typedef struct _sVWCommand {
00477    /* Magic struct number */
00478    int           magic;
00479 
00480    unsigned long command;
00481 } sVWCommand;
00482 
00486 typedef struct _sIrqEvent {
00487    /* Magic struct number */
00488    int           magic;
00489 
00490    unsigned long event;
00491    int           id;
00492    int           exit;
00493 } sIrqEvent;
00494 
00495 enum {
00496    WAIT_TYPE_CONTROL = 1,
00497    WAIT_TYPE_PARMS,
00498    WAIT_TYPE_INFO,
00499    WAIT_TYPE_IMAGE_DATA,
00500 };
00501 
00505 typedef struct _sAppEvent {
00506    /* Magic struct number */
00507    int               magic;
00508    unsigned long     wait_type;
00509 
00510    int               id;
00511    int               device;
00512    unsigned long     event;
00513    int               channel;
00514    int               capture;
00515    int               users;
00516    int               force;
00517    sVWAllDeviceParms deviceParms;
00518    sVWClientParms    clientParms;
00519 
00520    int               debug_mask;
00521 
00522    int               exit;
00523 
00524    void*             mdl_vaddr;
00525    unsigned long     mdl_size;
00526 
00527    unsigned long     offset;
00528 
00529    char*             pData;
00530    unsigned long     dataSize;
00531 } sAppEvent;
00532 
00536 typedef struct _sControl {
00537    /* Magic struct number */
00538    int             magic;
00539 
00540    int             device;
00541    int             status;
00542    int             command;
00543    int             init;
00544 
00545    unsigned long   flags;
00546 
00547    unsigned int    value;
00548 
00549    unsigned long   type;
00550 
00551 } sControl;
00552 
00556 typedef struct _sImageData {
00557    /* Magic struct number */
00558    int             magic;
00559 
00560    int             device;
00561    int             status;
00562 
00563    unsigned int    dataSize;
00564    char*           pData;
00565 } sImageData;
00566 
00570 typedef struct _sImage {
00571    /* Magic struct number */
00572    int             magic;
00573 
00574    int             device;
00575    int             status;
00576 
00577    char            pBuffer[2*1024*1024];
00578    unsigned long   dataSize;
00579 } sImage;
00580 
00586 typedef struct _sVWReadReg {
00587    /* Magic struct number */
00588    int           magic;
00589 
00590    int           device;
00591 
00592    int           offset;
00593    unsigned int  value;
00594 } sVWReadReg;
00595 
00601 typedef struct _sVWWriteFlash {
00602    /* Magic struct number */
00603    int            magic;
00604 
00605    int            device;
00606 
00607    unsigned int   completed;
00608    unsigned int   status;
00609 
00610    unsigned int   dataSize;
00611 
00612    /* The 'data' field must be 64-bit aligned, the above
00613     * aligns to 32-bit on 64-bit systems and can affect
00614     * flash writes on the VisionAV family. */
00615    unsigned int   padding;
00616 
00617    unsigned char  data[];
00618 } sVWWriteFlash;
00619 
00625 typedef struct _sVWReadFlash {
00626    /* Magic struct number */
00627    int            magic;
00628 
00629    int            device;
00630 
00631    unsigned int   status;
00632 
00633    unsigned int   dataSize;
00634    unsigned char  data[];
00635 } sVWReadFlash;
00636 
00642 typedef struct _sVWBoardType {
00643    /* Magic struct number */
00644    int           magic;
00645 
00646    int           device;
00647 
00648    unsigned long type;
00649 } sVWBoardType;
00650 
00654 typedef struct _sVWDebugLevel {
00655    /* Magic struct number */
00656    int           magic;
00657 
00658    int           level;
00659 } sVWDebugLevel;
00660 
00661 #endif /*RGB133CONTROL_H_*/

Generated on Fri Jan 20 10:36:57 2017 for Vision Utils by  doxygen 1.4.7