Landtiger (LPC1768) graphics LCD demo.

Dependencies:   Tiger_LCD mbed

Dependents:   Tiger_LCD

See here for more info.

Committer:
wim
Date:
Sun Nov 04 16:49:27 2012 +0000
Revision:
0:a8090b59eb05
Child:
2:43ede88fb5a3
werkende versie, logo flipped, text flipped

Who changed what in which revision?

UserRevisionLine numberNew contents of line
wim 0:a8090b59eb05 1 /******************************************************************************/
wim 0:a8090b59eb05 2 /* GLCD.h: Graphic LCD function prototypes and defines */
wim 0:a8090b59eb05 3 /******************************************************************************/
wim 0:a8090b59eb05 4 /* This file is part of the uVision/ARM development tools. */
wim 0:a8090b59eb05 5 /* Copyright (c) 2005-2009 Keil Software. All rights reserved. */
wim 0:a8090b59eb05 6 /* This software may only be used under the terms of a valid, current, */
wim 0:a8090b59eb05 7 /* end user licence from KEIL for a compatible version of KEIL software */
wim 0:a8090b59eb05 8 /* development tools. Nothing else gives you the right to use this software. */
wim 0:a8090b59eb05 9 /******************************************************************************/
wim 0:a8090b59eb05 10
wim 0:a8090b59eb05 11 #ifndef _GLCD_H
wim 0:a8090b59eb05 12 #define _GLCD_H
wim 0:a8090b59eb05 13
wim 0:a8090b59eb05 14 /*------------------------------------------------------------------------------
wim 0:a8090b59eb05 15 Color coding
wim 0:a8090b59eb05 16 GLCD is coded: 15..11 red, 10..5 green, 4..0 blue (unsigned short) GLCD_R5, GLCD_G6, GLCD_B5
wim 0:a8090b59eb05 17 original coding: 17..12 red, 11..6 green, 5..0 blue ORG_R6, ORG_G6, ORG_B6
wim 0:a8090b59eb05 18
wim 0:a8090b59eb05 19 ORG_R1..5 = GLCD_R0..4, ORG_R0 = GLCD_R4
wim 0:a8090b59eb05 20 ORG_G0..5 = GLCD_G0..5,
wim 0:a8090b59eb05 21 ORG_B1..5 = GLCD_B0..4, ORG_B0 = GLCD_B4
wim 0:a8090b59eb05 22 *----------------------------------------------------------------------------*/
wim 0:a8090b59eb05 23
wim 0:a8090b59eb05 24 /* GLCD RGB color definitions */
wim 0:a8090b59eb05 25 #define Black 0x0000 /* 0, 0, 0 */
wim 0:a8090b59eb05 26 #define Navy 0x000F /* 0, 0, 128 */
wim 0:a8090b59eb05 27 #define DarkGreen 0x03E0 /* 0, 128, 0 */
wim 0:a8090b59eb05 28 #define DarkCyan 0x03EF /* 0, 128, 128 */
wim 0:a8090b59eb05 29 #define Maroon 0x7800 /* 128, 0, 0 */
wim 0:a8090b59eb05 30 #define Purple 0x780F /* 128, 0, 128 */
wim 0:a8090b59eb05 31 #define Olive 0x7BE0 /* 128, 128, 0 */
wim 0:a8090b59eb05 32 #define LightGrey 0xC618 /* 192, 192, 192 */
wim 0:a8090b59eb05 33 #define DarkGrey 0x7BEF /* 128, 128, 128 */
wim 0:a8090b59eb05 34 #define Blue 0x001F /* 0, 0, 255 */
wim 0:a8090b59eb05 35 #define Green 0x07E0 /* 0, 255, 0 */
wim 0:a8090b59eb05 36 #define Cyan 0x07FF /* 0, 255, 255 */
wim 0:a8090b59eb05 37 #define Red 0xF800 /* 255, 0, 0 */
wim 0:a8090b59eb05 38 #define Magenta 0xF81F /* 255, 0, 255 */
wim 0:a8090b59eb05 39 #define Yellow 0xFFE0 /* 255, 255, 0 */
wim 0:a8090b59eb05 40 #define White 0xFFFF /* 255, 255, 255 */
wim 0:a8090b59eb05 41
wim 0:a8090b59eb05 42 #define HX8347D_ID 0x0047
wim 0:a8090b59eb05 43 #define HX8347A_ID 0x0047
wim 0:a8090b59eb05 44 #define ILI9320_ID 0x9320
wim 0:a8090b59eb05 45 #define ILI9325_ID 0x9325
wim 0:a8090b59eb05 46 //#define ILI9328_ID   0x9328
wim 0:a8090b59eb05 47 #define testje 0x9328
wim 0:a8090b59eb05 48 #define ILI9328_ID 0x9328
wim 0:a8090b59eb05 49 #define ILI9331_ID 0x9331
wim 0:a8090b59eb05 50 #define LGDP4531_ID 0x4531
wim 0:a8090b59eb05 51 #define LGDP4535_ID 0x4535
wim 0:a8090b59eb05 52 #define R61505U_ID1 0x1505
wim 0:a8090b59eb05 53 #define R61505U_ID2 0x0505
wim 0:a8090b59eb05 54 #define SPFD5408B_ID 0x5408
wim 0:a8090b59eb05 55 #define SSD1289_ID 0x8989
wim 0:a8090b59eb05 56 #define SSD1298_ID 0x8999
wim 0:a8090b59eb05 57 #define SSD2119_ID 0x9919
wim 0:a8090b59eb05 58 #define ST7781_ID 0x7783
wim 0:a8090b59eb05 59
wim 0:a8090b59eb05 60 // GLCD Controlled IDs
wim 0:a8090b59eb05 61
wim 0:a8090b59eb05 62 /* GLCD Exported functions */
wim 0:a8090b59eb05 63 extern void GLCD_Init (void);
wim 0:a8090b59eb05 64 extern unsigned short GLCD_DriverCode ();
wim 0:a8090b59eb05 65 extern void GLCD_WindowMax (void);
wim 0:a8090b59eb05 66 extern void GLCD_PutPixel (unsigned int x, unsigned int y);
wim 0:a8090b59eb05 67 extern void GLCD_SetTextColor (unsigned short color);
wim 0:a8090b59eb05 68 extern void GLCD_SetBackColor (unsigned short color);
wim 0:a8090b59eb05 69 extern void GLCD_Clear (unsigned short color);
wim 0:a8090b59eb05 70 extern void GLCD_DrawChar (unsigned int x, unsigned int y, unsigned short *c);
wim 0:a8090b59eb05 71 extern void GLCD_DisplayChar (unsigned int ln, unsigned int col, unsigned char c);
wim 0:a8090b59eb05 72 extern void GLCD_DisplayString (unsigned int ln, unsigned int col, unsigned char *s);
wim 0:a8090b59eb05 73 extern void GLCD_ClearLn (unsigned int ln);
wim 0:a8090b59eb05 74 extern void GLCD_Bargraph (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned int val);
wim 0:a8090b59eb05 75 extern void GLCD_Bitmap (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *bitmap);
wim 0:a8090b59eb05 76 extern void GLCD_Bmp (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *bmp);
wim 0:a8090b59eb05 77
wim 0:a8090b59eb05 78 extern void GLCD_drawHLine (int x, int y, int l);
wim 0:a8090b59eb05 79 extern void GLCD_drawVLine (int x, int y, int l);
wim 0:a8090b59eb05 80 extern void GLCD_drawRect (int x1, int y1, int x2, int y2);
wim 0:a8090b59eb05 81
wim 0:a8090b59eb05 82 #endif /* _GLCD_H */