/* Change History: amvsReg.c

   Revision 4.4.2.1  1999/04/20 13:20:31  matthias
   icpciMain.h -> icpciOS/Ext/Int.h
   card8/16 -> u_char/short
   read/writew -> icp_read/writew
   icp_errno -> icp.errno
   the bug check routines are moved to the os-depending files (osxxxx.c)

   Revision 4.4  1998/11/05 16:06:13  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.1  1998/10/15 12:54:05  matthias
   ADR to ADDR converted (to make abbreviations unifom)

   Revision 4.3  1998/08/11 13:02:59  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.2  1998/07/02 16:34:40  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:06:44  matthias
   low-level register handler: sizeof(u_short) used to calculate offset

   Revision 4.2.4.1  1998/07/02 14:48:11  matthias
   new function vs_dump_regs for debugging purposes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   changes in AMCC workaround functions (low level register handler)

   Revision 0.3.2 1997/06/23
   fix ICPCI_DEBUG_REG usage

   Revision 0.3.1 1997/05/04
   rename in get/set/init functions `trg' with `trig'
   apply changes from definitions in header file

   Revision 0.3.0 1997/02/28
   rename vs_get_trgen to vs_get_trigen
   rename vs_get_trgserc to vs_get_trigsrc
   rename vs_get_trgcy to vs_get_trigcy
   rename also the set/init functions of trg
   the init funtions now set the register to 0x0000 (VS_RES_INIT)

   ----------------------------------------------------------------------------

   changes since version 0.1.1:
   -	cli()/sti() pairs in vs_write_ms

 */

/* Change History: amvsReg.h

   Revision 4.4.2.2  1999/04/28 09:11:40  matthias
   __KERNEL__ is a define for linux based systems

   Revision 4.4.2.1  1999/04/20 13:11:54  matthias
   card8/16 -> u_char/short

   Revision 4.4  1998/11/05 16:06:13  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.1  1998/10/15 12:54:49  matthias
   ADR to ADDR converted (to make abbreviations uniform)

   Revision 4.3  1998/08/11 13:02:59  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.1  1998/07/02 14:48:11  matthias
   new function vs_dump_regs for debugging purposes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   strobe 1 and 2 defines are changed

   Revision 0.3.2 1997/06/23
   undef VS_MAP_SIZE, def VS_REG_SIZE

   Revision 0.3.1  1997/05/04
   STRBSEL and STRBPOL shift values are incorrect (fixed)
   rename `trg' with `trig' in foreward declerations
   define VS_RES_INIT (initialize reserved bits to zero)
   add VS_DISABLE/VS_ENABLE
   expand some cryptic definitions to better readable one's

   Revision 0.3.0 1997/02/28
   rename forward definitions: trg->trig
   add VS_RES_INIT (initialization of reserved bits)
   add VS_DISABLE/VS_ENABLE
   expand some cryptic definitions or replace with ENABLE/DISABLE
   
 */

/* Change History: amdigReg.c

   Revision 4.3.4.1  1999/04/20 13:22:43  matthias
   icpciMain.h -> icpciOS/Ext/Int.h
   card8/16 -> u_char/short
   read/writew -> icp_read/writew
   icp_errno -> icp.errno
   vmalloc/free -> icp_malloc/free(size, PAGED)
   the bug check routines are moved to the os-depending files (osxxxx.c)

   Revision 4.3  1998/08/11 13:02:58  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.3  1998/08/06 13:38:36  matthias
   more error reporting in dg_set_lut16

   Revision 4.2.4.2  1998/07/02 16:34:40  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:06:12  matthias
   low-level register handler: sizeof(u_short) used to calculate offset

   Revision 4.2.4.1  1998/07/02 14:49:35  matthias
   new function dg_dump_regs for debugging purposes
   remove error condition, if setting No_LineMiss_Mode

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01
   enable range checking in set_extime

   Revision 0.4.1 1997/11/10
   if you call icp_lin_lut16, it should do always something
   changes in AMCC workaround functions (low level register handler)
   various fixes in 16 bit lookup-table functions

   Revision 0.3.2 1997/06/23
   fix offset in low level functions to u_short
   rewrite debug output in low level functions
   rewrite dg_lin_lut16 to support NORM_TO8/16
   implement set_lut8/16 get lut8/16

   Revision 0.3.1 1997/05/04
   get/set/lin lut8/16 functions implemented
   rename lin_lut/lin_olut to lin_lut8/lin_lut16

   Revision 0.3.0 1997/02/28
   lookup table functions competed

 */

/* Change History: amdigReg.h

   Revision 4.3.4.2  1999/04/28 09:11:40  matthias
   __KERNEL__ is a define for linux based systems

   Revision 4.3.4.1  1999/04/20 13:12:44  matthias
   card8/16 -> u_char/short

   Revision 4.3  1998/08/11 13:02:58  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.1  1998/07/02 14:49:35  matthias
   new function dg_dump_regs for debugging purposes
   remove error condition, if setting No_LineMiss_Mode

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01
   fix minimal and maximal values of extime (error in manual page 3-12)
   init vertical size to 768 (mem problems)

   Revision 0.4.1 1997/11/10
   to support also 2MB / 16Bit cards, init frame size is shrinked to 1024x1024

   Revision 0.3.2 1997/06/23
   redefine LUT_OFFSET/SIZE to be u_short pointer
   remove PSIZE_??_BANKS definitions

   Revision 0.3.1 1997/05/04
   set/get lut8/16 no longer has 3 arguments (page deleted)
   some further definitions for PSIZE, LUT16 and LUT8

   Revision 0.3.0 1997/02/28
   some defines for LUT actions added

 */

/* Change History: ampcvReg.c

   Revision 4.1.2.4  1999/04/26 16:17:39  matthias
   the ICP_PLL_PRINTF should better call icp_irq_printf

   Revision 4.1.2.3  1999/04/22 06:18:54  matthias
   replace the register access by pointer derecferencing with icp_readw/writew
   functions

   Revision 4.1.2.2  1999/04/20 13:25:35  matthias
   icpciMain.h -> icpciOS/Ext/Int.h
   card8/16 -> u_char/short
   read/writew -> icp_read/writew
   icp_errno -> icp.errno
   PDEBUGPLL -> ICP_PLL_PRINTF

   Revision 4.1.2.1  1999/03/02 08:18:41  matthias
   the egcs111 finds out some errors

   Revision 4.1  1998/11/05 16:06:12  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 1.1.2.2  1998/11/04 16:16:01  matthias
   fixes to support rev-b boards (variable-scan mode)

   Revision 1.1.2.1  1998/10/15 13:23:25  matthias
   low and medium level handlers PCVision

 */

