/Users/craigcornelius/Projects/SPRING Mac Release 0.2/fbus.h

Go to the documentation of this file.
00001 // FBUS.H
00002 // Copyright 1995, 1996 Integral Technologies, Inc.
00003 // Public prototypes and declarations for FlashBus SDK
00004 
00006 
00007 // Some constants that make DOS<=>Windows portability easier 
00008 #ifndef _INC_FBUS_H
00009 #define _INC_FBUS_H
00010 
00011 #define FLASHBUSMV 1
00012 
00013 #ifdef __OS2__
00014    #define INCL_DEV
00015    #define INCL_WINSYS
00016    #define INCL_WINWINDOWMGR
00017    #define INCL_GPICONTROL
00018 
00019    #include <os2.h>
00020 #endif
00021 
00022 #if (defined(_DOS) || defined(__OS2__) || defined(_LINUX)) && !defined(_INC_WINDOWS)
00023 
00024 #define VOID          void
00025 
00026 #if defined(__FLAT__) || defined(__OS2__) || defined(_TNT) || defined(FMODEL) || defined(_LINUX)
00027    #define FAR
00028    #define NEAR
00029 #else
00030    #define FAR              _far
00031    #define NEAR               _near
00032 #endif
00033 
00034 #ifdef _LINUX
00035  #define PASCAL
00036 #else
00037  #ifdef _TNT
00038    #define PASCAL        __stdcall
00039  #else
00040    #if __IBMC__ || __IBMCPP__
00041       #define PASCAL        _Pascal
00042    #else
00043       #define PASCAL        _pascal
00044    #endif
00045  #endif
00046 #endif
00047 
00048 #define CDECL         _cdecl
00049 #define WINAPI              FAR PASCAL
00050 #define CALLBACK            FAR PASCAL
00051 
00052 #if !defined(__OS2__)
00053 typedef int        BOOL;
00054 typedef unsigned char       BYTE;
00055 typedef unsigned int     UINT;
00056 typedef short int SHORT;
00057 #define LOBYTE(w)     ((BYTE)(w))
00058 #define HIBYTE(w)           ((BYTE)(((UINT)(w) >> 8) & 0xFF))
00059 #define MAKELONG(low, high) ((LONG)(((WORD)(low)) | (((DWORD)((WORD)(high))) << 16)))
00060 #endif
00061 
00062 #define FALSE         0
00063 #define TRUE          1
00064 
00065 typedef unsigned short      WORD;
00066 typedef unsigned long       DWORD;
00067 #define LONG long
00068 
00069 #define LOWORD(l)           ((WORD)(DWORD)(l))
00070 #define HIWORD(l)           ((WORD)((((DWORD)(l)) >> 16) & 0xFFFF))
00071 
00072 #ifndef NOMINMAX
00073 #ifndef max
00074 #define max(a,b)            (((a) > (b)) ? (a) : (b))
00075 #endif
00076 #ifndef min
00077 #define min(a,b)            (((a) < (b)) ? (a) : (b))
00078 #endif
00079 #endif  // NOMINMAX
00080 
00081 // Types used for passing & returning polymorphic values
00082 typedef UINT WPARAM;
00083 typedef LONG LPARAM;
00084 typedef LONG LRESULT;
00085 #define MAKELPARAM(low, high) ((LPARAM)MAKELONG(low, high))
00086 #define MAKELRESULT(low, high)   ((LRESULT)MAKELONG(low, high))
00087 
00088 #ifndef NULL
00089 #define NULL          0
00090 #endif
00091 typedef char NEAR*          PSTR;
00092 typedef char NEAR*          NPSTR;
00093 typedef char FAR*           LPSTR;
00094 typedef const char FAR*     LPCSTR;
00095 #if !defined(__OS2__)
00096 typedef BYTE NEAR*       PBYTE;
00097 typedef int NEAR*     PINT;
00098 typedef long NEAR*       PLONG;
00099 #endif
00100 typedef BYTE FAR*     LPBYTE;
00101 typedef int FAR*      LPINT;
00102 typedef WORD NEAR*          PWORD;
00103 typedef WORD FAR*           LPWORD;
00104 typedef long FAR*     LPLONG;
00105 typedef DWORD NEAR*         PDWORD;
00106 typedef DWORD FAR*          LPDWORD;
00107 typedef void FAR*           LPVOID;
00108 #define MAKELP(sel, off)    ((void FAR*)MAKELONG((off), (sel)))
00109 
00110 #else
00111 
00112 #include <windows.h> //Just in case
00113 
00114 #endif  //ifdef (_DOS || __OS2__ || _LINUX) && !_INC_WINDOWS
00115 
00116 // Windows and DOS constants
00117 #ifdef _LINUX
00118 //Linux shared lib has problems with HUGE already being defined
00119 //Linux Apps shouldn't define FMODEL and shouldn't use HUGE
00120 #if defined(FMODEL)
00121 #ifdef HUGE
00122 #undef HUGE
00123 #endif
00124 #define HUGE
00125 #endif
00126 #define HUGE16
00127 
00128 #else
00129 
00130 #if defined(WIN32) || defined(__FLAT__) || defined(__OS2__) || defined(_TNT) || defined(FMODEL)
00131 #define HUGE
00132 #define HUGE16
00133 #else
00134 #define HUGE _huge
00135 #define HUGE16 _huge
00136 typedef short int SHORT;
00137 #endif
00138 
00139 #endif
00140 
00141 #ifdef _LINUX
00142 
00143 typedef struct tagRECT
00144 {
00145    int  left;
00146    int  top;
00147    int  right;
00148    int  bottom;
00149 } RECT;
00150 
00151 typedef RECT FAR*       LPRECT;
00152 
00153 #define HWND unsigned int
00154 #define HDC unsigned int
00155 #endif
00156 
00157 // Libary return values
00158 #define RET_SUCCESS        0
00159 #define RET_ERROR          -1
00160 #define RET_INICONFIG      0
00161 #define RET_DEFCONFIG      1
00162 #define RET_EEPROMCONFIG   2
00163 #define RET_AWFULLDCI      0
00164 #define RET_AWPARTIALDCI   1
00165 #define RET_AWNODCI        2
00166 #define RET_UNSUPPORTED    1
00167 #define RET_TIMEOUT        1
00168 
00169 // Input video sizes
00170 #define NTSCVIDEOWIDTH  640
00171 #define NTSCVIDEOHEIGHT 480
00172 #define NTSCVIDEOWIDTHIN  640
00173 #define NTSCVIDEOHEIGHTIN 480
00174 #define NTSCVIDEOWIDTHOUT  640
00175 #define NTSCVIDEOHEIGHTOUT 480
00176 #define PALVIDEOWIDTH   760
00177 #define PALVIDEOHEIGHT  570  //Changed from 576 to provide 4x3 ratio
00178 #define PALVIDEOWIDTHIN   760
00179 #define PALVIDEOHEIGHTIN  570
00180 #define PALVIDEOWIDTHOUT   760
00181 #define PALVIDEOHEIGHTOUT  570
00182 
00183 // Video standards
00184 #define STANDARD_NTSC   0
00185 #define STANDARD_PAL    1
00186 #define MAXVIDSTANDARD  1
00187 
00188 // Video types
00189 #define TYPE_COMPOSITE  0
00190 #define TYPE_SVIDEO     1
00191 #define TYPE_RGB        2
00192 #define TYPE_BETA       3
00193 #define TYPE_RS170      4
00194 #define MAXVIDTYPE      4
00195 
00196 // Video sources
00197 #define MAXVIDSOURCE    9
00198 
00199 // IRQ type for FB_EnableIRQ() call
00200 #define IRQ_VIDEO       0
00201 #define IRQ_VGA         1
00202 #define IRQ_TRIGGER     2
00203 
00204 // Rect types used in calls to FB_GetVideoRect()
00205 #define ACQRECT         0
00206 #define SOURCERECT      1
00207 #define DESTRECT        2
00208 
00209 // I2C Addresses
00210 #define UARTCTRL_ADDR   0x40  //NA MV
00211 #define UARTDATA_ADDR   0x42  //NA MV
00212 #define GPIO_ADDR       0x44 // NA MV general purpose I/O
00213 #define DIVIDER_ADDR    0x46 // NA MV programmable divider
00214 #define ANALOG_ADDR     0x48 // NA MV analog output
00215 #define MC44011_ADDR    0x8a // NA MV decoder
00216 #define EEPROM_ADDR     0xa0
00217 #define EEPROM_ADDRR    0xa1
00218 #define SAA7186_ADDR    0xb8 // NA MV scaler
00219 #define SAA7110ADDRW    0x9c
00220 #define SAA7110ADDRR    0x9d
00221 #define TDA8444ADDRW    0x4a
00222 
00223 // Flash Types
00224 #define FLASHTYPE_NONE        0
00225 #define FLASHTYPE_UNIVERSAL   1
00226 #define FLASHTYPE_CCD4000     2
00227 #define FLASHTYPE_DUALFIELD   3
00228 #define FLASHTYPE_DUALPULSE   4
00229 #define FLASHTYPE_SONYLTE     5
00230 #define FLASHTYPE_WAITSWITCH  6
00231 #define FLASHTYPE_CANON       7
00232 #define FLASHTYPE_WAITFLASH     8
00233 #define FLASHTYPE_WAITFLASHFIELD 9
00234 #define FLASHTYPE_ASYNCRESET 10  //Pulse low
00235 #define FLASHTYPE_ASYNCRESETH 11  //Pulse high
00236 
00237 // Flash flags OR'ed with type
00238 #define FLASHFLAG_FIELDREP    0x8000
00239 #define FLASHFLAG_REDGESMOOTH 0x4000
00240 #define FLASHFLAG_FIELDREPO   0x2000
00241 #define FLASHFLAG_FORCELIVE   0x1000
00242 #define FLASHFLAG_FIELDREPAVG   0x800
00243 
00244 // Field alignment values
00245 #define ALIGN_EVEN            0
00246 #define ALIGN_ODD             1
00247 #define ALIGN_ANY             2
00248 #define ALIGN_NONE            3
00249 #define ALIGN_QUICK           4
00250 #define ALIGNFLAG_NOREFRESH   0x8000
00251 #define ALIGNFLAG_LTE         0x4000
00252 #define ALIGNFLAG_CONSECWAIT  0x2000
00253 #define ALIGNFLAG_CONSECONCE  0x1000
00254 #define ALIGNFLAG_CONSECCONT  0x0800
00255 
00256 //Indexes for async capture
00257 #define AGI_DISABLE     0
00258 #define AGI_ENABLE      1
00259 #define AGI_SETCURFRAME 2
00260 #define AGI_GETCURFRAME 3
00261 #define AGI_SETCURFIELD 4
00262 #define AGI_GETCURFIELD 5
00263 #define AGI_GETDMASTATE 6
00264 #define AGI_DEMANDSIGNAL 7
00265 #define AGI_DEMANDUNSIGNAL 8
00266 
00267 //Flags for async capture
00268 #define AGRAB_WAIT              0x20000000
00269 #define AGRAB_CONT              0x10000000
00270 #define AGRAB_DEMAND            0x08000000
00271 #define AGRAB_TRIGENABLE        0x04000000
00272 #define AGRAB_TRIGHIGH          0x02000000
00273 #define AGRAB_TRIGLEVEL         0x01000000
00274 #define AGRAB_ALIGNODD          0x00800000
00275 #define AGRAB_ALIGNEVEN         0x00400000
00276 
00277 // VGA Mode depth flag
00278 #define VGAMODE_VESA          -1
00279 
00280 // Copy direction flag
00281 #define COPYDIR_TOVGA         0
00282 #define COPYDIR_FROMVGA       1
00283 #define COPYDIR_FROMOFFSCREEN 2
00284 
00285 // SaveFile flags
00286 #define SAVEFILE_RLE             0x0100
00287 #define SAVEFILE_GRAY8           0x0200
00288 #define SAVEFILE_FLIPX           0x0400
00289 #define SAVEFILE_COLOR8          0x0800
00290 #define SAVEFILE_FLIPY           0x1000
00291 #define SAVEFILE_FROMOFFSCREEN   0x8000
00292 
00293 // Video adjustment types
00294 #define ADJUST_HUE         0
00295 #define ADJUST_SATURATION  1
00296 #define ADJUST_BRIGHTNESS  2
00297 #define ADJUST_CONTRAST    3
00298 #define ADJUST_REDBRIGHT   4
00299 #define ADJUST_BLUEBRIGHT  5
00300 #define ADJUST_SHARPNESS   6
00301 #define ADJUST_COMPMONO    7
00302 #define ADJUST_SYNCMODE    8
00303 #define ADJUST_FILTER      9
00304 #define ADJUST_GREENBRIGHT      10
00305 #define ADJUST_GAIN             11
00306 
00307 // MIN and MAX adjust vals
00308 #define MINADJUSTVAL    0
00309 #define MAXADJUSTVAL    0x3f
00310 // IRIS level is 0-4095
00311 #define MAXIRISVAL      0xfff
00312 
00313 // Windows DCI window watch types for FB_AutoWindow
00314 #define AUTOWIN_FREEZE  0x01  //Freeze on occlusion
00315 #define AUTOWIN_CLIP 0x02  //Clip on occlusion
00316 #define AUTOWIN_POS  0x04  //Auto position video
00317 #define AUTOWIN_SIZE 0x08  //Auto size video
00318 #define AUTOWIN_ASPECT  0x10  //maintain aspect (requires AUTOWIN_ADJUSTWINDOW)
00319 #define AUTOWIN_ADJUSTWINDOW  0x20  //Allow window to be moved, sized
00320 #define AUTOWIN_FORCEPAINT 0x40  //Paint window background when sized
00321 #define AUTOWIN_OVERSIZE   0x80  //Round up to DWORD length
00322 #define AUTOWIN_REFRESH    0x100 //Redraw vid from buffer when frozen
00323 #define AUTOWIN_TOPMOST    0x200 //Force window to topmost
00324 #define AUTOWIN_LIVEDACTWIN   0x400 //Limited DCI no freeze on deactivate win
00325 #define AUTOWIN_LIVEDACTAPP   0x800 //Limited DCI no freeze on deactivate app
00326 #define AUTOWIN_FORCEAW1   0x1000   //Force AW level1 - no DCI callbacks
00327 #define AUTOWIN_FORCEAW2   0x2000   //Force AW level2 - no DCI
00328 #define AUTOWIN_MASKBLEEDFIX    0x4000  //Fix left edge mask bleed
00329 #define AUTOWIN_DCIFREEZEFIX    0x8000  //Fix Win16 DCI video freeze problem
00330 #define AUTOWIN_MASKBLEEDFIXTOP 0x10000  //Fix top edge mask bleed
00331 
00332 // FB_AutoBlit() flags
00333 #define AB_SETPAL    0x01
00334 #define AB_GRAY8     0x02
00335 #define AB_NOSCALE   0x04
00336 
00337 // FB_ScreenToDIB() flags
00338 #define STD_ONSCREEN    0x0000
00339 #define STD_CLIPBOARD   0x0001
00340 #define STD_GRAY8       0x0002
00341 #define STD_OFFSCREEN   0x8000
00342 
00343 // MaskDraw OPs
00344 #define MD_INIT         0
00345 #define MD_CLEANUP      1
00346 #define MD_SETUP        2
00347 #define MD_RESET        3
00348 #define MD_UPDATE       4
00349 #define MD_LINE         5
00350 #define MD_UNLINE       6
00351 #define MD_BOX          7
00352 #define MD_UNBOX        8
00353 #define MD_CROSSHAIR    9
00354 #define MD_UNCROSSHAIR  10
00355 #define MD_CIRCLE       11  //unimplemented
00356 #define MD_UNCIRCLE     12  //unimplemented
00357 #define MD_RECT         13
00358 #define MD_UNRECT       14
00359 
00360 // Get/Set Misc indexes
00361 // Return connected video input type - type,standard,source,sog
00362 // in byte0,byte1,byte2,byte3
00363 #define MISCPARM_INPUTVID        0x01
00364 #define MISCPARM_AWSELBOX        0x02
00365 #define MISCPARM_MEMPTR          0x03
00366 #define MISCPARM_MEMSIZE         0x04
00367 #define MISCPARM_MEMFRAMES       0x05
00368 #define MISCPARM_SINGLEFIELD     0x06 // ALIGN_EVEN, ALIGN_ODD or ALIGN_ANY
00369 #define MISCPARM_MEMPHYSADDR     0x07
00370 #define MISCPARM_MEMOFFSET       0x08
00371 #define MISCPARM_MEMCOPYOFFSET   0x09
00372 #define MISCPARM_VIDEOLOCK       0x0a
00373 #define MISCPARM_AWBASEMASK      0x0b
00374 #define MISCPARM_OUTSWITCH       0x0c
00375 #define MISCPARM_WSTIMEOUT       0x0d
00376 #define MISCPARM_PIXBUFDEPTH     0x0e
00377 #define MISCPARM_RESERVED        0x0f
00378 #define MISCPARM_ALWAYSLIVE      0x10
00379 #define MISCPARM_LTEMS           0x11
00380 #define MISCPARM_CAMERATYPE      0x12
00381 #define MISCPARM_SYNCMODE        0x13
00382 #define MISCPARM_WAITFLASHPARMS  0x14
00383 
00384 #define MISCPARM_AGCENABLE      0x15
00385 #define MISCPARM_POWEROUT       0x16
00386 #define MISCPARM_CLEARSWITCH    0x17
00387 #define MISCPARM_INVERTVIDEO    0x18
00388 #define MISCPARM_SELBOXWIDTH    0x19
00389 #define MISCPARM_SELBOXCOLOR    0x1a
00390 
00391 #define MISCPARM_UPDATEMASK     0x1b
00392 #define MISCPARM_AWKILLPAINTMSG 0x1c
00393 #define MISCPARM_ONEFIELD       0x1d
00394 #define MISCPARM_NONINTERLACED  0x1e
00395 #define MISCPARM_MIRRORVIDEO    0x1f
00396 #define MISCPARM_FRAMEMASK      0x20
00397 #define MISCPARM_IOTRIGGERS     0x21
00398 #define MISCPARM_WINDOWNUMBER   0x22
00399 #define MISCPARM_LATCHINSWITCH  0x23
00400 #define MISCPARM_CURCONSECFRAME 0x24
00401 #define MISCPARM_MICROPHWRESET  0x25
00402 #define MISCPARM_CURCONSECFIELD 0x26
00403 #define MISCPARM_PICNOWAIT      0x27
00404 
00405 // SetPalette indexes
00406 #define SETPAL_CREATEGRAY8 0
00407 #define SETPAL_DELGRAY8    1
00408 #define SETPAL_SETCURRENT  2
00409 #define SETPAL_SELHWND     3
00410 #define SETPAL_DESELHWND   4
00411 #define SETPAL_SELHDC      5
00412 #define SETPAL_DESELHDC    6
00413 #define SETPAL_ILUT        7  //YUV
00414 #define SETPAL_ILUT2       8  //Red
00415 #define SETPAL_ILUT3       9  //Green
00416 #define SETPAL_ILUT4       10  //Blue
00417 
00418 // MISCREG Indexes
00419 #define MISCREG_BT252           0
00420 #define MISCREG_74ACT715        1
00421 #define MISCREG_RC6601          2
00422 #define MISCREG_MVEPLD          3
00423 #define MISCREG_DEBI            4
00424 
00425 // Board config flags
00426 #define CFG_INTPOLFIX   0x01
00427 #define CFG_NOSERIAL    0x02
00428 #define CFG_PROGFREQ    0x04
00429 #define CFG_IRISCTRL    0x08
00430 #define CFG_GRAY8       0x10
00431 #define CFG_NORGB       0x20
00432 #define CFG_MV          0x40
00433 #define CFG_INVFLASH    0x80
00434 #define CFG_MICROP      0x100
00435 #define CFG_RS170             0x200
00436 #define CFG_SYNCGEN135  0x400
00437 #define CFG_RS170_RGMUX 0x800
00438 
00439 // Decoder Type
00440 #define DECTYPE_MCC44011 0
00441 #define DECTYPE_BT252 1
00442 #define DECTYPE_SAA7110 2
00443 
00444 // Camera Types
00445 #define DC330           1
00446 #define SONY950         2
00447 #define DAGESLG         3
00448 #define ASYNCNOVSYNC    4
00449 #define ASYNCHNOVSYNC   5
00450 /* Masters specify ffffxxps in low byte */
00451 /* ffff is output delay, p is a pulse, and s is integration state */
00452 #define GENERICMASTER   0x4000
00453 /* CutomSync specifies sync chracteristics in middle nibbles */ 
00454 #define CUSTOMSYNC      0x8000
00455 #define CS_WENRISE 0x000  //WEN Polarity
00456 #define CS_WENFALL 0x010
00457 #define CS_INTPIXCLK 0x000  //PIX clk
00458 #define CS_EXTPIXCLK 0x020
00459 #define CS_PLLADCLK 0x000  //ADCLK
00460 #define CS_7110ADCLK 0x040
00461 #define CS_TWOSYNC 0x080  //Sync on both edges of WEN
00462 #define CS_HSCTLHREFPLL 0x000  //HSYNC control
00463 #define CS_HSCTL7110 0x100
00464 #define CS_HSCTLEXT 0x200
00465 #define CS_HSCTLSSEP 0x300
00466 #define CS_VSCTLSSEP 0x000  //VSYNC control
00467 #define CS_VSCTL7110 0x400
00468 #define CS_VSCTLEXT 0x800
00469 #define CS_VSCTLEXTPS 0xc00
00470 
00471 // Video Capture Memory flags
00472 #define VCM_GETCONFIG           0x10000
00473 #define VCM_SETMEMBUFFER        0x20000
00474 #define VCM_RELEASEMEMBUFFER    0x40000
00475 #define VCM_SETOFFSET           0x80000
00476 #define VCM_SETCOPYOFFSET       0x100000
00477 #define VCM_SETPITCH            0x200000
00478 
00479 //PCIConfig indexes
00480 #define PCICFG_FINDDEV     0
00481 #define PCICFG_READDWORD   1
00482 #define PCICFG_WRITEDWORD  2
00483 #define PCICFG_FINDCLASS   3
00484 
00485 // EEPROM byte count
00486 #define EEPROMSIZE 256
00487 
00488 #define MAXBOARDS 4
00489 #define MULTIB_INIT 0
00490 #define MULTIB_CLEANUP 1
00491 #define MULTIB_SWITCHBOARD 2
00492 #define MULTIB_SETBOARD 3
00494 
00495 // Video capture memory config structure
00496 typedef struct tagCaptureMemInfo
00497 {
00498    DWORD dwMemPtr;
00499    DWORD dwMemSize;
00500    DWORD dwMemOffset;
00501    DWORD dwMemCopyOffset;
00502    DWORD dwMemPhysAddr;
00503    DWORD dwMemFrames;
00504    DWORD dwVGAMemPtr;
00505    DWORD dwVGASize;
00506    DWORD dwVGAMemPhys;
00507    DWORD dwMaskPtr;
00508    DWORD dwPitch;
00509    DWORD dwReserved[5];
00510 } CAPMEMINFO;
00511 
00512 // Version info struct
00513 typedef struct tagVersionInfo
00514 {
00515    WORD  wLibVersion;
00516    WORD  wBetaVersion;
00517    WORD  wDebugStatus;
00518    WORD  wBusType;
00519    WORD  wVGAMem;
00520    WORD  wSClk;
00521    WORD  wBWidthLimit;
00522    WORD  wBIOSVersion;
00523    DWORD dwBoardCfg;
00524    DWORD dwSerialNum;
00525    WORD  wBoardRev;
00526    WORD  wScalerRev;
00527    WORD wVGAType;
00528    WORD wDecoderType;
00529    WORD wEEPROMVer;
00530    WORD wMicoPVer;
00531    WORD  wReserved[14];
00532 } VERSIONINFO;
00533 
00534 // File resolution info struct
00535 typedef struct tagFileResInfo
00536 {
00537    WORD  wWidth;
00538    WORD  wHeight;
00539    WORD  wDepth;
00540    WORD  wFlags;
00541 } FILERESINFO;
00542 
00543 // AutoWin info
00544 typedef struct tagAutoWinInfo
00545 {
00546    DWORD hWnd;
00547    WORD  wRsv;
00548    LPSTR lpMaskBuf;
00549    WORD  wMaskWidth;
00550    WORD  wMaskHeight;
00551    WORD  wOccluded;
00552    BOOL  bAWLive;
00553    LPSTR lpRefreshBuf;
00554    WORD  wMaskDelay;
00555    DWORD hWinWatch;
00556    WORD  wReserved[18];
00557 } AUTOWININFO;
00558 
00560 
00561 // Library routines return 0 or value for success, <0 for failure
00562 
00563 #ifdef __cplusplus
00564 extern "C" {
00565 #endif 
00566 
00567 // Locate the board, don't change any regs
00568 SHORT WINAPI FB_Locate(void);
00569 // Init the board using the currently loaded configuration
00570 SHORT WINAPI FB_Init(void);
00571 // Shut down in preparation for exit
00572 SHORT WINAPI FB_Cleanup(void);
00573 
00574 // Load configuration from .INI file.  A NULL file name loads the default vals
00575 SHORT WINAPI FB_LoadConfig(LPSTR szIniFile);
00576 // Save configuration to .INI file
00577 SHORT WINAPI FB_SaveConfig(LPSTR szIniFile);
00578 // Save current configuration to the EEPROM
00579 // Developers should NOT make this call
00580 SHORT WINAPI FB_SaveConfigToEEPROM(WORD, WORD, DWORD, DWORD);
00581 
00582 // Write an I2C register
00583 SHORT WINAPI FB_SetI2CReg(SHORT nAddr, SHORT nSubAddr, SHORT nVal);
00584 // Read an I2C register
00585 SHORT WINAPI FB_GetI2CReg(SHORT nAddr, SHORT nSubAddr);
00586 
00587 // 7146 Set/Get functions
00588 SHORT WINAPI FB_SetSAA7146Reg(SHORT nAddr, DWORD dwVal);
00589 DWORD WINAPI FB_GetSAA7146Reg(SHORT nAddr);
00590 
00591 //Set scaler in and out modes
00592 SHORT WINAPI FB_SetColorSpace(SHORT nInSpace, SHORT nOutSpace);
00593 
00594 // Return version info
00595 SHORT WINAPI FB_GetVersionInfo(VERSIONINFO FAR *pVInfo);
00596 
00597 // Return the VGA mode
00598 SHORT WINAPI FB_GetVGAMode(BOOL bVESA);
00599 
00600 // Convert pixel vals to a new resolution
00601 SHORT WINAPI FB_ConvertPixel(SHORT nWidth, SHORT nDepthCur, SHORT nDepthNew,
00602       char HUGE16 *lpValCur, char HUGE16 *lpValNew, LPSTR lpCMap);
00603 // Set a VGA pixel
00604 SHORT WINAPI FB_SetVGAPixel(SHORT nX, SHORT nY, long lVal);
00605 // Set a VGA rectangle to a uniform value
00606 SHORT WINAPI FB_SetVGARect(SHORT nX, SHORT nY, SHORT nWidth, SHORT nHeight,
00607       long lVal);
00608 // Copy a VGA rectangle to or from main memory
00609 // Direction 0==to VGA 1==from VGA
00610 SHORT WINAPI FB_CopyVGARect(SHORT nX, SHORT nY, SHORT nWidth, SHORT nHeight,
00611       char HUGE16 *hpPixBuf, SHORT nPitch, SHORT bFromVGA);
00612 // Create a DIB from a screen rectangle
00613 SHORT WINAPI FB_ScreenToDIB(SHORT nX, SHORT nY, SHORT nWidth, SHORT nHeight,
00614       SHORT nFlags, char HUGE16 *hpDIBBuf);
00615 
00616 // Set the video type and standard
00617 // Config types are: 0 source, 1 standard, 2 type
00618 SHORT WINAPI FB_SetVideoConfig(SHORT nType, SHORT nStandard, SHORT nSource,
00619       BOOL bSyncOnGreen);
00620 // Get the video type, standard, or source
00621 SHORT WINAPI FB_GetVideoType(void);
00622 SHORT WINAPI FB_GetVideoStandard(void);
00623 SHORT WINAPI FB_GetVideoSource(void);
00624 
00625 // Get or set a misc value 
00626 SHORT WINAPI FB_GetMiscParm(SHORT nIndex, void FAR *lpRetBuf);
00627 SHORT WINAPI FB_SetMiscParm(SHORT nIndex, LONG lVal);
00628 
00629 // Get or set a misc reg value 
00630 SHORT WINAPI FB_SetMiscReg(SHORT nIndex, DWORD dwReg, DWORD dwVal);
00631 DWORD WINAPI FB_GetMiscReg(SHORT nIndex, DWORD dwReg);
00632 
00633 // Set an 8 bit palette
00634 SHORT WINAPI FB_SetPalette(SHORT nType, long lHandle);
00635 
00636 // Set input(source) video rect
00637 SHORT WINAPI FB_SetInputWindow(SHORT nSrcX, SHORT nSrcY, SHORT nSrcWidth,
00638       SHORT nSrcHeight);
00639 // Set X and Y offset into the input(source) window
00640 SHORT WINAPI FB_SetInputOffset(SHORT nOffX, SHORT nOffY);
00641 
00642 // Set video window size and position
00643 SHORT WINAPI FB_SetVideoWindow(SHORT nDstX, SHORT nDstY, SHORT nDstWidth,
00644       SHORT nDstHeight ,BOOL bScale);
00645 
00646 SHORT WINAPI FB_VideoOffscreen(SHORT nDstWidth, SHORT nDstHeight,
00647       SHORT nDstDepth, BOOL bScale);
00648 
00649 //Set/Get info on video capture memory
00650 SHORT WINAPI FB_VideoCaptureMem(CAPMEMINFO FAR *pCMInfo, DWORD dwFlags);
00651 
00652 //Access PCI config space
00653 DWORD WINAPI FB_PCIConfig(SHORT nIndex, DWORD dwVal0, DWORD dwVal1, DWORD dwVal2);
00654 
00655 // Set video acquisition rectangle
00656 SHORT WINAPI FB_SetAcqRect(SHORT nAcqX, SHORT nAcqY, SHORT nAcqWidth,
00657       SHORT nAcqHeight);
00658 // Set and get the video x and y delays
00659 SHORT WINAPI FB_SetXYDelay(SHORT nXDelay, SHORT nYDelay);
00660 SHORT WINAPI FB_GetXDelay(void);
00661 SHORT WINAPI FB_GetYDelay(void);
00662 
00663 // Get various video rects
00664 SHORT WINAPI FB_GetVideoRect(SHORT nRectType, SHORT FAR *pnX, SHORT FAR *pnY,
00665       SHORT FAR *pnWidth, SHORT FAR *pnHeight);
00666 
00667 // Vsync/LSync operations
00668 // Get the current field type
00669 SHORT WINAPI FB_GetFieldType(void);
00670 // Wait for a particular field type
00671 SHORT WINAPI FB_WaitFieldType(SHORT nFieldType);
00672 // Wait a specified number of fields
00673 SHORT WINAPI FB_WaitVSync(SHORT nSyncCnt);
00674 // Wait a specified number of lines
00675 SHORT WINAPI FB_WaitHSync(SHORT nSyncCnt);
00676 // Wait a specified number of milliseconds
00677 SHORT WINAPI FB_WaitMS(SHORT nMSCnt);
00678 
00679 // Adjust video parms
00680 // Adjustment types are: 0==hue 1==sat, 3==bright, 4==contrast
00681 SHORT WINAPI FB_SetVideoAdjustments(SHORT nType, SHORT nVal);
00682 // Get current video parms
00683 SHORT WINAPI FB_GetVideoAdjustments(SHORT nType);
00684 // Get video parms for any standard or type
00685 SHORT WINAPI FB_GetSTVideoAdjustments(SHORT nStandard, SHORT nVideoType,
00686       SHORT nType);
00687 
00688 // Freeze video with or without flash
00689 // Alignment values: ALIGN_ANY  ALIGN_ODD  ALIGN_EVEN
00690 // Flash delay values: FLASHTYPE_NONE FLASHTYPE_AUTO FLASHTYPE_MANUAL
00691 SHORT WINAPI FB_VideoGrab(SHORT nAlign, SHORT nFlashType, SHORT nFlashDelayF,
00692       SHORT nFlashDelayL);
00693 // Start live video
00694 SHORT WINAPI FB_VideoLive(BOOL bLive, SHORT nAlign);
00695 // Get live status
00696 SHORT WINAPI FB_GetLiveStatus(void);
00697 // Set async, multibuffer grab mode
00698 SHORT WINAPI FB_AsyncGrab(SHORT nIndex, SHORT nFrameCnt, DWORD dwFlags);
00699 
00700 // Check external switch
00701 SHORT WINAPI FB_CheckSwitch(SHORT nBaseAddr, SHORT nTimeOutMS);
00702 
00703 // Enable or Disable the video mask ram
00704 SHORT WINAPI FB_EnableVideoMask(BOOL bEnable);
00705 // Set the video mask ram
00706 SHORT WINAPI FB_SetVideoMask(SHORT nX, SHORT nY, SHORT nWidth, SHORT nHeight, SHORT nPitch, LPSTR lpMaskBuf);
00707 // Change the mask write delay
00708 SHORT WINAPI FB_SetMaskDelay(SHORT nMDelay);
00709 // Set the mask based on a key color
00710 SHORT WINAPI FB_VGARectToMask(DWORD dwKeyColor, SHORT nX, SHORT nY
00711                 , SHORT nWidth, SHORT nHeight
00712                 , LPSTR lpMaskBuf, SHORT nPitch);
00713 // Draw into video mask
00714 SHORT WINAPI FB_MaskDraw(SHORT nOp, SHORT nX1, SHORT nY1
00715                 , SHORT nX2, SHORT nY2, DWORD dwParam1, DWORD dwParam2);
00716 
00717 // Enable or disable VGA or video VSync
00718 SHORT WINAPI FB_EnableIRQ(SHORT nIRQType, SHORT nIRQNum, BOOL bEnable,
00719       void FAR *lpISR);
00720 // Clear an IRQ
00721 SHORT WINAPI FB_ClearIRQ(SHORT nIRQType, SHORT nIRQNum);
00722 // Return the IRQ used
00723 SHORT WINAPI FB_GetIRQNumber(void);
00724 
00725 // Serial port functions
00726 SHORT WINAPI FB_SetupSerial(SHORT nBaseIO, SHORT nIRQ, WORD wBaud,
00727       SHORT nDataBits, SHORT nParity, SHORT nStopBits);
00728 SHORT WINAPI FB_ReadSerialBytes(LPSTR lpRcvBuf,SHORT nRcvCnt,SHORT nTimeOutMS);
00729 SHORT WINAPI FB_WriteSerialBytes(LPSTR lpTxBuf,SHORT nTxCnt,SHORT nTimeOutMS);
00730 SHORT WINAPI FB_GetSerialReg(SHORT nReg);
00731 SHORT WINAPI FB_SetSerialReg(SHORT nReg, SHORT nRegVal);
00732 
00733 //Mimic Windows private profile functions
00734 SHORT WINAPI FB_GetPrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
00735       LPCSTR lpszDefault, LPSTR lpszReturnBuffer, SHORT cbReturnBytes,
00736       LPCSTR lpszFileName);
00737 SHORT WINAPI FB_WritePrivateProfileString(LPCSTR lpszSection, LPCSTR lpszEntry,
00738       LPCSTR lpszString, LPCSTR lpszFileName);
00739 SHORT WINAPI FB_OpenPrivateProfileString(LPCSTR lpszFileName, BOOL bWrite);
00740 SHORT WINAPI FB_ClosePrivateProfileString(BOOL bWrite);
00741 
00742 // Load and save file will call seperate Dlls based on the file extension
00743 // This allows new file formats to be added without changing the main DLL
00744 // For DOS .TGA and .DIB are supported
00745 // A NULL hpPixBuf will cause the image to be loaded directly into VGA mem
00746 SHORT WINAPI FB_FileResInfo(LPSTR szPathName, FILERESINFO FAR *lpFileRes);
00747 SHORT WINAPI FB_LoadFile(LPSTR szPathName, SHORT nX, SHORT nY, SHORT nWidth,
00748       SHORT nHeight, SHORT nFlags, char HUGE16 *hpPixBuf, SHORT nPitch);
00749 SHORT WINAPI FB_SaveFile(LPSTR szPathName, SHORT nX, SHORT nY, SHORT nWidth,
00750       SHORT nHeight, SHORT nDepth, SHORT nFlags,char HUGE16 *hpPixBuf,
00751       SHORT nPitch);
00752 
00753 // Available with programmable frequency boards
00754 SHORT WINAPI FB_SetVidFreq(SHORT nNTSCBits, SHORT nPALBits);
00755 // Available with programmable iris boards
00756 SHORT WINAPI FB_SetIrisLevel(SHORT nIrisBits);
00757 
00758 // Available under Windows with DCI
00759 SHORT WINAPI FB_AutoWindow(UINT hWnd, SHORT nXOff, SHORT nYOff,
00760       SHORT nWidthAdj, SHORT nHeightAdj, long lFlags); 
00761 SHORT WINAPI FB_AutoWindowInfo(AUTOWININFO FAR *pAWInfo);
00762 
00763 SHORT WINAPI FB_AutoBlit(UINT nWnd, SHORT msec, SHORT nXOff, SHORT nYOff,
00764       SHORT nWidthAdj, SHORT nHeightAdj, long lFlags);
00765 
00766 SHORT WINAPI FB_MultiBoard(SHORT nIndex, DWORD dwParm1);
00767 
00768 #ifdef __cplusplus
00769 }
00770 #endif 
00771 
00772 #endif   //ifndef _INC_FBUS_H

Generated on Thu Aug 30 11:03:13 2007 for SPRING Mac by  doxygen 1.5.3