moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kstars / kstars / indi / fli / libfli-camera-parport.h
blob1274509839d9f5580fa2634f597e362a1ba0a70c
1 /*
3 Copyright (c) 2002 Finger Lakes Instrumentation (FLI), L.L.C.
4 All rights reserved.
6 Redistribution and use in source and binary forms, with or without
7 modification, are permitted provided that the following conditions
8 are met:
10 Redistributions of source code must retain the above copyright
11 notice, this list of conditions and the following disclaimer.
13 Redistributions in binary form must reproduce the above
14 copyright notice, this list of conditions and the following
15 disclaimer in the documentation and/or other materials
16 provided with the distribution.
18 Neither the name of Finger Lakes Instrumentation (FLI), LLC
19 nor the names of its contributors may be used to endorse or
20 promote products derived from this software without specific
21 prior written permission.
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27 REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 POSSIBILITY OF SUCH DAMAGE.
36 ======================================================================
38 Finger Lakes Instrumentation, L.L.C. (FLI)
39 web: http://www.fli-cam.com
40 email: support@fli-cam.com
44 #ifndef _LIBFLI_CAMERA_PARPORT_H_
45 #define _LIBFLI_CAMERA_PARPORT_H_
47 /* Define command and data word formats */
48 #define C_ADDRESS(addr,ext) (0x8000|(((addr)<<8)&0x0f00)|((ext)&0x00ff))
49 #define C_RESTCFG(gain,chnl,exttrig,res) (0x9000|(((gain)<<8)&0x0f00)|(((chnl)<<5)&0x00e0)|(((exttrig)<<4)&0x0010)|(((res)&0x000f)))
50 #define C_SHUTTER(open,dmult) (0xa000|((dmult)&0x07ff)|(((open)<<11)&0x0800))
51 #define C_SEND(x) (0xb000|((x)&0x0fff))
52 #define C_FLUSH(x) (0xc000|((x)&0x0fff))
53 #define C_VSKIP(x) (0xd000|((x)&0x0fff))
54 #define C_HSKIP(x) (0xe000|((x)&0x0fff))
55 #define C_TEMP(x) (0xf000|((x)&0x0fff))
56 #define D_XROWOFF(x) (0x0000|((x)&0x0fff))
57 #define D_XROWWID(x) (0x1000|((x)&0x0fff))
58 #define D_XFLBIN(x) (0x2000|((x)&0x0fff))
59 #define D_YFLBIN(x) (0x3000|((x)&0x0fff))
60 #define D_XBIN(x) (0x4000|((x)&0x0fff))
61 #define D_YBIN(x) (0x5000|((x)&0x0fff))
62 #define D_EXPDUR(x) (0x6000|((x)&0x0fff))
63 #define D_RESERVE(x) (0x7000|((x)&0x0fff))
65 /* Define extended parameter fields for querying camera */
66 #define EPARAM_ECHO (0x00)
67 #define EPARAM_CCDID (0x01)
68 #define EPARAM_FIRM (0x02)
69 #define EPARAM_SNHIGH (0x03)
70 #define EPARAM_SNLOW (0x04)
71 #define EPARAM_SIGGAIN (0x05)
72 #define EPARAM_DEVICE (0x06)
74 /* I/O Bit definitions */
75 #define FLICCD_IO_P0 (0x01)
76 #define FLICCD_IO_P1 (0x02)
77 #define FLICCD_IO_P2 (0x04)
78 #define FLICCD_IO_P3 (0x08)
80 long fli_camera_parport_open(flidev_t dev);
81 long fli_camera_parport_get_array_area(flidev_t dev, long *ul_x, long *ul_y,
82 long *lr_x, long *lr_y);
83 long fli_camera_parport_get_visible_area(flidev_t dev, long *ul_x, long *ul_y,
84 long *lr_x, long *lr_y);
85 long fli_camera_parport_set_exposure_time(flidev_t dev, long exptime);
86 long fli_camera_parport_set_image_area(flidev_t dev, long ul_x, long ul_y,
87 long lr_x, long lr_y);
88 long fli_camera_parport_set_hbin(flidev_t dev, long hbin);
89 long fli_camera_parport_set_vbin(flidev_t dev, long vbin);
90 long fli_camera_parport_get_exposure_status(flidev_t dev, long *timeleft);
91 long fli_camera_parport_set_temperature(flidev_t dev, double temperature);
92 long fli_camera_parport_get_temperature(flidev_t dev, double *temperature);
93 long fli_camera_parport_grab_row(flidev_t dev, void *buf, size_t width);
94 long fli_camera_parport_expose_frame(flidev_t dev);
95 long fli_camera_parport_flush_rows(flidev_t dev, long rows, long repeat);
96 long fli_camera_parport_set_bit_depth(flidev_t dev, flibitdepth_t bitdepth);
97 long fli_camera_parport_read_ioport(flidev_t dev, long *ioportset);
98 long fli_camera_parport_write_ioport(flidev_t dev, long ioportset);
99 long fli_camera_parport_configure_ioport(flidev_t dev, long ioportset);
100 long fli_camera_parport_control_shutter(flidev_t dev, long shutter);
102 #endif /* _LIBFLI_CAMERA_PARPORT_H_ */