/* Change History: ampcvReg.h

   Revision 4.1.2.3  1999/04/26 11:11:50  matthias
   gcc 2.8 marks the adressoperator to a :16 field as an error

   Revision 4.1.2.2  1999/04/20 13:14:01  matthias
   card8/16 u_char/short

   Revision 4.1.2.1  1999/02/15 12:49:05  matthias
   defines for irq-handler deleted (make the handler easier to read)

   Revision 4.1  1998/11/05 16:06:13  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 1.1.2.2  1998/11/04 16:16:01  matthias
   fixes to support rev-b boards (variable-scan mode)

   Revision 1.1.2.1  1998/10/15 13:23:40  matthias
   resgister set defines PCVision

*/

/* Change History: icpciReg.c

   Revision 4.4.2.5  1999/04/22 06:24:25  matthias
   fix some earlier not found save/restore_flags constructs

   Revision 4.4.2.4  1999/04/20 13:59:14  matthias
   icpciMain.h -> icpciOS/Ext/Int.h
   card8/16/32 -> u_char/short/long
   icp_errno -> icp.errno
   PDEBUG -> ICP_PRINTF
   read/writel -> icp_read/writel
   read/writew -> icp/read/writew
   in/outl -> icp_in/outl
   in/outw -> icp_in/outw

   Revision 4.4.2.3  1999/03/02 09:26:44  matthias
   sti/cli pairs replaced by save/restore_flags

   Revision 4.4.2.2  1999/02/15 12:55:59  matthias
   xcr_test_and_clear_irq replaces xcr_clear_irq -
   only detected irq's are cleared
   xcr_clear_irq clears all irq's - this function uses no longer defines

   Revision 4.4.2.1  1998/11/10 12:15:42  matthias
   some patches in get_bmsf/ss

   Revision 4.4  1998/11/05 16:06:17  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.1  1998/10/15 13:16:00  matthias
   fixes in BMREQ disable/enable
   support in test/clear_irq for new PCVision Interrupt Sources

   Revision 4.3  1998/08/11 13:03:02  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.2  1998/07/02 16:34:42  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:07:28  matthias
   low-level register handler: sizeof(u_short|32) used to calculate offset

   Revision 4.2.4.1  1998/07/02 14:54:23  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01
   dummy and dummy_ptr are no longer static

   Revision 0.4.1 1997/11/10
   ICP_WAIT_LOOP uses loop waiting instead of udelay waiting
   adjust workaround handling in low level register functions

   Revision 0.3.2 1997/06/23
   fix ICPCI_DEBUG_REG usage

   Revision 0.3.1 1997/05/04
   rewrite xdr_clear_irq (reenable only used irq's, not all)

   Revision 0.3.0 1997/02/28
   minor changes

   ----------------------------------------------------------------------------

   changes since version 0.1.1:
   -	cli()/sti() pairs in ?cr_write_mm
   -	fixes in read/write functions (mmap mode)
   -	new xcr_* routines replaces old interrupt handlers
   -	fixes in cr_[gs]et_fcnt

 */

/* Change History: icpciReg.h

   Revision 4.4.2.2  1999/04/20 13:55:13  matthias
   card8/16/32 -> u_char/short/long
   the ICR/CR_MAP_SIZE defines are no longer needed

   Revision 4.4.2.1  1999/02/15 12:54:01  matthias
   irq-handler defines are no longer in this file
   xcr_test_and_clear_irq replaces xcr_clear_irq

   Revision 4.4  1998/11/05 16:06:17  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.1  1998/10/15 13:17:19  matthias
   BMREQ defines adjusted to PCVision manual (3bits to 1bit)

   Revision 4.3  1998/08/11 13:03:02  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.2  1998/07/02 16:34:43  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:09:39  matthias
   CR|ICR mmaped register space is always 2 pages
   (unaligned or page boundary crosses)

   Revision 4.2.4.1  1998/07/02 14:54:23  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24
   change ICR_INTCTL_INIT to clear MAINT and TAINT

   Revision 0.4.1b 1997/12/01
   minor changes

   Revision 0.4.1 1997/11/10
   new pending and waiting defines

   Revision 0.3.2 1997/06/23

   Revision 0.3.1 1997/05/04
   adapt I/CR_TEST|CLEAR_MASK to new requirements
   expand some cryptic defines to better readable one's

   Revision 0.3.0 1997/02/28
   expand some cryptic defines to better readable one's

   ----------------------------------------------------------------------------

   changes since version 0.1.1:
   -	definitions for xcr_test/clear_irq

 */

/* Change History: icpciReg.h

   Revision 4.4.2.2  1999/04/20 13:55:13  matthias
   card8/16/32 -> u_char/short/long
   the ICR/CR_MAP_SIZE defines are no longer needed

   Revision 4.4.2.1  1999/02/15 12:54:01  matthias
   irq-handler defines are no longer in this file
   xcr_test_and_clear_irq replaces xcr_clear_irq

   Revision 4.4  1998/11/05 16:06:17  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.1  1998/10/15 13:17:19  matthias
   BMREQ defines adjusted to PCVision manual (3bits to 1bit)

   Revision 4.3  1998/08/11 13:03:02  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.2  1998/07/02 16:34:43  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:09:39  matthias
   CR|ICR mmaped register space is always 2 pages
   (unaligned or page boundary crosses)

   Revision 4.2.4.1  1998/07/02 14:54:23  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24
   change ICR_INTCTL_INIT to clear MAINT and TAINT

   Revision 0.4.1b 1997/12/01
   minor changes

   Revision 0.4.1 1997/11/10
   new pending and waiting defines

   Revision 0.3.2 1997/06/23

   Revision 0.3.1 1997/05/04
   adapt I/CR_TEST|CLEAR_MASK to new requirements
   expand some cryptic defines to better readable one's

   Revision 0.3.0 1997/02/28
   expand some cryptic defines to better readable one's

   ----------------------------------------------------------------------------

   changes since version 0.1.1:
   -	definitions for xcr_test/clear_irq

 */

