#ifndef _ccdcam_h #define _ccdcam_h /* Generic CCD camera interface */ /* ioctl commands */ #define CPREFIX (('c' << 16) | ('A' << 8)) #define CCD_TRACE (CPREFIX|1) /* arg = 1 driver trace on, 0 off */ #define CCD_SET_EXPO (CPREFIX|10) /* arg = &CCDExpoParams */ #define CCD_SET_TEMP (CPREFIX|11) /* arg = &CCDTemp */ #define CCD_GET_TEMP (CPREFIX|20) /* arg = &CCDTemp */ #define CCD_GET_SIZE (CPREFIX|21) /* arg = &CCDExpoParams, sw/sh/bx/by */ #define CCD_GET_ID (CPREFIX|22) /* arg = buffer to fill w/id string */ #define CCD_GET_DUMP (CPREFIX|255) /* get reg dump -- camera specific */ /* temperature info. * used for both CCD_SET_TEMP and CCD_GET_TEMP */ typedef enum { CCDTS_ERR, /* temp controller error -- first so default is err */ CCDTS_AT, /* temp = target (+/- 1 degree) */ CCDTS_UNDER, /* temp < target */ CCDTS_OVER, /* temp > target */ CCDTS_OFF, /* turn off temperature controller */ CCDTS_RDN, /* temp is ramping down to target */ CCDTS_RUP, /* temp is ramping up to ambient */ CCDTS_STUCK, /* temp is stuck (can't reach target) */ CCDTS_MAX, /* temp cannot go any higher */ CCDTS_AMB, /* temp is at ambient, cooler idle */ CCDTS_SET, /* only used with CCD_SET_TEMP */ } CCDTempStatus; typedef struct { CCDTempStatus s; /* status (only used by CCD_GET_TEMP) */ int t; /* desired or current temp, degrees C */ } CCDTempInfo; /* exposure parameters */ typedef struct { int bx, by; /* x and y binning */ int sx, sy, sw, sh; /* subimage upper left location and size */ int duration; /* ms to expose */ int shutter; /* whether to open the shutter during the exposure. */ } CCDExpoParams; #ifndef __KERNEL__ /* these are handy wrappers over the driver calls, if you want to go that * route, in ccdcamera.c. */ extern int setExpCCD (CCDExpoParams *expP, char *errmsg); extern int startExpCCD (char *errmsg); extern void abortExpCCD (void); extern int selectHandleCCD (char *errmsg); extern int readPixelNBCCD (char *mem, int nbytes, char *errmsg); extern int readPixelCCD (char *mem, int nbytes, char *errmsg); extern int setTempCCD (CCDTempInfo *tp, char *errmsg); extern int getTempCCD (CCDTempInfo *tp, char *errmsg); extern int getIDCCD (char buf[], char *errmsg); extern int getSizeCCD (CCDExpoParams *cep, char *errmsg); extern void setPathCCD (char *path); #endif /* __KERNEL__ */ #endif /* _ccdcam_h */