?lang_form? ?lang_select? ?lang_submit? ?lang_endform?
{HEADER END}
{BLAME START}

library

?curdirlinks? -

Blame information for rev 32

Line No. Rev Author Line
1 32 kaklik /*****************************************************************************
2 * Module for Microchip Graphics Library
3 * Custom display controller driver template
4 *****************************************************************************
5 * FileName: CustomDisplayDriver.c
6 * Dependencies: Graphics.h
7 * Processor: PIC24, PIC32
8 * Compiler: MPLAB C30, MPLAB C32
9 * Linker: MPLAB LINK30, MPLAB LINK32
10 * Company: Microchip Technology Incorporated
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 *
39 *****************************************************************************/
40 #include "Graphics\Graphics.h"
41  
42 // Color
43 WORD_VAL _color;
44  
45 // Clipping region control
46 SHORT _clipRgn;
47  
48 // Clipping region borders
49 SHORT _clipLeft;
50 SHORT _clipTop;
51 SHORT _clipRight;
52 SHORT _clipBottom;
53  
54 /*********************************************************************
55 * Function: void DelayMs(WORD time)
56 *
57 * PreCondition: none
58 *
59 * Input: time - delay in ms
60 *
61 * Output: none
62 *
63 * Side Effects: none
64 *
65 * Overview: delays execution on time specified in ms
66 *
67 * Note: none
68 *
69 ********************************************************************/
70 #ifdef __PIC32MX
71  
72 /* */
73 void DelayMs(WORD time)
74 {
75 while(time--)
76 {
77 unsigned int int_status;
78  
79 int_status = INTDisableInterrupts();
80 OpenCoreTimer(GetSystemClock() / 2000); // core timer is at 1/2 system clock
81 INTRestoreInterrupts(int_status);
82  
83 mCTClearIntFlag();
84  
85 while(!mCTGetIntFlag());
86 }
87  
88 mCTClearIntFlag();
89 }
90  
91 #else
92 #define DELAY_1MS 16000 / 5 // for 16MIPS
93  
94 /* */
95 void DelayMs(WORD time)
96 {
97 unsigned delay;
98 while(time--)
99 for(delay = 0; delay < DELAY_1MS; delay++);
100 }
101  
102 #endif
103  
104 /*********************************************************************
105 * Function: void ResetDevice()
106 *
107 * PreCondition: none
108 *
109 * Input: none
110 *
111 * Output: none
112 *
113 * Side Effects: none
114 *
115 * Overview: resets LCD, initializes PMP
116 *
117 * Note: none
118 *
119 ********************************************************************/
120 void ResetDevice(void)
121 { }
122  
123 /*********************************************************************
124 * Function: void PutPixel(SHORT x, SHORT y)
125 *
126 * PreCondition: none
127 *
128 * Input: x,y - pixel coordinates
129 *
130 * Output: none
131 *
132 * Side Effects: none
133 *
134 * Overview: puts pixel
135 *
136 * Note: none
137 *
138 ********************************************************************/
139 void PutPixel(SHORT x, SHORT y)
140 { }
141  
142 /*********************************************************************
143 * Function: WORD GetPixel(SHORT x, SHORT y)
144 *
145 * PreCondition: none
146 *
147 * Input: x,y - pixel coordinates
148 *
149 * Output: pixel color
150 *
151 * Side Effects: none
152 *
153 * Overview: returns pixel color at x,y position
154 *
155 * Note: none
156 *
157 ********************************************************************/
158 WORD GetPixel(SHORT x, SHORT y)
159 {
160 return (0);
161 }
{BLAME END}
{FOOTER START}

Powered by WebSVN v2.8.3