00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef __CCDMOD_H
00034 #define __CCDMOD_H
00035
00036 #define MODNAME "ccd: "
00037 #define MODID CCD_MODID_01
00038
00039 #define CCD_DEVICE_NAME "/dev/ccd"
00040
00041
00042
00043
00044
00045
00046 #define LPT1_BASE 0x378
00047 #define LPT2_BASE 0x278
00048 #define LPT3_BASE 0x3bc
00049
00050 typedef struct {
00051 unsigned long base;
00052 unsigned long basehi;
00053 short save_status;
00054 char save_mode;
00055 char save_ecmode;
00056 } ccd_parport;
00057
00058 #define PARP_DATA(p) (p->base+0x0)
00059 #define PARP_STATUS(p) (p->base+0x1)
00060 #define PARP_CONTROL(p) (p->base+0x2)
00061 #define PARP_ECPCONTROL(p) (p->basehi+0x2)
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #define CCD_MinWait 40
00074
00075 #define LPT_XOR (1 | 2 | 8)
00076
00077
00078
00079 #define CCD_Monitoring(p) outb_p(( 1 | 2 | 4 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00080 #define CCD_Move2Mem(p) outb_p(( 0 | 0 | 4 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00081 #define CCD_Sammeln(p) outb_p(( 0 | 2 | 4 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00082 #define CCD_Lesen(p) outb_p(( 1 | 0 | 0 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00083 #define CCD_Next(p) outb_p(( 1 | 0 | 0 | 0 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00084
00085 #define CCD_PixWert(p) inb_p(PARP_DATA(p))
00086
00087
00088 #define CCD_Xpixel 193 // Anzahl Pixel in X
00089 #define CCD_Ypixel 167 // Anzahl Pixel in Y
00090 #define CCD_dT 20 // 20ms Zeiteinheit
00091
00092
00093
00094 #define CCD_CMD_MONITORENABLE 1 // Monitor enable
00095 #define CCD_CMD_CLEAR 2 // clear ccd
00096 #define CCD_CMD_EXPOSURE 3 // do exposure cycle
00097 #define CCD_CMD_INITLESEN 4 // read pixelvalue and skip to next
00098 #define CCD_CMD_GETPIXEL 5 // read pixelvalue and skip to next
00099
00100
00101 #endif