1 /* ----------------------------------------------------------------------------
\r
2 * ATMEL Microcontroller Software Support
\r
3 * ----------------------------------------------------------------------------
\r
4 * Copyright (c) 2008, Atmel Corporation
\r
6 * All rights reserved.
\r
8 * Redistribution and use in source and binary forms, with or without
\r
9 * modification, are permitted provided that the following conditions are met:
\r
11 * - Redistributions of source code must retain the above copyright notice,
\r
12 * this list of conditions and the disclaimer below.
\r
14 * Atmel's name may not be used to endorse or promote products derived from
\r
15 * this software without specific prior written permission.
\r
17 * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
\r
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
\r
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
\r
20 * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
\r
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
\r
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
\r
23 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
\r
24 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
\r
25 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
\r
26 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\r
27 * ----------------------------------------------------------------------------
\r
30 //------------------------------------------------------------------------------
\r
35 /// Interface for configuration the LCD Controller (LCDC) peripheral.
\r
39 /// -# Decode the RGB file to designated buffer using LCD_DecodeRGB().
\r
40 /// -# Sets the address of the frame buffer in the LCD controller DMA using
\r
41 /// LCD_SetFrameBufferAddress().
\r
42 /// -# LCD Configuration functions prefixed with "LCD_Set" refer to
\r
43 /// the functions in the #Overview# tab.
\r
45 /// Please refer to the list of functions in the #Overview# tab of this unit
\r
46 /// for more detailed information.
\r
47 //------------------------------------------------------------------------------
\r
52 //------------------------------------------------------------------------------
\r
53 // Exported functions
\r
54 //------------------------------------------------------------------------------
\r
56 extern void LCD_Enable(unsigned int frames);
\r
58 extern void LCD_Disable(unsigned int frames);
\r
60 extern void LCD_EnableDma(void);
\r
62 extern void LCD_DisableDma(void);
\r
64 extern void LCD_EnableInterrupts(unsigned int sources);
\r
66 extern void LCD_SetPixelClock(unsigned int masterClock, unsigned int pixelClock);
\r
68 extern void LCD_SetDisplayType(unsigned int displayType);
\r
70 extern void LCD_SetScanMode(unsigned int scanMode);
\r
72 extern void LCD_SetBitsPerPixel(unsigned int bitsPerPixel);
\r
74 extern void LCD_SetPolarities(
\r
76 unsigned int lcdvsync,
\r
77 unsigned int lcdhsync,
\r
78 unsigned int lcddotclk,
\r
79 unsigned int lcdden);
\r
81 extern void LCD_SetClockMode(unsigned int clockMode);
\r
83 extern void LCD_SetMemoryFormat(unsigned int format);
\r
85 extern void LCD_SetSize(unsigned int width, unsigned int height);
\r
87 extern void LCD_SetVerticalTimings(
\r
91 unsigned int vhdly);
\r
93 extern void LCD_SetHorizontalTimings(
\r
98 extern void* LCD_SetFrameBufferAddress(void *address);
\r
100 extern void LCD_SetFrameSize(unsigned int frameSize);
\r
102 extern void LCD_SetBurstLength(unsigned int burstLength);
\r
104 extern void LCD_SetContrastPrescaler(unsigned int prescaler);
\r
106 extern void LCD_SetContrastPolarity(unsigned int polarity);
\r
108 extern void LCD_SetContrastValue(unsigned int value);
\r
110 extern void LCD_EnableContrast(void);
\r
112 extern void LCD_SetPixelClock(unsigned int masterClock, unsigned int pixelClock);
\r
114 extern void LCD_DMAReset(void);
\r
116 extern void LCD_DecodeRGB(
\r
117 unsigned char *file,
\r
118 unsigned char *bufferLCD,
\r
119 unsigned int width,
\r
120 unsigned int height,
\r
121 unsigned char bpp);
\r
123 #endif //#ifndef LCD_H
\r