display control QVGA TFT MCB1700 KEIL
GLCD_MCB1700.h@1:0ae206eb6e55, 2015-02-13 (annotated)
- Committer:
- fblanc
- Date:
- Fri Feb 13 14:33:27 2015 +0000
- Revision:
- 1:0ae206eb6e55
- Parent:
- 0:b96b9110daf9
bug 2 main() ?
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
fblanc | 0:b96b9110daf9 | 1 | /******************************************************************************/ |
fblanc | 0:b96b9110daf9 | 2 | /* GLCD.h: Graphic LCD function prototypes and defines */ |
fblanc | 0:b96b9110daf9 | 3 | /******************************************************************************/ |
fblanc | 0:b96b9110daf9 | 4 | /* This file is part of the uVision/ARM development tools. */ |
fblanc | 0:b96b9110daf9 | 5 | /* Copyright (c) 2005-2009 Keil Software. All rights reserved. */ |
fblanc | 0:b96b9110daf9 | 6 | /* This software may only be used under the terms of a valid, current, */ |
fblanc | 0:b96b9110daf9 | 7 | /* end user licence from KEIL for a compatible version of KEIL software */ |
fblanc | 0:b96b9110daf9 | 8 | /* development tools. Nothing else gives you the right to use this software. */ |
fblanc | 0:b96b9110daf9 | 9 | /******************************************************************************/ |
fblanc | 0:b96b9110daf9 | 10 | |
fblanc | 0:b96b9110daf9 | 11 | #ifndef _GLCD_H |
fblanc | 0:b96b9110daf9 | 12 | #define _GLCD_H |
fblanc | 0:b96b9110daf9 | 13 | |
fblanc | 0:b96b9110daf9 | 14 | /*------------------------------------------------------------------------------ |
fblanc | 0:b96b9110daf9 | 15 | Color coding |
fblanc | 0:b96b9110daf9 | 16 | GLCD is coded: 15..11 red, 10..5 green, 4..0 blue (unsigned short) GLCD_R5, GLCD_G6, GLCD_B5 |
fblanc | 0:b96b9110daf9 | 17 | original coding: 17..12 red, 11..6 green, 5..0 blue ORG_R6, ORG_G6, ORG_B6 |
fblanc | 0:b96b9110daf9 | 18 | |
fblanc | 0:b96b9110daf9 | 19 | ORG_R1..5 = GLCD_R0..4, ORG_R0 = GLCD_R4 |
fblanc | 0:b96b9110daf9 | 20 | ORG_G0..5 = GLCD_G0..5, |
fblanc | 0:b96b9110daf9 | 21 | ORG_B1..5 = GLCD_B0..4, ORG_B0 = GLCD_B4 |
fblanc | 0:b96b9110daf9 | 22 | *----------------------------------------------------------------------------*/ |
fblanc | 0:b96b9110daf9 | 23 | |
fblanc | 0:b96b9110daf9 | 24 | /* GLCD RGB color definitions */ |
fblanc | 0:b96b9110daf9 | 25 | #define Black 0x0000 /* 0, 0, 0 */ |
fblanc | 0:b96b9110daf9 | 26 | #define Navy 0x000F /* 0, 0, 128 */ |
fblanc | 0:b96b9110daf9 | 27 | #define DarkGreen 0x03E0 /* 0, 128, 0 */ |
fblanc | 0:b96b9110daf9 | 28 | #define DarkCyan 0x03EF /* 0, 128, 128 */ |
fblanc | 0:b96b9110daf9 | 29 | #define Maroon 0x7800 /* 128, 0, 0 */ |
fblanc | 0:b96b9110daf9 | 30 | #define Purple 0x780F /* 128, 0, 128 */ |
fblanc | 0:b96b9110daf9 | 31 | #define Olive 0x7BE0 /* 128, 128, 0 */ |
fblanc | 0:b96b9110daf9 | 32 | #define LightGrey 0xC618 /* 192, 192, 192 */ |
fblanc | 0:b96b9110daf9 | 33 | #define DarkGrey 0x7BEF /* 128, 128, 128 */ |
fblanc | 0:b96b9110daf9 | 34 | #define Blue 0x001F /* 0, 0, 255 */ |
fblanc | 0:b96b9110daf9 | 35 | #define Green 0x07E0 /* 0, 255, 0 */ |
fblanc | 0:b96b9110daf9 | 36 | #define Cyan 0x07FF /* 0, 255, 255 */ |
fblanc | 0:b96b9110daf9 | 37 | #define Red 0xF800 /* 255, 0, 0 */ |
fblanc | 0:b96b9110daf9 | 38 | #define Magenta 0xF81F /* 255, 0, 255 */ |
fblanc | 0:b96b9110daf9 | 39 | #define Yellow 0xFFE0 /* 255, 255, 0 */ |
fblanc | 0:b96b9110daf9 | 40 | #define White 0xFFFF /* 255, 255, 255 */ |
fblanc | 0:b96b9110daf9 | 41 | |
fblanc | 0:b96b9110daf9 | 42 | #define Line0 ( 0*24) |
fblanc | 0:b96b9110daf9 | 43 | #define Line1 ( 1*24) |
fblanc | 0:b96b9110daf9 | 44 | #define Line2 ( 2*24) |
fblanc | 0:b96b9110daf9 | 45 | #define Line3 ( 3*24) |
fblanc | 0:b96b9110daf9 | 46 | #define Line4 ( 4*24) |
fblanc | 0:b96b9110daf9 | 47 | #define Line5 ( 5*24) |
fblanc | 0:b96b9110daf9 | 48 | #define Line6 ( 6*24) |
fblanc | 0:b96b9110daf9 | 49 | #define Line7 ( 7*24) |
fblanc | 0:b96b9110daf9 | 50 | #define Line8 ( 8*24) |
fblanc | 0:b96b9110daf9 | 51 | #define Line9 ( 9*24) |
fblanc | 0:b96b9110daf9 | 52 | |
fblanc | 0:b96b9110daf9 | 53 | extern void GLCD_Init (void); |
fblanc | 0:b96b9110daf9 | 54 | extern void GLCD_WindowMax (void); |
fblanc | 0:b96b9110daf9 | 55 | extern void GLCD_PutPixel (unsigned int x, unsigned int y); |
fblanc | 0:b96b9110daf9 | 56 | extern void GLCD_SetTextColor (unsigned short color); |
fblanc | 0:b96b9110daf9 | 57 | extern void GLCD_SetBackColor (unsigned short color); |
fblanc | 0:b96b9110daf9 | 58 | extern void GLCD_Clear (unsigned short color); |
fblanc | 0:b96b9110daf9 | 59 | extern void GLCD_DrawChar (unsigned int x, unsigned int y, unsigned short *c); |
fblanc | 0:b96b9110daf9 | 60 | extern void GLCD_DisplayChar (unsigned int ln, unsigned int col, unsigned char fi, unsigned char c); |
fblanc | 0:b96b9110daf9 | 61 | extern void GLCD_DisplayString (unsigned int ln, unsigned int col, unsigned char fi, unsigned char *s); |
fblanc | 0:b96b9110daf9 | 62 | extern void GLCD_ClearLn (unsigned int ln, unsigned char fi); |
fblanc | 0:b96b9110daf9 | 63 | extern void GLCD_Bargraph (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned int val); |
fblanc | 0:b96b9110daf9 | 64 | extern void GLCD_Bitmap (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *bitmap); |
fblanc | 0:b96b9110daf9 | 65 | extern void GLCD_Bmp (unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned char *bmp); |
fblanc | 0:b96b9110daf9 | 66 | extern void GLCD_ScrollVertical (unsigned int dy); |
fblanc | 0:b96b9110daf9 | 67 | |
fblanc | 0:b96b9110daf9 | 68 | #endif /* _GLCD_H */ |