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