/* Change History: icpciMain.c

   Revision 4.4.2.10  1999/04/28 14:54:09  matthias
   if we want to clear the bma buffer we should specify also the bma-buffer

   Revision 4.4.2.9  1999/04/26 11:26:37  matthias
   macro FRAME_HANDLED has splited into GRAB and SNAP parts
   icp_timeout has moved to this file from icpciAux.c
   the buffer clearing section of icp_timeout has moved to icp_task_queue
   the MEM_TEST part of icp_select no longer directly dereferences a on-board
   memory pointer

   Revision 4.4.2.8  1999/04/22 06:25:51  matthias
   fix some minor errors, found while comiling with 'undef linux'

   Revision 4.4.2.7  1999/04/20 16:17:22  matthias
   the calls to os_private->signum/pid/task are now encapsuleted by
   assign/deassign_task/signal and task_assigned, check_blocked, kill_proc

   Revision 4.4.2.6  1999/04/20 15:34:13  matthias
   case AMFA/C1: branches deleted (default branch handles this correctly)

   Revision 4.4.2.5  1999/04/20 13:53:22  matthias
   definition of struct file_ops has hoved to the osxxxx.c files
   the global variables icp_opmode/timeout(complete/cont/first_read are now
   part of the global structure
   the task/queue/timer/signum/pid are now into the os_private part of the 
   global structure
   basically all elements of the struct file_ops are splited into a icp_os_
   part (in osxxxx.c) and a icp_ part (in this file)
   frame_info=/del_timer/wake_up_inter./kill_proc are encapsuleted by icp_...
   PDEBUGIRQ -> ICP_IRQ_PRINTF
   ENODEV -> ENXIO
   icp_attach/detach are now part of init/cleanup_module and have moved to
   osxxxx.c
   there is a complex version depend handling of the signum/pid variables

   Revision 4.4.2.4  1999/03/02 09:26:23  matthias
   disable ALL irqs in icp_close, not only the main ones

   Revision 4.4.2.3  1999/02/15 13:00:49  matthias
   pending irq's are tested with the new function test_and_clear for all boards
   at the beginning of the handler
   aq_irq is alled AFTER vblank handler (count++ is no longer needed)
   some adjustments in comparision between get_fcnt and icp_count
   the clear flag is obsolete

   Revision 4.4.2.2  1999/01/29 13:08:50  matthias
   clear flag in irq-handler must be reset for EVERY tested board
   if no GRAB/SNAP is pending, SEL_IN should return immediately, but SEL_EX
   must report an error
   when using camera special device, on board memory is mapped; when using
   module special device, upper memory is mapped

   Revision 4.4.2.1  1998/11/10 12:14:08  matthias
   *** empty log message ***

   Revision 4.4  1998/11/05 16:06:16  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.2  1998/11/05 15:47:22  matthias
   in select and mmap we return an error, if icp_decode_minor fails
   in register_character_device also

   Revision 4.3.2.1  1998/10/15 13:11:27  matthias
   debug messages for new interrupt sources in irq_handler
   MAINT/TAINT debug messages moved to the right place
   register/free of TWO major device numbers
   PCVision branches in switch statements

   Revision 4.3  1998/08/11 13:03:01  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.3  1998/08/06 13:48:53  matthias
   request_irq and register_chrdev return error values, if needed
   second try (without SA_INTERRUPT) in request_irq added (useful only for
   shared irq's)

   Revision 4.2.4.2  1998/07/02 16:34:41  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:13:14  matthias
   aligning of possibly unaligned CR/ICR register spaces ic deattach

   Revision 4.2.4.1  1998/07/02 14:54:22  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24
   in acquisition complete handler, if bma disabled, if icp_count >= ...
   first_read from read(2) is now global
   some fixes with icp_count in snap sections of irq handler
   interlaced cameras are not supported in multi frame triggered snap!
   TRIGGER section in select added

   Revision 0.4.1b 1997/12/01
   odd/even interrupts occurs BEFORE field is read
   last frame is handled in acq, not in vb irq
   cur_mem can always be incremented (not only in vb)
   mem_init and bma_init can return an error (other than EIO)
   enable bma in snap function also if icp_count < 2
   increment mem_buffer in multi-snap

   Revision 0.4.1 1997/11/10
   init for cur_tmo in global structure added
   in read mode no structure info_t is filled
   master and target abort irqs are logged
   set select-exception in case of any timeout
   polling mode is no longer supported, interrupt is requested
   to simplify wait queue handling, we use in future only one
   now we use a FRAME_HANDLED macro to initiate 'after acq' actions
   a frame_info struture (added after the image) contains acq time etc.
   trigger mode and 'snap after trigger' is supported
   ioctl-devices support normal and O_EXCL open calls
   clear current mem-bma buffers in open call
   cam_open is int rather than bool (can count number of open's)
   read supports O_NONBLOCK; polling is no longer supported
   copy to user space is don by new function icp_mem_copy (icpciAux.c)
   icp_ioctl funtion has it's own file icpciIoctl.h
   ip_select supports also SNAP mode and is adjusted to nonblocking mode
   adjust to new kernel interface: vfree -> iounmap

   Revision 0.3.2 1997/06/23
   changes to support 16 and 24(32) bit images (open, read)
   add one line in first field copyout, if AM-VS and VB comes from tsrc (read)
   also free inparam/outparam in case of an error (ioctl)
   add VS_LUT_LIN DG_NORM_TO8/16 DG_LUT_LIN ioctl's

   Revision 0.3.1 1997/05/04
   add interrupt debug code (DEBUG_ICPCI_IRQ)
   move snap complete to busmaster irq section
   add cr_get_gstat to camera input wakeup (useful after camera switching)
   main interrupt switching only in open/close
   vfree memory areas only, if structure memberis not NULL
   rewrite select syscall (first add wait_queue, second test for new frame)
   bma also possible with signal generation disabled
   respect new frame_valid member in some places
   AM-DIG lookup table ioctl's implemented
   additional line in interlace read-copyout deleted (not further needed ??)
   AM-DIG module support added
   select syscall implemeted
   support for more than one board fixed and tested
   GET/SET_CAMCNF is now generic, not further module depending
   
   Revision 0.3.0 1997/02/28
   DIG-LUT Ioctl's added
   AM-DIG module support added
   select (2) call added
   suooprt for more than one board fixed and tested
   get/set camera configuration changed to support more than one module

   ----------------------------------------------------------------------------
   
   Changes since version 0.1.1:
   -	interrupt handler is complete rewritten, now it tests and disables
	all sources on all boards
   -    new top/bottom half syncronization via icp_opmode

 */

