Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

po1030.h

Go to the documentation of this file.
00001 /*! \file po1030.h \brief PO1030 Imager Interface Driver. */
00002 //*****************************************************************************
00003 //
00004 // File Name    : 'po1030.h'
00005 // Title        : PO1030 Imager Interface Driver
00006 // Author       : Pascal Stang - Copyright (C) 2006
00007 // Created      : 2006.02.01
00008 // Revised      : 2006.02.01
00009 // Version      : 0.1
00010 // Target MCU   : ARM processors
00011 // Editor Tabs  : 4
00012 //
00013 // NOTE: This code is currently below version 1.0, and therefore is considered
00014 // to be lacking in some functionality or documentation, or may not be fully
00015 // tested.  Nonetheless, you can expect most functions to work.
00016 //
00017 // This code is distributed under the GNU Public License
00018 //      which can be found at http://www.gnu.org/licenses/gpl.txt
00019 //
00020 //*****************************************************************************
00021 
00022 #ifndef PO1030_H
00023 #define PO1030_H
00024 
00025 // device base address
00026 #define PO1030_I2C_BASE_ADDR    0x6E
00027 
00028 // if addr bit7 set, indicates word register (16-bit)
00029 #define PO1030_REG_MASK             0x7F
00030 #define PO1030_REG_16BIT            0x80
00031 
00032 // register defines
00033 #define PO1030_REG_DEVID            (0x00|PO1030_REG_16BIT)
00034 
00035 #define PO1030_REG_FRAMEWIDTH       (0x04|PO1030_REG_16BIT)
00036 #define PO1030_REG_FRAMEHEIGHT      (0x06|PO1030_REG_16BIT)
00037 #define PO1030_REG_WINDOWX          (0x08|PO1030_REG_16BIT)
00038 #define PO1030_REG_WINDOWY          (0x0A|PO1030_REG_16BIT)
00039 #define PO1030_REG_WINDOWWIDTH      (0x0C|PO1030_REG_16BIT)
00040 #define PO1030_REG_WINDOWHIEGHT     (0x0E|PO1030_REG_16BIT)
00041 
00042 #define PO1030_REG_GLOBALIBIAS      (0x12)
00043 #define PO1030_REG_PIXELIBIAS       (0x13)
00044 #define PO1030_REG_GLOBALGAIN       (0x15)
00045 
00046 #define PO1030_REG_RGAIN            (0x16)
00047 #define PO1030_REG_G1GAIN           (0x17)
00048 #define PO1030_REG_BGAIN            (0x18)
00049 #define PO1030_REG_G2GAIN           (0x19)
00050 
00051 #define PO1030_REG_INTEGLINESH      (0x1A)
00052 #define PO1030_REG_INTEGLINESM      (0x1B)
00053 #define PO1030_REG_INTEGLINESL      (0x1C)
00054 
00055 #define PO1030_REG_CONTROL1         (0x1D)
00056 #define PO1030_REG_CONTROL2         (0x1E)
00057 #define PO1030_REG_CONTROL3         (0x1F)
00058 #define PO1030_REG_CONTROL4         (0x20)
00059 
00060 #define PO1030_REG_PERIOD50         (0x23|PO1030_REG_16BIT)
00061 #define PO1030_REG_PERIOD60         (0x25|PO1030_REG_16BIT)
00062 #define PO1030_REG_REGCLK167        (0x27)
00063 #define PO1030_REG_DELTA50          (0x28)
00064 #define PO1030_REG_DELTA60          (0x29)
00065 
00066 #define PO1030_REG_ADCOFFSET        (0x2C)
00067 // Gamma Correction Coeffs
00068 #define PO1030_REG_GC0              (0x2D)
00069 #define PO1030_REG_GC1              (0x2E)
00070 #define PO1030_REG_GC2              (0x2F)
00071 #define PO1030_REG_GC3              (0x30)
00072 #define PO1030_REG_GC4              (0x31)
00073 #define PO1030_REG_GC5              (0x32)
00074 #define PO1030_REG_GC6              (0x33)
00075 #define PO1030_REG_GC7              (0x34)
00076 // Color Transform Matrix
00077 #define PO1030_REG_CT0              (0x35)
00078 #define PO1030_REG_CT1              (0x36)
00079 #define PO1030_REG_CT2              (0x37)
00080 #define PO1030_REG_CT3              (0x38)
00081 #define PO1030_REG_CT4              (0x39)
00082 #define PO1030_REG_CT5              (0x3A)
00083 #define PO1030_REG_CT6              (0x3B)
00084 #define PO1030_REG_CT7              (0x3C)
00085 #define PO1030_REG_CT8              (0x3D)
00086 
00087 #define PO1030_REG_AUTOCTRL1        (0x3E)
00088 #define PO1030_REG_AUTOCTRL2        (0x3F)
00089 
00090 #define PO1030_REG_YTARGET          (0x40)
00091 #define PO1030_REG_GLOBALGAINMIN    (0x41)
00092 #define PO1030_REG_GLOBALGAINMAX    (0x42)
00093 // Cutput format control
00094 #define PO1030_REG_OUTFORMCTRL1     (0x5A)
00095 #define PO1030_REG_OUTFORMCTRL2     (0x5B)
00096 #define PO1030_REG_OUTFORMCTRL3     (0x5C)
00097 #define PO1030_REG_OUTFORMCTRL4     (0x5D)
00098 #define PO1030_REG_OUTFORMCTRL5     (0x5E)
00099 // Imaging coefficients
00100 #define PO1030_REG_YBRIGHT          (0x73)
00101 #define PO1030_REG_YCONTRAST        (0x74)
00102 #define PO1030_REG_YSATURATION      (0x75)
00103 
00104 
00105 // functions
00106 
00107 // PO1030 interface initializer
00108 void po1030Init(void);
00109 
00110 u16 po1030GetID(void);
00111 
00112 // read/write register
00113 u16 po1030RegRead(u08 regaddr);
00114 void po1030RegWrite(u08 regaddr, u16 value);
00115 
00116 #endif

Generated on Mon Nov 6 23:36:59 2006 for Procyon ARMlib by  doxygen 1.4.2