VSF Documented
GLCD_Config.h
Go to the documentation of this file.
1/*-----------------------------------------------------------------------------
2 * Name: GLCD_Config.h
3 * Purpose: Graphic LCD interface configuration file for SAM4E-EK evaluation board
4 * Rev.: 1.0.0
5 *----------------------------------------------------------------------------*/
6
7/* Copyright (c) 2013 - 2017 ARM LIMITED
8
9 All rights reserved.
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
12 - Redistributions of source code must retain the above copyright
13 notice, this list of conditions and the following disclaimer.
14 - Redistributions in binary form must reproduce the above copyright
15 notice, this list of conditions and the following disclaimer in the
16 documentation and/or other materials provided with the distribution.
17 - Neither the name of ARM nor the names of its contributors may be used
18 to endorse or promote products derived from this software without
19 specific prior written permission.
20 *
21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 POSSIBILITY OF SUCH DAMAGE.
32 ---------------------------------------------------------------------------*/
33
34#ifndef __GLCD_CONFIG_H
35#define __GLCD_CONFIG_H
36
37/*---------------------- Graphic LCD orientation configuration ---------------*/
38#ifndef GLCD_MIRROR_X
39#define GLCD_MIRROR_X 0 /* Mirror X axis = 1:yes, 0:no */
40#endif
41#ifndef GLCD_MIRROR_Y
42#define GLCD_MIRROR_Y 1 /* Mirror Y axis = 1:yes, 0:no */
43#endif
44#ifndef GLCD_SWAP_XY
45#define GLCD_SWAP_XY 1 /* Swap X&Y axis = 1:yes, 0:no */
46#endif
47
48/*---------------------- Graphic LCD physical definitions --------------------*/
49#define GLCD_SIZE_X 240 /* Screen size X (in pixels) */
50#define GLCD_SIZE_Y 320 /* Screen size Y (in pixels) */
51#define GLCD_BPP 16 /* Bits per pixel */
52
53#if (GLCD_SWAP_XY)
54#define GLCD_WIDTH GLCD_SIZE_Y /* Screen Width (in pixels) */
55#define GLCD_HEIGHT GLCD_SIZE_X /* Screen Height (in pixels) */
56#else
57#define GLCD_WIDTH GLCD_SIZE_X /* Screen Width (in pixels) */
58#define GLCD_HEIGHT GLCD_SIZE_Y /* Screen Height (in pixels) */
59#endif
60
61/*---------------------- Graphic LCD color definitions -----------------------*/
62/* Color coding (16-bit):
63 15..11 = R4..0 (Red)
64 10..5 = G5..0 (Green)
65 4..0 = B4..0 (Blue)
66*/
67
68/* GLCD RGB color definitions */
69#define GLCD_COLOR_BLACK 0x0000 /* 0, 0, 0 */
70#define GLCD_COLOR_NAVY 0x000F /* 0, 0, 128 */
71#define GLCD_COLOR_DARK_GREEN 0x03E0 /* 0, 128, 0 */
72#define GLCD_COLOR_DARK_CYAN 0x03EF /* 0, 128, 128 */
73#define GLCD_COLOR_MAROON 0x7800 /* 128, 0, 0 */
74#define GLCD_COLOR_PURPLE 0x780F /* 128, 0, 128 */
75#define GLCD_COLOR_OLIVE 0x7BE0 /* 128, 128, 0 */
76#define GLCD_COLOR_LIGHT_GREY 0xC618 /* 192, 192, 192 */
77#define GLCD_COLOR_DARK_GREY 0x7BEF /* 128, 128, 128 */
78#define GLCD_COLOR_BLUE 0x001F /* 0, 0, 255 */
79#define GLCD_COLOR_GREEN 0x07E0 /* 0, 255, 0 */
80#define GLCD_COLOR_CYAN 0x07FF /* 0, 255, 255 */
81#define GLCD_COLOR_RED 0xF800 /* 255, 0, 0 */
82#define GLCD_COLOR_MAGENTA 0xF81F /* 255, 0, 255 */
83#define GLCD_COLOR_YELLOW 0xFFE0 /* 255, 255, 0 */
84#define GLCD_COLOR_WHITE 0xFFFF /* 255, 255, 255 */
85
86#endif /* __GLCD_CONFIG_H */