/* Change History: icpciIoctl.c

   Revision 4.4.2.12  1999/04/28 14:51:14  matthias
   add a break after the SOFTTRIG section

   Revision 4.4.2.11  1999/04/28 09:15:34  matthias
   ICP_SHT -> ICP_DLY
   if we use the lower prescaler as long as possible, we achive a higher
   resolution in time (SET_EXTIME)

   Revision 4.4.2.10  1999/04/26 13:44:09  matthias
   new AM-DIG ioctl for adjustment of the extime (shutter time) added,
   it uses struct timespec (nanoseconds) as argument

   Revision 4.4.2.9  1999/04/26 11:19:37  matthias
   direct access to on-board memory only via readl/writel (MEM_TEST parts)
   some critical sections have new enable/disable pairs
   some cur_mem/old_mem adjustments

   Revision 4.4.2.8  1999/04/22 06:25:52  matthias
   fix some minor errors, found while comiling with 'undef linux'

   Revision 4.4.2.7  1999/04/20 16:17:23  matthias
   the calls to os_private->signum/pid/task are now encapsuleted by
   assign/deassign_task/signal and task_assigned, check_blocked, kill_proc

   Revision 4.4.2.6  1999/04/20 15:34:03  matthias
   case AMFA/C1: branches deleted (default branch handles this correctly)

   Revision 4.4.2.5  1999/04/20 14:07:45  matthias
   the former icp_ioctl call has splited into an icp_os_ioctl part and an
   ic_ioctl part
   all os dependend parts (copyin/copyout, vmalloc/vfree, IOC...) is now in
   osxxxx.c
   the icp_wait_queue call has renamed to icp_sleep/icp_timeout
   ENODEV -> ENXIO

   Revision 4.4.2.4  1999/03/02 09:24:32  matthias
   sti/cli pairs replaced by save/restore_flags

   Revision 4.4.2.3  1999/02/15 12:51:35  matthias
   if we use H for encoding (PCVision), the prefix should be HIOC, nor GIOC

   Revision 4.4.2.2  1999/01/29 13:13:42  matthias
   GET_BMABASE is obsolete, since we map /dev/ic???I
   new call GET_MEMSIZE to determine on-borad memory size
   rename GET_BMAADDR (GET_BMABUFADDR), new call GET_MEMBUFADDR

   Revision 4.4.2.1  1998/11/10 12:13:42  matthias
   revision number corrected

   Revision 4.4  1998/11/05 16:06:15  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.4  1998/11/05 15:47:45  matthias
   minor spell fixes

   Revision 4.3.2.3  1998/11/05 10:26:18  matthias
   *** empty log message ***

   Revision 4.3.2.2  1998/11/04 16:18:23  matthias
   PCVision ioctl´s (similar like AM-VS) added

   Revision 4.3.2.1  1998/10/15 13:06:36  matthias
   PCVision branch in switch statements added

   Revision 4.3  1998/08/11 13:03:01  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.2  1998/08/06 13:45:12  matthias
   version call added and placed first in `generic' part

   Revision 4.2.4.1  1998/07/02 14:45:24  matthias
   irq`s are also in freeze ioctl enabled (useful for longer timeouts)

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/02/13
   fix kernel version problems with struct f_owner
   don't check for signal if module is AM-DIG (snap)
   some fixes in snap function if in one-or-more images triggered snap modus
   vs|dg_trigen are self clearing -> reenable in SET_TRIGGER
   debugging output for starting field (snap)

   Revision 0.4.1b 1997/12/01
   return immediately, when camera switching on am-dig is requested
   mem_init and bma_init can return a valid error code (ENOMEM)
   switch even and odd field interrupts
   remove goto error at and of snap

   Revision 0.4.1 1997/11/10
   use icp.cur_tmo for timeout values
   clear bma buffers only, if bma is on
   GET_FPS and SET_FPS ioctls added
   add magic sequence for mem and bma buffers

   */

/* Change History: icpciAux.c

   Revision 4.4.2.6  1999/04/26 16:17:08  matthias
   we have to init the pv_reg pointer, before we call ampv_startup

   Revision 4.4.2.5  1999/04/26 11:17:20  matthias
   function icp_timeout has splited and moved to icpciMain.c
   some splhigh/low pairs are replaced by enable/disable_irq (disables only
   the icp, not all irq's)
   the os dep memset_io function has a new 'board' argument
   some adjustments due to stuct icp_global_t changes

   Revision 4.4.2.4  1999/04/22 06:20:35  matthias
   fix some warnings (if...else, jiffies, volatile)

   Revision 4.4.2.3  1999/04/20 15:27:52  matthias
   bug workaround functions are now in this file
   decode_minor is split into an os-dep part and an general part
   icp_wakeup has been renamed to icp_timeout and is also splited
   in enable_irq the PCVision functions are encapsulated with if module = PCV
   save/restore_flags have benn renamed to splhigh/low
   pci_init has been splited into pci_init and map_init with there common
   and os-depending parts
   cap_init now calls the nes amxx_startup functions at init time
   mem/bma_clear now work on all buffers, because they are called from
   mem/bma_init
   all direct acces to the on-board memory is encapsulated by functions
   like memset_io, memcpy_io,...
   the mem buffers are now aligned to 4096 byte boundaries, so we have
   in multi-snap mode (bma_copy) a different src offset (in this mode
   the images are CONTIGNUOUS into the memory

   Revision 4.4.2.2  1999/04/06 08:08:00  matthias
   some more debug messages

   Revision 4.4.2.1  1999/03/02 09:25:25  matthias
   sti/cli pairs replaced by save/restore_flags
   xcr_clear_irqs at the end of icp_disable_irqs move to begin of function

   Revision 4.4  1998/11/05 16:06:14  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.3  1998/11/05 15:46:06  matthias
   minor spell fixes

   Revision 4.3.2.2  1998/11/05 10:26:03  matthias
   the initial memcpy of the camera structures has moved back to icpciAux.c

   Revision 4.3.2.1  1998/10/15 13:03:15  matthias
   module specific code has moved to icpciAM.c
   major/minor number remapping to PCVision module number implemented
   new interrupt sources in enable/disable_irq added (PCVision)
   PCVision support in all case statements
   error message, if PCVision with 4Mb memory detected

   Revision 4.3  1998/08/11 13:03:00  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.3  1998/08/06 13:42:50  matthias
   detect lin_lut errors in amdg_init
   patch in `cross page boundary' check

   Revision 4.2.4.2  1998/07/02 16:34:41  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:11:54  matthias
   support for non aligned ICR/CR mapped register spaces
   error, if AM/on-board memory spaces are unaligned

   Revision 4.2.4.1  1998/07/02 14:47:19  matthias
   make a register dump in am-init function, if in debug modus

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24
   correct some comments and printk's

   Revision 0.4.1b 1997/12/01
   odd/even irq occurs before field is valid
   splitting of bma space depend on on board memory (2/4Mb)
   various fixes in buffer allocating functions (more readable error messages)

   Revision 0.4.1 1997/11/10
   clear interrupts AFTER enable/disable
   if module is 16bit AM-DIG init to psize 16 and muxb HI
   ICP_MEM/IO_DELAY is modified to wait8/wait16/wait32 deleys
   waitXX delays are adjustable at module loading time
   no irq_on testing is done
   icp_wakeup_tom is comlpetely rewritten to support new wait_queue interface
   various debugging messages in module init added
   init with different pixel depth's, depending on AM-DIG type
   try to detect sub-revision level
   use ioremap instead of vremap
   ICP_SLOWDOWN is no longer supported / automatic detectipn is done
   various type casts are easier with off_t and size_t
   icp_mem/bma_clear support different modi (white,grey,black)
   icp_mem_copy is new (no workaround and different order)
   AM-VS workaround in bma_copy is no longer needed

   Revision 0.3.2 1997/06/23
   add support for 16 and 24(32) bit images (am??_init, icp_setup_bma)
   linearize LUT's on some digital modules
   test if number of buffers is > BUFFERS_MAX (mem_init, bma_init)
   add AM-VS hack in setup_bma (see read in Main.c)
   remove set_lut/olut in amdg_init

   Revision 0.3.1 1997/05/04
   icp_enable_irq disables now not mentioned irqs
   main irq is not further automatically enabled
   initialize every allocated structure to zero
   linerarize lookup table on some AM-DIG types at init time
   move module initialization from cap_init to dev_init
   additional line in interlaced bma requests deleted (not further needed ??)
   AM-DIG module support added
   module initialization changed (am_setup merged with am_init)
   bitfield registers are initialized with 0x0000 first
   slowdown register access no longer depends on cpu-speed (see Makefile)

   Revision 0.3.0 1997/02/28
   lin_lut now active on some DIG module types
   AMDIG module support eadded
   module initialization changed (icp_am??_setup now in icp_am??_init)
   new error (null pointer access) added
   slowdown register access no longer depends on cpu - speed

   ----------------------------------------------------------------------------

   changes since version 0.2.0:
   -	the icp_[en|dis]able_irq functions simplify operations
   -	icp_setup_bma is called ONLY from irq handler
   -	icp_wait_queue / icp_wakeup_tmo replaces various sleep/wakeup
   	functions

 */

