Line No. | Rev | Author | Line |
---|---|---|---|
1 | 32 | kaklik | /********************************************************************* |
2 | * Module for Microchip Graphics Library |
||
3 | * The header file joins all header files used in the graphics library |
||
4 | * and contains compile options and defaults. |
||
5 | ********************************************************************* |
||
6 | * FileName: Graphics.h |
||
7 | * Dependencies: See INCLUDES section below |
||
8 | * Processor: PIC24F, PIC24H, dsPIC, PIC32 |
||
9 | * Compiler: C30 V3.00/C32 |
||
10 | * Company: Microchip Technology, Inc. |
||
11 | * |
||
12 | * Software License Agreement |
||
13 | * |
||
14 | * Copyright © 2008 Microchip Technology Inc. All rights reserved. |
||
15 | * Microchip licenses to you the right to use, modify, copy and distribute |
||
16 | * Software only when embedded on a Microchip microcontroller or digital |
||
17 | * signal controller, which is integrated into your product or third party |
||
18 | * product (pursuant to the sublicense terms in the accompanying license |
||
19 | * agreement). |
||
20 | * |
||
21 | * You should refer to the license agreement accompanying this Software |
||
22 | * for additional information regarding your rights and obligations. |
||
23 | * |
||
24 | * SOFTWARE AND DOCUMENTATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY |
||
25 | * KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY |
||
26 | * OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR |
||
27 | * PURPOSE. IN NO EVENT SHALL MICROCHIP OR ITS LICENSORS BE LIABLE OR |
||
28 | * OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, |
||
29 | * BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT |
||
30 | * DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, |
||
31 | * INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, |
||
32 | * COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY |
||
33 | * CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), |
||
34 | * OR OTHER SIMILAR COSTS. |
||
35 | * |
||
36 | * Author Date Comment |
||
37 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
||
38 | * Anton Alkhimenok 11/12/07 Version 1.0 release |
||
39 | ********************************************************************/ |
||
40 | #ifndef _GRAPHICS_H |
||
41 | #define _GRAPHICS_H |
||
42 | |||
43 | //////////////////// COMPILE OPTIONS AND DEFAULTS //////////////////// |
||
44 | |||
45 | ///////////// GRAPHICS CONTROLLERS CODES FOR DRIVER LAYER //////////// |
||
46 | #define SSD1906 1 |
||
47 | #define SSD1926 2 |
||
48 | #define S6D0129 3 |
||
49 | #define S6D0139 4 |
||
50 | #define LGDP4531 5 |
||
51 | #define R61505 6 |
||
52 | #define SPFD5408 7 |
||
53 | #define SSD1339 8 |
||
54 | #define ST7529 9 |
||
55 | #define SH1101A 10 |
||
56 | #define SSD1303 11 |
||
57 | #define HIT1270 12 |
||
58 | #define UC1610 13 |
||
59 | #define ILI9320 14 |
||
60 | #define SSD1289 15 |
||
61 | #define HX8347A 16 |
||
62 | #define HX8347D 17 |
||
63 | #define R61580 18 |
||
64 | #define SSD2119 19 |
||
65 | #define MCHP_DA210 100 |
||
66 | #define CUSTOM_CONTROLLER -1 |
||
67 | #define NO_CONTROLLER_DEFINED -2 |
||
68 | |||
69 | ////////////// GRAPHICS DISPLAYS CODES FOR DRIVER LAYER ////////////// |
||
70 | #define TFT_G240320LTSW_118W_E 0 // using SSD1289 |
||
71 | #define TFT2N0369_E 0 // using SSD1289 |
||
72 | #define DT032TFT_TS 0 // using SSD1289 |
||
73 | #define DT032TFT 0 // using SSD1289 |
||
74 | #define TFT_G320240DTSW_69W_TP_E 1 |
||
75 | #define _35QVW0T 1 |
||
76 | #define PH480272T_005_I06Q 2 |
||
77 | #define PH480272T_005_I11Q 3 |
||
78 | |||
79 | /////////////////////// GRAPHICS_LIBRARY_VERSION ///////////////////// |
||
80 | // MSB is version, LSB is subversion |
||
81 | #define GRAPHICS_LIBRARY_VERSION 0x0210 |
||
82 | |||
83 | ////////////////////////////// INCLUDES ////////////////////////////// |
||
84 | #include <stdlib.h> |
||
85 | #include "GenericTypeDefs.h" |
||
86 | #include "GraphicsConfig.h" |
||
87 | #include "HardwareProfile.h" |
||
88 | #include "TimeDelay.h" |
||
89 | #include "DisplayDriverInterface.h" |
||
90 | #include "DisplayDriver.h" // Display driver layer |
||
91 | #include "Primitive.h" // Graphic primitives layer |
||
92 | #include "ScanCodes.h" // Scan codes for AT keyboard |
||
93 | #include "GOL.h" // GOL layer |
||
94 | #if defined(USE_BUTTON) || defined(USE_BUTTON_MULTI_LINE) |
||
95 | #include "Button.h" |
||
96 | #endif |
||
97 | #ifdef USE_WINDOW |
||
98 | #include "Window.h" |
||
99 | #endif |
||
100 | #ifdef USE_GROUPBOX |
||
101 | #include "GroupBox.h" |
||
102 | #endif |
||
103 | #ifdef USE_STATICTEXT |
||
104 | #include "StaticText.h" |
||
105 | #endif |
||
106 | #ifdef USE_SLIDER |
||
107 | #include "Slider.h" |
||
108 | #endif |
||
109 | #ifdef USE_CHECKBOX |
||
110 | #include "CheckBox.h" |
||
111 | #endif |
||
112 | #ifdef USE_RADIOBUTTON |
||
113 | #include "RadioButton.h" |
||
114 | #endif |
||
115 | #ifdef USE_PICTURE |
||
116 | #include "Picture.h" |
||
117 | #endif |
||
118 | #ifdef USE_PROGRESSBAR |
||
119 | #include "ProgressBar.h" |
||
120 | #endif |
||
121 | #ifdef USE_EDITBOX |
||
122 | #include "EditBox.h" |
||
123 | #endif |
||
124 | #ifdef USE_LISTBOX |
||
125 | #include "ListBox.h" |
||
126 | #endif |
||
127 | #ifdef USE_ROUNDDIAL |
||
128 | #include "RoundDial.h" |
||
129 | #endif |
||
130 | #ifdef USE_METER |
||
131 | #include "Meter.h" |
||
132 | #endif |
||
133 | #ifdef USE_GRID |
||
134 | #include "Grid.h" |
||
135 | #endif |
||
136 | #ifdef USE_CHART |
||
137 | #include "Chart.h" |
||
138 | #endif |
||
139 | #ifdef USE_TEXTENTRY |
||
140 | #include "TextEntry.h" |
||
141 | #endif |
||
142 | #ifdef USE_DIGITALMETER |
||
143 | #include "DigitalMeter.h" |
||
144 | #endif |
||
145 | #ifdef USE_CUSTOM |
||
146 | |||
147 | // Included for custom control demo |
||
148 | #include "CustomControlDemo.h" |
||
149 | #endif |
||
150 | |||
151 | /********************************************************************* |
||
152 | * Macros: RGB565CONVERT(red, green, blue) |
||
153 | * |
||
154 | * Overview: Converts true color into 5:6:5 RGB format. |
||
155 | * |
||
156 | * PreCondition: none |
||
157 | * |
||
158 | * Input: Red, Green, Blue components. |
||
159 | * |
||
160 | * Output: 5 bits red, 6 bits green, 5 bits blue color. |
||
161 | * |
||
162 | * Side Effects: none |
||
163 | * |
||
164 | ********************************************************************/ |
||
165 | #define RGB565CONVERT(red, green, blue) (WORD) (((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3)) |
||
166 | |||
167 | /********************************************************************* |
||
168 | * Macros: RGB332CONVERT(red, green, blue) |
||
169 | * |
||
170 | * Overview: Converts true color into 5:6:5 RGB format. |
||
171 | * |
||
172 | * PreCondition: none |
||
173 | * |
||
174 | * Input: Red, Green, Blue components. |
||
175 | * |
||
176 | * Output: 5 bits red, 6 bits green, 5 bits blue color. |
||
177 | * |
||
178 | * Side Effects: none |
||
179 | * |
||
180 | ********************************************************************/ |
||
181 | #define RGB332CONVERT(red, green, blue) (BYTE) ((red & 0xE0) | ((green & 0xE0) >> 3) | (blue >> 6)) |
||
182 | |||
183 | #endif |
Powered by WebSVN v2.8.3