os/linux-2.6-tag--devboard-R2_10-4/include/asm-cris/elphel/autoexp.h

Go to the documentation of this file.
00001 #ifndef __H_AUTOEXP__
00002 #define __H_AUTOEXP__
00003 
00004 #define AUTOEXP_DEV_NAME        "/dev/autoexp"
00005 
00006 #define TABLES_LEN      8192
00007 
00008 #define OFFSET_HIST_C   (4096 + 256 * 6 * 2)
00009 #define OFFSET_GAMMA_C  (OFFSET_HIST_C + 4)
00010 
00011 #define IOC_AUTOEXP_SET                 0x01
00012 #define IOC_AUTOEXP_GET                 0x02
00013 #define IOC_AUTOEXP_GET_LOG             0x03
00014 #define IOC_AUTOEXP_GAMMA_TABLE 0x10
00015 
00016 #ifndef HIST_NOT_CHANGE
00017 #define HIST_NOT_CHANGE 0xFFFF
00018 #endif
00020 #if 0
00021 struct autoexp_t {
00022         unsigned long on;
00023         /*
00024          * in percents: 1 == 1, 100 == 100
00025          */
00026         unsigned long width;
00027         unsigned long height;
00028         unsigned long left;
00029         unsigned long top;
00030         /*
00031          * start exposure time really not needed...
00032          */
00033         unsigned long exp_max;          /* 100 usec == 1 etc... */
00034         unsigned long overexp_max;      /* percentages for overexposured pixels - 1% == 100, 5% == 500, 0.02% == 2 etc... */
00035         /*
00036          * changed chema - balance exposition for set percent of pixels in needed index
00037          */
00038         unsigned long s_percent;
00039         unsigned long s_index;
00040         /*
00041          * return current state
00042          */
00043         unsigned long exp;
00044         /*
00045          * "sleep" settings
00046          */
00047         unsigned long skip_pmin;        /* percent of delta for skip changes: 1% == 100 */
00048         unsigned long skip_pmax;        /* percent of changes for wait one frame before apply changes: 1% == 100 */
00049         unsigned long skip_t;           /* time for skip changes: 100 usec == 1 */
00050 };
00051 #endif
00052 #define LOG_C   200
00053 //#define LOG_C 11
00054 
00055 struct autoexp_log_t {
00056         unsigned long tv_sec;           /* time of log (fill in driver) */
00057         unsigned long tv_usec;
00058         unsigned long s_index;          /* requested in settings index */
00059         unsigned long s_percent;        /* requested percent for s_index */
00060         unsigned long n_index;          /* searched new index with needed percent - if 0 - index not searched, and use linear scale */
00061         unsigned long n_percent;        /* percent in searched index */
00062         unsigned long t_scale;          /* scale of exposition - in FFFF.FFFF fixed point format */
00063         unsigned long t_value;          /* new time, requested for sensor - w/o real correction, in 0.1ms scale (1ms == 10 etc...) */
00064 };      /* 8 * 4 == 32 bytes in record... */
00065 
00066 #endif  // __H_AUTOEXP__

Generated on Fri Nov 28 00:06:24 2008 for elphel by  doxygen 1.5.1