/* Change History: icpciAM.c

   Revision 4.1.2.4  1999/04/22 06:21:20  matthias
   struct pv_reg is no longer volatile (see ampcvReg.c)

   Revision 4.1.2.3  1999/04/20 13:34:10  matthias
   icpciMain.h -> icpciOS/Ext/Int.h
   icp_errno -> icp.errno
   the !init_ok sections from the amxx_init routines have moved to the new
   amxx_startup routines
   remove 'const' from struct dg_def_cam

   Revision 4.1.2.2  1999/02/15 13:38:34  matthias
   initial values are loaded from camera structure (not from defines) nref/pref

   Revision 4.1.2.1  1999/02/15 12:51:56  matthias
   *** empty log message ***

   Revision 4.1  1998/11/05 16:06:14  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 1.1.2.3  1998/11/05 10:26:03  matthias
   the initial memcpy of the camera structures has moved back to icpciAux.c

   Revision 1.1.2.2  1998/11/04 16:17:39  matthias
   fixes to support PCVision REV-B boards

   Revision 1.1.2.1  1998/10/15 13:24:14  matthias
   module specific code removed from icpciAux.c

 */

/* Change History: osLx20.c

   Revision 1.1.2.5  1999/04/28 09:12:56  matthias
   some additional brackets in if/else constructs

   Revision 1.1.2.4  1999/04/26 13:42:46  matthias
   for the DG_GET/SET_LUT call, the argument is > 16k, copy it in PAGE_SIZE
   pieces

   Revision 1.1.2.3  1999/04/26 11:31:44  matthias
   the delayed_memset_io and mark_tq functions are the new interface
   to avoid too long parts witch runs with irq_disable
   functions icp_irqon/off allow to disable ONLY ONE (the icp) irq, NOT ALL

   Revision 1.1.2.2  1999/04/20 16:17:23  matthias
   the calls to os_private->signum/pid/task are now encapsuleted by
   assign/deassign_task/signal and task_assigned, check_blocked, kill_proc

   Revision 1.1.2.1  1999/04/20 14:14:50  matthias
   these are the new files to encapsulate the os-dependend behavior of the
   linux 2.0 and 2.2 kernels
   there are the init/cleanup_module routines, the os-dependend parts of the
   init routines (os_init, os_pci_init, os_map_init,...),
   and the general routines
   (wakeup, sleep, splhigh, spllow...)
   some routines are inline and defined in icpciOS.h
   struct file_ops defines routines, witch call after extracting some
   information from struct file, inode the icp_ routines in icpciMain/Ioctl.c
   the module specific variables are now in this files

 */

/* Change History: osLx22.c

   Revision 1.1.2.5  1999/04/28 09:12:56  matthias
   some additional brackets in if/else constructs

   Revision 1.1.2.4  1999/04/26 13:42:46  matthias
   for the DG_GET/SET_LUT call, the argument is > 16k, copy it in PAGE_SIZE
   pieces

   Revision 1.1.2.3  1999/04/26 11:31:44  matthias
   the delayed_memset_io and mark_tq functions are the new interface
   to avoid too long parts witch runs with irq_disable
   functions icp_irqon/off allow to disable ONLY ONE (the icp) irq, NOT ALL

   Revision 1.1.2.2  1999/04/20 16:17:23  matthias
   the calls to osp->signum/pid/task are now encapsuleted by
   assign/deassign_task/signal and task_assigned, check_blocked, kill_proc

   Revision 1.1.2.1  1999/04/20 14:14:50  matthias
   these are the new files to encapsulate the os-dependend behavior of the
   linux 2.0 and 2.2 kernels
   there are the init/cleanup_module routines, the os-dependend parts of the
   init routines (os_init, os_pci_init, os_map_init,...),
   and the general routines
   (wakeup, sleep, splhigh, spllow...)
   some routines are inline and defined in icpciOS.h
   struct file_ops defines routines, witch call after extracting some
   information from struct file, inode the icp_ routines in icpciMain/Ioctl.c
   the module specific variables are now in this files

 */

