- Main Page
- Data Structures
- Files

# lcdc.h

Go to the documentation of this file.

    00001 /*This file has been prepared for Doxygen automatic documentation generation.*/
    00018 /* Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
    00019  *
    00020  * Redistribution and use in source and binary forms, with or without
    00021  * modification, are permitted provided that the following conditions are met:
    00022  *
    00023  * 1. Redistributions of source code must retain the above copyright notice,
    00024  * this list of conditions and the following disclaimer.
    00025  *
    00026  * 2. Redistributions in binary form must reproduce the above copyright notice,
    00027  * this list of conditions and the following disclaimer in the documentation
    00028  * and/or other materials provided with the distribution.
    00029  *
    00030  * 3. The name of ATMEL may not be used to endorse or promote products derived
    00031  * from this software without specific prior written permission.
    00032  *
    00033  * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
    00034  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    00035  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
    00036  * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT,
    00037  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    00038  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    00039  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00040  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    00041  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    00042  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    00043  */
    00044
    00045 #ifndef _AVR32_LCDC_H_
    00046 #define _AVR32_LCDC_H_
    00047
    00048 #ifdef __GNUC__
    00049 #include <avr32/io.h>
    00050 #elif __ICCAVR32__
    00051 #include <avr32/ioap7000.h>
    00052 #else
    00053 #error No known compiler used
    00054 #endif
    00055
    00058 typedef struct lcdc_configuration_s{
    00060   unsigned int dmabaddr1;
    00062   unsigned int dmabaddr2;
    00064   unsigned char burst_length;
    00066   unsigned short  xres;
    00068   unsigned short  yres;
    00069
    00076   unsigned char set2dmode;
    00077
    00081   unsigned int virtual_xres;
    00082
    00086   unsigned int virtual_yres;
    00087
    00089   unsigned short frame_rate;
    00090
    00095   unsigned int lcdcclock;
    00096
    00098   unsigned short guard_time;
    00099
    00100   /* LCD configuration register 2 */
    00106   unsigned char  memor;
    00107
    00113   unsigned char  ifwidth;
    00118   unsigned char  scanmod;
    00124   unsigned char  distype;
    00129   unsigned char   invvd;
    00130
    00135   unsigned char   invframe;
    00136
    00141   unsigned char   invline;
    00146   unsigned char  invclk;
    00147
    00152   unsigned char invdval;
    00153
    00158   unsigned char  clkmod;
    00159
    00169   unsigned char pixelsize;
    00170
    00175   unsigned char ctrstval;
    00176
    00184   unsigned char ctrst_ps;
    00185
    00193   unsigned char ctrst_pol;
    00194
    00199   unsigned char ctrst_ena;
    00200
    00206   unsigned char mmode;
    00207
    00213   unsigned char mval;
    00214
    00218   unsigned short  hpw;
    00219
    00223   unsigned char hbp;    /* Wait before of line */
    00224
    00228   unsigned char  hfp;    /* Wait end of line */
    00229
    00234   unsigned char  vpw;
    00235
    00239   unsigned char  vbp;    /* Wait before of frame */
    00240
    00244   unsigned char  vfp;    /* Wait end of frame */
    00245
    00250   unsigned char vhdly;
    00251
    00252 } lcdc_conf_t;
    00253
    00254 #define LCDC_STN_MONO 0
    00255 #define LCDC_STN_COLOR 1
    00256 #define LCDC_TFT 2
    00257
    00258 #define LCDC_SINGLE_SCAN 0
    00259 #define LCDC_DUAL_SCAN 1
    00260
    00261 #define LCDC_IF_WIDTH4 0
    00262 #define LCDC_IF_WIDTH8 1
    00263 #define LCDC_IF_WIDTH16 2
    00264
    00265 #define LCDC_BIG_ENDIAN 0
    00266 #define LCDC_LITTLE_ENDIAN 1
    00267 #define LCDC_WIN_CE 2
    00268
    00269 #define LCDC_MODE_2D_ON 1
    00270 #define LCDC_MODE_2D_OFF 0
    00271
    00272 #define LCDC_BPP_1 1
    00273 #define LCDC_BPP_2 2
    00274 #define LCDC_BPP_4 4
    00275 #define LCDC_BPP_8 8
    00276 #define LCDC_BPP_16 16
    00277 #define LCDC_BPP_24 24
    00278 #define LCDC_BPP_32 32
    00279
    00280 #define LCDC_NORMAL 0
    00281 #define LCDC_INVERTED 1
    00282
    00283 #define LCDC_ENABLED 1
    00284 #define LCDC_DISABLED 0
    00285
    00286 #define LCDC_PRE_NONE 0
    00287 #define LCDC_PRE_HALF 1
    00288 #define LCDC_PRE_FOURTH 2
    00289 #define LCDC_PRE_EIGTH 3
    00290
    00291 #define LCDC_PARTLY_ACTIVE 0
    00292 #define LCDC_ALWAYS_ACTIVE 1
    00293
    00294 #define LCDC_EACH_FRAME 0
    00295 #define LCDC_MVAL_DEFINED 1
    00296
    00306 extern int lcdc_init (lcdc_conf_t* lcdc_conf);
    00307
    00308 #endif // _AVR32_LCDC_H_