/* -------------------------------------------------------------------------- */
/* -                 Astronomical CCD Camera Control                        - */
/* -                 SBIG Camera Protocol Header File                       - */
/* -------------------------------------------------------------------------- */
/*                                                                            */
/* Copyright 2004-2014 John Kielkopf                                          */
/* kielkopf@louisville.edu                                                    */
/*                                                                            */
/* This file is part of XmCCD.                                                */
/*                                                                            */
/* Date: May 30, 2014                                                         */
/* Version 5.0                                                                */


/* Defined constants and prototypes for SBIG cameras */
/* Note assumed systemwide installation of SBIG library and header */

#include <sbigudrv.h>

/* Needed for ethernet support */
/* Default hex ip address */

#define CCD_ETH  0xc0a80001 

/* Define camera types for our own use */

#define NO_CAMERA  0xFFFF
#define SIM_CAMERA 0xFFFE
#define SBIG_STL   0xFFFB
#define SBIG_ST10  0xFFFA
#define SBIG_ST9   0xFFF9
#define SBIG_ST8   0xFFF8
#define SBIG_ST7   0xFFF7
#define SBIG       0xFFF0
#define APOGEE     0xFFE0

/* Self tracking support has been removed from this version of xmccd */

/* Device status flags */

#define IDLE 0
#define INTEGRATING 1
#define COMPLETE 2

/* Filter wheel support */

#ifndef NO_FILTER_WHEEL
#define NO_FILTER_WHEEL 0xFFFF
#define EXT_FILTER_WHEEL 0xFFFE
#endif


/* Set the filter wheel here                                               */
/* For SBIG set CFWSEL_CFW8, CFWSEL_CFW10, CFWSEL_CFWL, or CFWSEL_CFWL8    */
/* Use SBIG CFWSEL_AUTO if you feel lucky today                            */
/* If no filter wheel is present then use NO_FILTERWHEEL defined here      */
/* Note that CFWSEL_CFWL8 is new and may not work with this library        */
/* In principle other manufacturers filter wheels could be designated here */
/*   and supported within the filter routines of protocol.c                */
/* FILTER_MAX should match the choice of filter wheel type                 */
/* FILTER_START is the default startup setting                             */
/* For consistency set both to 1 if NO_FILTERWHEEL on this camera          */
/* Filter labels are set in the calling routine                            */


/* Set fixed optional binning */
/* Valid 1, 2, or 3 but may depend on SBIG hardware support                */

#ifndef BINNING
#define BINNING 1
#endif

/* Use these for an STX camera with a SBIG filter wheel attached */

#ifndef FILTER_WHEEL
#define FILTER_WHEEL CFWSEL_AUTO
#define FILTER_START 1
#define FILTER_MAX 7
#endif



/* Use these for an SBIG camera without a filter wheel                     */

//#ifndef FILTER_WHEEL
//#define FILTER_WHEEL NO_FILTER_WHEEL 
//#define FILTER_START 1		   
//#define FILTER_MAX 1  		  
//#endif

/* Use these for an STL camera with built-in filter wheel */

//#ifndef FILTER_WHEEL
//#define FILTER_WHEEL CFWSEL_CFWL
//#define FILTER_START 3
//#define FILTER_MAX 5
//#endif

/* Use these for an ST10 camera with CFW10 filter wheel */

//#ifndef FILTER_WHEEL
//#define FILTER_WHEEL CFWSEL_CFW10
//#define FILTER_START 3  		 
//#define FILTER_MAX 10
//#endif

/* Use these for an SBIG camera with an external filter wheel */

//#ifndef FILTER_WHEEL
//#define FILTER_WHEEL  EXT_FILTER_WHEEL 
//#define FILTER_START 1                   
//#define FILTER_MAX 6                    
//#endif

/* Adaptive optics suport */

#define NO_AO     0 
#define AO_STL    1
#define ADAPTIVE_OPTICS   AO_STL

/* Shutter flags */

#define LEAVE    0
#define OPEN     1
#define CLOSED   2

/* Frame type */

#define DARK             0     
#define LIGHT            1 
#define BIAS             2  
#define FLAT             3  

/* Supported devices */

#define USB              0
#define ETH              1