/* Change History: icpciOS.h

   Revision 1.1.2.4  1999/04/26 11:28:35  matthias
   for task_queues we need a new include file
   struct os_t has a new member memset (which is also a struct)
   new function prototypes irq_on/off

   Revision 1.1.2.3  1999/04/22 06:23:13  matthias
   adjustments to compile most of the code, even if linux is not defined

   Revision 1.1.2.2  1999/04/20 16:17:23  matthias
   the calls to os_private->signum/pid/task are now encapsuleted by
   assign/deassign_task/signal and task_assigned, check_blocked, kill_proc

   Revision 1.1.2.1  1999/04/20 14:17:27  matthias
   function prototypes of the os fuctions (defined in osxxxx.c)
   system include files
   definition of the os_private structure
   definition of sone inline fuctions (especially low level io routines)

 */

/* Change History: icpciExt.h

   Revision 1.1.2.5  1999/04/29 07:25:54  matthias
   *** empty log message ***

   Revision 1.1.2.4  1999/04/28 09:16:38  matthias
   ICP_SHT -> ICP_DLY
   __KERNEL__ is a define for linux based systems
   SET_EXTIME needs an IOW definition

   Revision 1.1.2.3  1999/04/26 13:44:08  matthias
   new AM-DIG ioctl for adjustment of the extime (shutter time) added,
   it uses struct timespec (nanoseconds) as argument

   Revision 1.1.2.2  1999/04/22 06:23:13  matthias
   adjustments to compile most of the code, even if linux is not defined

   Revision 1.1.2.1  1999/04/20 14:19:44  matthias
   offical driver interface to user level programms, including the ioctl
   number encoding, camera structure definition and some useful defines
   many things have moved from icpciMain.h into this file

   Revision 4.4.2.3  1999/04/06 08:09:27  matthias
   the number of buffers is now an int (no limitation to 128 buffers)

   Revision 4.4.2.2  1999/03/02 08:16:54  matthias
   struct timeval is in user and kernel space defined at different places

   Revision 4.4.2.1  1999/01/29 12:58:34  matthias
   new define for module nuber space (IC_MODULE_MAX) - needed in config.y

   Revision 4.4  1998/11/05 16:06:16  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.3  1998/11/05 15:48:52  matthias
   new abbreviations for some modules
   remove old INIT_STEPS stuff

   Revision 4.3.2.2  1998/11/04 16:17:39  matthias
   fixes to support PCVision REV-B boards

   Revision 4.3.2.1  1998/10/15 13:14:25  matthias
   new definition/redefinition of bit/bool values (now enums)
   new pv_reg (pv_cam) structures
   definition of the new interrupt sources
   definitions for the new module types (STD/RGB|COMP/PCVision)

   Revision 4.3  1998/08/11 13:03:02  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.3  1998/08/06 13:49:22  matthias
   *** empty log message ***

   Revision 4.2.4.2  1998/07/02 16:34:42  matthias
   merged vith register set aligment version v041baln

   Revision 4.1.4.1  1998/07/02 16:14:13  matthias
   *** empty log message ***

   Revision 4.2.4.1  1998/07/02 14:54:22  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24
   include version.h for LINUX_VERSION_CODE
   adding fflush to PDEBUG if not in kernel mode

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   new defines for FPS_MAX/MIN/INIT
   test patterns for magic sequences
   redefine CAMERA and TRIGGER timeouts
   dg_lut16_t is now an union to support different pixel depths
   config file interface has moved to config.h
   struct icp_info_t is new
   usage of io/v map/free depend on kernel version
   a sub-revision level is supported to simplyfy workarounds
   try to adjust card8/16/32 types to 'main stream ones' (off_t, size_t , int)
   raw_size in bma-buffers is WITHOUT info structure, paged_size includes this
   irq_on is no longer needed

   Revision 0.3.2 1997/06/23
   lut16 size on AM-DIG is 64k
   increase BUFFERS_MAX to 48
   add cur_psz (pixelsize) in main structure to reflect depth of image

   Revision 0.3.1 1997/05/04
   simplify defines for interrupt handling
   struct icp_acc_t has new member frames_valid
   AM-DIG structures dg_cam_t, dg_lut8_t, dg_lut16_t defined
   error return values for read_config added
   error in enum definitions fixed (0 is not an error)

   Revision 0.3.0 1997/02/28
   struct dg_cam_t, dg_lut8_t and dg_lut16_t added
   new error definitions for read_config()
   fix error in enum definitions (0 is not an error)

   ----------------------------------------------------------------------------

   changes since version 0.1.1:
   -	the main structure has new members cur_fld / boards
   -	prototype of read_config supports other modules
   	(struct vs_cam_t -> union icp_dev_t)

 */

/* Change History: icpciInt.h

   Revision 1.1.2.5  1999/04/28 09:11:41  matthias
   __KERNEL__ is a define for linux based systems

   Revision 1.1.2.4  1999/04/26 13:44:08  matthias
   new AM-DIG ioctl for adjustment of the extime (shutter time) added,
   it uses struct timespec (nanoseconds) as argument

   Revision 1.1.2.3  1999/04/26 11:14:22  matthias
   cur_cam, cur/old_mem/bma are moved to cap/mem/bma subfields
   there is a new fuction icp_task_queue (clears buffers out of the irq off
   section)
   structure os_private renamed to osp

   Revision 1.1.2.2  1999/04/22 06:25:50  matthias
   fix some minor errors, found while comiling with 'undef linux'

   Revision 1.1.2.1  1999/04/20 14:24:37  matthias
   internal driver structures
   definition of the global driver structure
   typedefs of the interrupt values and the opmode types
   the pci_t structure has split into a smaller one and a new
   icp_map_t structure
   ALL static variables from ALL files are now into the main driver structure
   an os_private field has been added

   */

/* Change History: config.h

   Revision 4.4.2.2  1999/04/20 11:56:24  matthias
   card8 -> u_char

   Revision 4.4.2.1  1999/03/02 08:17:36  matthias
   cnf_err_t is a define, not a global variable

   Revision 4.4  1998/11/05 16:06:13  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.2  1998/11/04 16:17:05  matthias
   fixes to support PCVision REV-B boards
   assertations to check size of debug structures

   Revision 4.3.2.1  1998/10/15 12:57:25  matthias
   code extended to support PCVision config files

   Revision 4.3  1998/08/11 13:02:59  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.1  1998/07/02 14:54:21  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   config file definitions from icpciMain.h moved to this file

   Revision 0.3.2 1997/06/23

   Revision 0.3.1 1997/05/04
   fill register name debug output to fixed 7 spaces
   rename `LowLine' and `LowVB' to `Low_Line', `Low_VB'
   comma after `pref' missing (fixed)
   
   Revision 0.3.0 1997/02/28
   
   */

