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 #ifndef __CCDMOD_H
00033 #define __CCDMOD_H
00034
00035
00036 #define CCD_MAJOR 240
00037 #define CCD_DEVFS_DIR "pcdsps"
00038 #define CCD_DEVICE_NAME "ccd"
00039 #define MODNAME "ccd: "
00040 #define MODID CCD_MODID_01
00041
00042 #define CCD_DEVICE_NAME "ccd"
00043
00044
00045
00046
00047
00048
00049 #define LPT1_BASE 0x378
00050 #define LPT2_BASE 0x278
00051 #define LPT3_BASE 0x3bc
00052
00053 typedef struct {
00054 unsigned long base;
00055 unsigned long basehi;
00056 short save_status;
00057 char save_mode;
00058 char save_ecmode;
00059 } ccd_parport;
00060
00061 #define PARP_DATA(p) (p->base+0x0)
00062 #define PARP_STATUS(p) (p->base+0x1)
00063 #define PARP_CONTROL(p) (p->base+0x2)
00064 #define PARP_ECPCONTROL(p) (p->basehi+0x2)
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076 #define CCD_MinWait 40
00077
00078 #define LPT_XOR (1 | 2 | 8)
00079
00080
00081
00082 #define CCD_Monitoring(p) outb_p(( 1 | 2 | 4 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00083 #define CCD_Move2Mem(p) outb_p(( 0 | 0 | 4 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00084 #define CCD_Sammeln(p) outb_p(( 0 | 2 | 4 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00085 #define CCD_Lesen(p) outb_p(( 1 | 0 | 0 | 8 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00086 #define CCD_Next(p) outb_p(( 1 | 0 | 0 | 0 | 0x20 )^LPT_XOR, PARP_CONTROL(p))
00087
00088 #define CCD_PixWert(p) inb_p(PARP_DATA(p))
00089
00090
00091 #define CCD_Xpixel 193 // Anzahl Pixel in X
00092 #define CCD_Ypixel 167 // Anzahl Pixel in Y
00093 #define CCD_dT 20 // 20ms Zeiteinheit
00094
00095
00096
00097 #define CCD_CMD_MONITORENABLE 1 // Monitor enable
00098 #define CCD_CMD_CLEAR 2 // clear ccd
00099 #define CCD_CMD_EXPOSURE 3 // do exposure cycle
00100 #define CCD_CMD_INITLESEN 4 // read pixelvalue and skip to next
00101 #define CCD_CMD_GETPIXEL 5 // read pixelvalue and skip to next
00102
00103
00104 #endif