/* Change History: config.l

   Revision 4.4.2.2  1999/04/26 14:03:17  matthias
   PCVision boards 1,2,3 should also be supported

   Revision 4.4.2.1  1999/04/20 10:41:53  matthias
   icpciMain.h -> icpciExt.h
   bool -> int

   Revision 4.4  1998/11/05 16:06:13  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.1  1998/10/15 12:57:25  matthias
   code extended to support PCVision config files

   Revision 4.3  1998/08/11 13:02:59  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.1  1998/07/02 14:54:21  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   STRING rule have to parse BEFORE PARAMETER...
   a new token STRING is supported (CameraName etc.)

   Revision 0.3.2 1997/06/23

   Revision 0.3.1 1997/05/04
   replace [:print:] with [^\n]*
   quote dot in WORD definition
   
   Revision 0.3.0 1997/02/28
   
 */

/* Change History: config.y

   Revision 4.4.2.3  1999/04/20 12:08:09  matthias
   icpciMain.h > icpciExt.h
   bool -> int
   card8 -> u_char
   PDEBUG -> ICP_PRINTF

   Revision 4.4.2.2  1999/02/15 12:47:32  matthias
   reference voltages are measured in mV (0-1200/2000)

   Revision 4.4.2.1  1999/01/29 12:56:27  matthias
   since ITI has no CONTINUOUS numbering for the different modules,
   we try all possible module numbers (ICP_MODULE_MAX) in test_config

   Revision 4.4  1998/11/05 16:06:14  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.2  1998/11/04 16:17:05  matthias
   fixes to support PCVision REV-B boards
   assertations to check size of debug structures

   Revision 4.3.2.1  1998/10/15 12:57:25  matthias
   code extended to support PCVision config files

   Revision 4.3  1998/08/11 13:02:59  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.1  1998/07/02 14:54:21  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   read_config has a new camera_name argument
   the camera field of test_config is two dimensional

   Revision 0.3.2 1997/06/23
   check also next board, if module is found (test_config)

   Revision 0.3.1 1997/05/04
   rewrite test_config to support configurations with first board = 1
   initialize i_ and p_valid to FALSE
   swap nref/pref maximal voltages
   
   Revision 0.3.0 1997/02/28
   
 */

/* Change History: test_icpci.c

   Revision 4.4.2.5  1999/04/28 09:13:57  matthias
   -? is an ordinary command and selects the help screen

   Revision 4.4.2.4  1999/04/20 13:04:45  matthias
   icpciMain/Ioctl.h -> icpciExt.h
   bool -> int
   card8/16 -> u_char/short
   PDEBUG -> ICP_PRINTF
   structs sigaction are not statically initialized
   (problems with glibc and 2.2)
   mem/bma_buffer have to be < than buffers (>=)
   FD_ISSET is tested after select

   Revision 4.4.2.3  1999/03/02 08:19:39  matthias
   the new glibc has support for 1024 signals - the old libc only for 32

   Revision 4.4.2.2  1999/02/19 13:30:18  matthias
   unmap of image_mmaped is done in Clean_Up

   Revision 4.4.2.1  1999/01/29 13:10:43  matthias
   changed to map /dev/ic???I instead of /dev/mem, when operating in bma-mode
   new command line options -n -u to define on-board/upper memory buffer
   number to use

   Revision 4.4  1998/11/05 16:06:18  matthias
   merged with PCVISION/AM-STD/RGB developement version v042pcv

   Revision 4.3.2.2  1998/11/05 15:49:28  matthias
   one frame per second is now the default timeout value

   Revision 4.3.2.1  1998/10/15 13:18:01  matthias
   supporting PCVision

   Revision 4.3  1998/08/11 12:58:07  matthias
   timeout detection also in signal mode
   fps value is a command line option

   Revision 4.2.4.1  1998/07/02 14:43:51  matthias
   now we initialize to 1fps (good for a wide variety of cameras)

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24
   use XShm on is default
   use shared memory is now a command line option
   Save_Image has the pointer to the image as parameter
   read the addresses of all bma-buffers
   set TRIGGER in every acquisition-loop
   wait up to 15 seconds if in trigger mode

   Revision 0.4.1b 1997/12/01
   fix segv problems with 16bit X servers (src_8)

   Revision 0.4.1 1997/11/10
   make it readable
   syncronize between main program and signal handler
   new function Copy_Image (old code from signal handler)
   trigger mod is supported (-t)
   you can force snap image acq also in bma/mmap mode (-x)
   tiff image saving is supported
   an additional camera name is printed
   image time is read from info structure

   Revision 0.3.2 1997/06/23
   if module is AM-DIG shrink to 8 bit

   Revision 0.3.1 1997/05/04
   move get width/height after set configuration
   signal-generation and handler not needed in select waiting mode
   respect return value of select (-1,0,1)
   fix default config file and module (default.txt, AM-VS)
   test select (2) waiting mode with -s option
   supports now also AM-DIG module (enable with -m d option)
   -m option (mode) has renamed to -o (opreation mode)
   read_config() is adapted to new multi-module interface

   Revision 0.3.0 1997/02/28
   select (2) mode operation supported (option -s)
   support for AM-DIG module added (option -m v (AM-VS) -m d (AM-DIG)
   -m option (mode) has renamed to -o (operation mode)
   read config file has adapted to new (multi-module) interface

   */

/* Change History: swtrig_icpci.c

   Revision 4.3.4.4  1999/04/28 14:53:20  matthias
   some usage text changes

   Revision 4.3.4.3  1999/04/28 09:13:57  matthias
   -? is an ordinary command and selects the help screen

   Revision 4.3.4.2  1999/04/22 06:26:33  matthias
   encapsulate linux/limits.h by ifdef linux

   Revision 4.3.4.1  1999/04/20 12:52:07  matthias
   icpciMain.h -> icpciExt.h
   bool -> int

   Revision 4.3  1998/08/11 13:03:03  matthias
   merged with branch 4.2.4.x

   Revision 4.2.4.1  1998/07/02 14:54:23  matthias
   minor or no changes

   ----------------------------------------------------------------------------

   Revision 0.4.1c 1998/03/24

   Revision 0.4.1b 1997/12/01

   Revision 0.4.1 1997/11/10
   Initial revision

 */

/* Change History: extime_icpci.c

   Revision 1.1.2.2  1999/04/28 14:50:29  matthias
   we use the ident ioctl device (on camera devices multiple open is forbidden)

   Revision 1.1.2.1  1999/04/28 09:09:56  matthias
   tool to adjust the delay/shutter/exposure time of the external sync time
   output (AM-DIG)

 */

# Change History: Makefile
#
# Revision 4.3.2.6  1999/04/28 14:49:13  matthias
# at depend section .o -> _g.o is replaced by .o: -> _g.o:
#
# Revision 4.3.2.5  1999/04/28 09:20:18  matthias
# SUFFIX statement added to define the building of the _g.o files better
# MKDEP command introduced
# OPTS -> FLAGS
# the KFLAGS section is now in the .system file
# disable echoing of some longer shell sections with @
# build rules for UTIL_2 added
# some minor adjustments: rm, cp ...
#
# Revision 4.3.2.4  1999/04/22 06:16:12  matthias
# minor changes
#
# Revision 4.3.2.3  1999/04/20 13:30:20  matthias
# make config section added (os-depending things are write to .system)
# if building the release, ChangeLog is copied from CVSROOT
# .orig files are removed at make clean
#
# Revision 4.3.2.2  1999/03/02 08:20:31  matthias
# some changes at the 'depend' section and IFLAGS is not needed
#
# Revision 4.3.2.1  1998/11/10 12:37:05  matthias
# assuming, the dir /usr/man/man4 already exists
#
# Revision 4.3  1998/11/05 16:06:17  matthias
# merged with PCVISION/AM-STD/RGB developement version v042pcv
#
# Revision 4.2.2.3  1998/11/05 15:45:29  matthias
# prepared to patch against the AM-STD/RGB patchfile
#
# Revision 4.2.2.2  1998/11/05 10:25:02  matthias
# adjusted to patch against 0.4.3 amclr patch
# prepared for other possible patchfiles
#
# Revision 4.2.2.1  1998/10/15 12:52:28  matthias
# omit-frame-pointer added to CFLAGS (reduce code size)
# new PCVision files to SRCS/OBJS added
#
# Revision 4.2  1998/08/11 13:02:56  matthias
# merged with branch 4.2.4.x
#
# Revision 4.1.4.2  1998/08/06 13:37:40  matthias
# generate text documentation without underlining and bold characters
#
# Revision 4.1.4.1  1998/07/02 14:54:21  matthias
# minor or no changes
#
# -----------------------------------------------------------------------------
#
# Revision 0.4.1c 1998/03/24
# now we can build and install different versions of man pages (us and de)
# install section -> MAKEDEV 0 and 1
# patch section for amclr-patch added
# in install section call MAKEDEV with argument all (not vs|dg)
# comment out tiff libraries for test_icpci
#
# Revision 0.4.1 1997/11/10
# manual, archive and release sections and rules added
# comment out tiff save features for test_icpci
# ICP_SLOWDOWN is no longer needed - autodetection is done
# ICP_WAIT_LOOP is added to do the same as the original (ITEX) sources
# rules for swtrig_icpci and xt-icpci are added
# test_icpci can now save images (TIFF - format)
#
# Revision 0.3.2 1997/06/23
# amdigReg.o added to OBJS section
# rules for libconfig.a adapted (normal and debugging version)
# insert ICP_SLOWDOWN option to reflect slowdown register access
#
# Revision 0.3.1 1997/05/04
# amdigReg.o added to OBJS section
# rules for libconfig.a adapted (normal and debugging version)
# insert ICP_SLOWDOWN option to reflect slowdown register access
#
# -----------------------------------------------------------------------------
#
# changes since version 0.2.1:
# - add rules for new config library concept (lex + yacc) 
# - test program uses debug library per default
#
# changes since version 0.1.1:
# - new install section
# - make depend support
# - debugging AND normal version build

.\" Change History: icpci.us.4
.\"
.\" Revision 4.4.2.3  1999/02/19 15:03:10  matthias
.\" some tbl adjustments
.\" MMAP and new ioctl patches
.\"
.\" Revision 4.4.2.2  1999/02/15 12:56:49  matthias
.\" gom.com replaces gom-online.de
.\"
.\" Revision 4.4.2.1  1998/11/10 12:13:10  matthias
.\" some spelling corrections
.\"
.\" Revision 4.4  1998/11/05 16:06:17  matthias
.\" merged with PCVISION/AM-STD/RGB developement version v042pcv
.\"
.\" Revision 4.3.2.1  1998/11/04 16:19:37  matthias
.\" updated to describe the new module types
.\" some tbl fixes in nroff mode
.\"
.\" Revision 4.3  1998/08/11 12:56:37  matthias
.\" dokumentation for the version call added
.\"
.\" Revision 4.2.4.1  1998/07/02 14:54:22  matthias
.\" minor or no changes
.\"
.\" ---------------------------------------------------------------------------
.\"
.\" Revision 0.4.1c 1998/03/24
.\" Initial revision
.\"

.\" Change History: icpci.de.4
.\"
.\" Revision 4.4.2.3  1999/02/19 15:03:10  matthias
.\" some tbl adjustments
.\" MMAP and new ioctl patches
.\"
.\" Revision 4.4.2.2  1999/02/15 12:49:59  matthias
.\" documentation adjusted to new upper memory interface
.\"
.\" Revision 4.4.2.1  1998/11/10 12:12:33  matthias
.\" *** empty log message ***
.\"
.\" Revision 4.4  1998/11/05 16:06:15  matthias
.\" merged with PCVISION/AM-STD/RGB developement version v042pcv
.\"
.\" Revision 4.3.2.1  1998/11/04 16:19:37  matthias
.\" updated to describe the new module types
.\" some tbl fixes in nroff mode
.\"
.\" Revision 4.3  1998/08/11 12:56:37  matthias
.\" dokumentation for the version call added
.\"
.\" Revision 4.2.4.1  1998/07/02 14:54:22  matthias
.\" minor or no changes
.\"
.\" ---------------------------------------------------------------------------
.\"
.\" Revision 0.4.1c 1998/03/24
.\" minor spell corrections (renaming to icpci.de.4)
.\"
.\" Revision 0.4.1b 1997/12/01
.\"
.\" Revision 0.4.1 1997/11/10
.\" Initial revision
.\"
