Select one of the symbols to view example projects that use it.
 
Outline
#define LCD_H
#include "GUI_ConfDefaults.h"
#include "Global.h"
#define I16P
#define U16P
#define LCD_ERR0
#define LCD_ERR_CONTROLLER_NOT_FOUND
#define LCD_ERR_MEMORY
#define LCD_DRAWMODE_NORMAL
#define LCD_DRAWMODE_XOR
#define LCD_DRAWMODE_TRANS
#define LCD_DRAWMODE_REV
LCD_DRAWMODE
LCD_COLOR
GUI_POINT
LCD_RECT
LCD_LOGPALETTE
LCD_tMouseState
LCD_PHYSPALETTE
tLCDDEV_GetIndexMask
tLCDDEV_Index2ColorBulk
tLCDDEV_Color2IndexBulk
LCD_API_COLOR_CONV
LCD_API_ColorConv_0;
LCD_API_ColorConv_1;
LCD_API_ColorConv_1_2;
LCD_API_ColorConv_1_4;
LCD_API_ColorConv_1_5;
LCD_API_ColorConv_1_8;
LCD_API_ColorConv_1_16;
LCD_API_ColorConv_1_24;
LCD_API_ColorConv_2;
LCD_API_ColorConv_4;
LCD_API_ColorConv_5;
LCD_API_ColorConv_6;
LCD_API_ColorConv_8;
LCD_API_ColorConv_16;
LCD_API_ColorConv_1616I;
LCD_API_ColorConv_111;
LCD_API_ColorConv_222;
LCD_API_ColorConv_233;
LCD_API_ColorConv_323;
LCD_API_ColorConv_332;
LCD_API_ColorConv_444_12;
LCD_API_ColorConv_444_12_1;
LCD_API_ColorConv_444_16;
LCD_API_ColorConv_555;
LCD_API_ColorConv_565;
LCD_API_ColorConv_556;
LCD_API_ColorConv_655;
LCD_API_ColorConv_666;
LCD_API_ColorConv_666_9;
LCD_API_ColorConv_822216;
LCD_API_ColorConv_84444;
LCD_API_ColorConv_8666;
LCD_API_ColorConv_8666_1;
LCD_API_ColorConv_88666I;
LCD_API_ColorConv_888;
LCD_API_ColorConv_8888;
LCD_API_ColorConv_M111;
LCD_API_ColorConv_M1555I;
LCD_API_ColorConv_M222;
LCD_API_ColorConv_M233;
LCD_API_ColorConv_M323;
LCD_API_ColorConv_M332;
LCD_API_ColorConv_M4444I;
LCD_API_ColorConv_M444_12;
LCD_API_ColorConv_M444_12_1;
LCD_API_ColorConv_M444_16;
LCD_API_ColorConv_M555;
LCD_API_ColorConv_M565;
LCD_API_ColorConv_M556;
LCD_API_ColorConv_M655;
LCD_API_ColorConv_M666;
LCD_API_ColorConv_M666_9;
LCD_API_ColorConv_M8565;
LCD_API_ColorConv_M888;
LCD_API_ColorConv_M8888;
LCD_API_ColorConv_M8888I;
#define GUICC_0
#define GUICC_1
#define GUICC_1_2
#define GUICC_1_4
#define GUICC_1_5
#define GUICC_1_8
#define GUICC_1_16
#define GUICC_1_24
#define GUICC_2
#define GUICC_4
#define GUICC_5
#define GUICC_6
#define GUICC_8
#define GUICC_16
#define GUICC_1616I
#define GUICC_111
#define GUICC_222
#define GUICC_233
#define GUICC_323
#define GUICC_332
#define GUICC_M4444I
#define GUICC_444_12
#define GUICC_444_12_1
#define GUICC_444_16
#define GUICC_555
#define GUICC_565
#define GUICC_556
#define GUICC_655
#define GUICC_666
#define GUICC_666_9
#define GUICC_822216
#define GUICC_84444
#define GUICC_8666
#define GUICC_8666_1
#define GUICC_88666I
#define GUICC_888
#define GUICC_8888
#define GUICC_M111
#define GUICC_M1555I
#define GUICC_M222
#define GUICC_M233
#define GUICC_M323
#define GUICC_M332
#define GUICC_M444_12
#define GUICC_M444_12_1
#define GUICC_M444_16
#define GUICC_M555
#define GUICC_M565
#define GUICC_M556
#define GUICC_M655
#define GUICC_M666
#define GUICC_M666_9
#define GUICC_M8565
#define GUICC_M888
#define GUICC_M8888
#define GUICC_M8888I
GUICC_M1555I_SetCustColorConv(tLCDDEV_Color2IndexBulk *, tLCDDEV_Index2ColorBulk *);
GUICC_M565_SetCustColorConv(tLCDDEV_Color2IndexBulk *, tLCDDEV_Index2ColorBulk *);
GUICC_M4444I_SetCustColorConv(tLCDDEV_Color2IndexBulk *, tLCDDEV_Index2ColorBulk *);
GUICC_M888_SetCustColorConv(tLCDDEV_Color2IndexBulk *, tLCDDEV_Index2ColorBulk *);
GUICC_M8888I_SetCustColorConv(tLCDDEV_Color2IndexBulk *, tLCDDEV_Index2ColorBulk *);
#define GUI_COLOR_CONV_1
#define GUI_COLOR_CONV_2
#define GUI_COLOR_CONV_4
#define GUI_COLOR_CONV_8666
#define GUI_COLOR_CONV_888
#define GUI_COLOR_CONV_8888
#define GUI_COLOR_CONV_565
#define GUI_COLOR_CONV_M565
tLCDDEV_DrawPixel
tLCDDEV_DrawHLine
tLCDDEV_DrawVLine
tLCDDEV_FillRect
tLCDDEV_GetPixelIndex
tLCDDEV_SetPixelIndex
tLCDDEV_XorPixel
tLCDDEV_FillPolygon
tLCDDEV_FillPolygonAA
tLCDDEV_Init
tLCDDEV_On
tLCDDEV_Off
tLCDDEV_SetLUTEntry
tLCDDEV_SetOrg
GUI_DEVICE
GUI_DEVICE_API
tLCDDEV_DrawBitmap
#define GUI_MEMDEV_APILIST_1
#define GUI_MEMDEV_APILIST_8
#define GUI_MEMDEV_APILIST_16
#define GUI_MEMDEV_APILIST_32
#define LCD_DEVCAP_XSIZE
#define LCD_DEVCAP_YSIZE
#define LCD_DEVCAP_VXSIZE
#define LCD_DEVCAP_VYSIZE
#define LCD_DEVCAP_XORG
#define LCD_DEVCAP_YORG
#define LCD_DEVCAP_CONTROLLER
#define LCD_DEVCAP_BITSPERPIXEL
#define LCD_DEVCAP_NUMCOLORS
#define LCD_DEVCAP_XMAG
#define LCD_DEVCAP_YMAG
#define LCD_DEVCAP_MIRROR_X
#define LCD_DEVCAP_MIRROR_Y
#define LCD_DEVCAP_SWAP_XY
#define LCD_DEVCAP_SWAP_RB
LCD_GetXSizeMax();
LCD_GetYSizeMax();
LCD_GetVXSizeMax();
LCD_GetVYSizeMax();
LCD_GetBitsPerPixelMax();
LCD_SetDisplaySize(int, int);
LCD_GetXSizeDisplay();
LCD_GetYSizeDisplay();
LCD_GetXSizeEx(int);
LCD_GetYSizeEx(int);
LCD_GetVXSizeEx(int);
LCD_GetVYSizeEx(int);
LCD_GetBitsPerPixelEx(int);
LCD_GetNumColorsEx(int);
LCD_GetXMagEx(int);
LCD_GetYMagEx(int);
LCD_GetMirrorXEx(int);
LCD_GetMirrorYEx(int);
LCD_GetSwapXYEx(int);
LCD_GetReversLUTEx(int);
LCD_GetPhysColorsInRAMEx(int);
LCD_GetXSize();
LCD_GetYSize();
LCD_GetVXSize();
LCD_GetVYSize();
LCD_GetBitsPerPixel();
LCD_GetNumColors();
LCD_GetXMag();
LCD_GetYMag();
LCD_GetMirrorX();
LCD_GetMirrorY();
LCD_GetSwapXY();
LCD_GetReversLUT();
LCD_GetPhysColorsInRAM();
LCD__GetBPP(unsigned long);
LCD__GetBPPDevice(unsigned long);
LCD_GetpfIndex2ColorEx(int);
LCD_GetpfColor2IndexEx(int);
LCD_GetpfColor2Index();
LCD_GetNumLayers();
LCD_GetPalette();
LCD_GetPaletteEx(int);
LCD_GetDevFunc(int, int);
#define LCD_DEVFUNC_READRECT
#define LCD_DEVFUNC_SETALPHA
#define LCD_DEVFUNC_SETPOS
#define LCD_DEVFUNC_GETPOS
#define LCD_DEVFUNC_SETSIZE
#define LCD_DEVFUNC_SETVIS
#define LCD_DEVFUNC_24BPP
#define LCD_DEVFUNC_NEXT_PIXEL
#define LCD_DEVFUNC_SET_VRAM_ADDR
#define LCD_DEVFUNC_SET_VSIZE
#define LCD_DEVFUNC_SET_SIZE
#define LCD_DEVFUNC_INIT
#define LCD_DEVFUNC_CONTROLCACHE
#define LCD_DEVFUNC_ON
#define LCD_DEVFUNC_OFF
#define LCD_DEVFUNC_SETLUTENTRY
#define LCD_DEVFUNC_FILLPOLY
#define LCD_DEVFUNC_FILLPOLYAA
#define LCD_DEVFUNC_ALPHAMODE
#define LCD_DEVFUNC_CHROMAMODE
#define LCD_DEVFUNC_CHROMA
#define LCD_DEVFUNC_SETFUNC
#define LCD_DEVFUNC_REFRESH
#define LCD_DEVFUNC_SETRECT
#define LCD_DEVFUNC_FILLRECT
#define LCD_DEVFUNC_DRAWBMP_1BPP
#define LCD_DEVFUNC_COPYBUFFER
#define LCD_DEVFUNC_SHOWBUFFER
#define LCD_DEVFUNC_COPYRECT
#define LCD_DEVFUNC_DRAWBMP_16BPP
#define LCD_DEVFUNC_DRAWBMP_8BPP
#define LCD_DEVFUNC_READPIXEL
#define LCD_DEVFUNC_READMPIXELS
#define LCD_DEVFUNC_DRAWBMP_32BPP
#define LCD_DEVFUNC_SET_BUFFERPTR
#define MEMDEV_DEVFUNC_WRITETOACTIVE
#define LCD_DEVDATA_MEMDEV
#define LCD_DEVDATA_PHYSPAL
LCD_X_SETVRAMADDR_INFO
LCD_X_SETORG_INFO
LCD_X_SETLUTENTRY_INFO
LCD_X_SETSIZE_INFO
LCD_X_SETPOS_INFO
LCD_X_SETALPHA_INFO
LCD_X_SETVIS_INFO
LCD_X_SETALPHAMODE_INFO
LCD_X_SETCHROMAMODE_INFO
LCD_X_SETCHROMA_INFO
LCD_X_SHOWBUFFER_INFO
#define LCD_X_INITCONTROLLER
#define LCD_X_SETVRAMADDR
#define LCD_X_SETORG
#define LCD_X_SETLUTENTRY
#define LCD_X_ON
#define LCD_X_OFF
#define LCD_X_SETSIZE
#define LCD_X_SETPOS
#define LCD_X_SETVIS
#define LCD_X_SETALPHA
#define LCD_X_SETALPHAMODE
#define LCD_X_SETCHROMAMODE
#define LCD_X_SETCHROMA
#define LCD_X_SHOWBUFFER
LCD_X_DisplayDriver(unsigned int, unsigned int, void *);
LCD_X_Config();
LCD_GetPosEx(int, int *, int *);
LCD_OffEx(int);
LCD_OnEx(int);
LCD_RefreshEx(int);
LCD_SetAlphaEx(int, int);
LCD_SetAlphaModeEx(int, int);
LCD_SetBufferPtrEx(int, const unsigned long *);
LCD_SetChromaEx(int, LCD_COLOR, LCD_COLOR);
LCD_SetChromaModeEx(int, int);
LCD_SetDevFunc(int, int, void (*)(void));
LCD_SetLUTEntryEx(int, unsigned char, LCD_COLOR);
LCD_SetPosEx(int, int, int);
LCD_SetSizeEx(int, int, int);
LCD_SetVisEx(int, int);
LCD_SetVRAMAddrEx(int, void *);
LCD_SetVSizeEx(int, int, int);
LCD_GetPos(int *, int *);
LCD_Off();
LCD_On();
LCD_Refresh();
LCD_SetAlpha(int);
LCD_SetAlphaMode(int);
LCD_SetBufferPtr(const unsigned long *);
LCD_SetChroma(LCD_COLOR, LCD_COLOR);
LCD_SetChromaMode(int);
LCD_SetLUTEntry(unsigned char, LCD_COLOR);
LCD_SetOrg(int, int);
LCD_SetPos(int, int);
LCD_SetSize(int, int);
LCD_SetVis(int);
LCD_SetVRAMAddr(void *);
LCD_SetVSize(int, int);
LCD_API_NEXT_PIXEL
LCD_GetNextPixelAPI();
tLCD_HL_DrawHLine
tLCD_HL_DrawPixel
tLCD_HL_APIList
LCD_DrawHLine(int, int, int);
LCD_DrawPixel(int, int);
LCD_DrawVLine(int, int, int);
LCD_SetClipRectEx(const LCD_RECT *);
LCD_SetClipRectMax();
LCD_GetDevCap(int);
LCD_GetDevCapEx(int, int);
emWin_LCD_Init();
LCD_InitColors();
LCD_SetBkColor(LCD_COLOR);
LCD_SetColor(LCD_COLOR);
LCD_SetPixelIndex(int, int, int);
LCD_InitLUT();
LCD_SetLUTEx(int, const LCD_PHYSPALETTE *);
LCD_SetLUT(const LCD_PHYSPALETTE *);
LCD_SetDrawMode(LCD_DRAWMODE);
LCD_SetColorIndex(unsigned int);
LCD_SetBkColorIndex(unsigned int);
LCD_FillRect(int, int, int, int);
tLCD_SetPixelAA
LCD_SetPixelAA4_Trans(int, int, unsigned char);
LCD_SetPixelAA4_NoTrans(int, int, unsigned char);
LCD_SetPixelAA8_Trans(int, int, unsigned char);
LCD_SetPixelAA8_NoTrans(int, int, unsigned char);
LCD_AA_EnableGamma(int);
LCD_AA_SetGamma(unsigned char *);
LCD_AA_GetGamma(unsigned char *);
LCD_AA_MixColors16(LCD_COLOR, LCD_COLOR, unsigned char);
LCD_AA_MixColors256(LCD_COLOR, LCD_COLOR, unsigned char);
LCD_MixColors256(LCD_COLOR, LCD_COLOR, unsigned int);
LCD_GetPixelColor(int, int);
LCD_GetPixelIndex(int, int);
LCD_GetBkColorIndex();
LCD_GetColorIndex();
LCD_AA_SetAndMask(unsigned long);
LCD_SetMaxNumColors(unsigned int);
LCD_GetMaxNumColors();
LCD__SetPaletteConversionHook(void (*)(const LCD_LOGPALETTE *));
tLCD_DrawBitmap
tLCD_APIList_struct
tLCD_APIList
LCD_APIListCCW;
LCD_APIListCW;
LCD_APIList180;
#define GUI_ROTATION
#define GUI_ROTATE_CCW
#define GUI_ROTATE_CW
#define GUI_ROTATE_180
#define GUI_ROTATE_0
LCD__GetPfSetPixel(int);
LCD__SetPhysColor(unsigned char, LCD_COLOR);
#define LCD_CC_UNLOCK
#define LCD_CC_LOCK
#define LCD_CC_FLUSH
LCD_ControlCache(int);
LCD_ControlCacheEx(int, int);
LCD_Color2Index(LCD_COLOR);
LCD_Index2Color(int);
LCD_Index2ColorEx(int, unsigned int);
LCD_X_Read00();
LCD_X_Read01();
LCD_X_Write00(unsigned char);
LCD_X_Write01(unsigned char);
LCD_X_WriteM01(unsigned char *, int);
Files
loading...
CodeScopeSTM32 Libraries and SamplesSTemWininc/LCD.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
/********************************************************************* * SEGGER Microcontroller GmbH & Co. KG * * Solutions for real time microcontroller applications * ********************************************************************** * * * (c) 1996 - 2017 SEGGER Microcontroller GmbH & Co. KG * * * * Internet: www.segger.com Support: support@segger.com * * * ********************************************************************** ** emWin V5.44 - Graphical user interface for embedded applications ** All Intellectual Property rights in the Software belongs to SEGGER. emWin is protected by international copyright laws. Knowledge of the source code may not be used to write a similar product. This file may only be used in accordance with the following terms: The software has been licensed to STMicroelectronics International N.V. a Dutch company with a Swiss branch and its headquarters in Plan- les-Ouates, Geneva, 39 Chemin du Champ des Filles, Switzerland for the purposes of creating libraries for ARM Cortex-M-based 32-bit microcon_ troller products commercialized by Licensee only, sublicensed and dis_ tributed under the terms and conditions of the End User License Agree_ ment supplied by STMicroelectronics International N.V. Full source code is available at: www.segger.com We appreciate your understanding and fairness. ---------------------------------------------------------------------- ****************************************************************************** * @attention * * <h2><center>&copy; Copyright (c) 2018 STMicroelectronics. * All rights reserved.</center></h2> * * This software component is licensed by ST under Ultimate Liberty license SLA0044, * the "License"; You may not use this file except in compliance with the License. * You may obtain a copy of the License at: * http://www.st.com/SLA0044 * ****************************************************************************** ---------------------------------------------------------------------- File : LCD.h Purpose : Declares LCD interface functions ---------------------------------------------------------------------- *//* ... */ #ifndef LCD_H #define LCD_H #include "GUI_ConfDefaults.h" /* Used for GUI_CONST_STORAGE */ #include "Global.h" #if defined(__cplusplus) extern "C" { /* Make sure we have C-declarations in C++ programs */ #endif /********************************************************************* * * Basic type defines * * The follwing are defines for types used in the LCD-driver and the * GUI layers on top of that. Since "C" does not provide data types of * fixed length which are identical on all platforms, this is done here. * For most 16/32 controllers, the settings will work fine. However, if * you have similar defines in other sections of your program, you might * want to change or relocate these defines, e.g. in a TYPE.h file. *//* ... */ #define I16P I16 /* signed 16 bits OR MORE ! */ #define U16P U16 /* unsigned 16 bits OR MORE ! */ /********************************************************************* * * Settings for windows simulation * * Some settings in the configuration may conflict with the values required * in the Simulation. This is why we ignore the target settings for data * types and use the correct settings for the simulation. * (U32 could be defined as long, which would yield a 64 bit type on * the PC) *//* ... */ #ifdef WIN32 #pragma warning( disable : 4244 ) // Disable warning messages in simulation #pragma warning( disable : 4761 ) // Disable warning "integral size mismatch in argument; conversion supplied"/* ... */ #endif /********************************************************************* * * Constants *//* ... */ #define LCD_ERR0 (0x10) #define LCD_ERR_CONTROLLER_NOT_FOUND (LCD_ERR0+1) #define LCD_ERR_MEMORY (LCD_ERR0+2) /********************************************************************* * * Drawing modes *//* ... */ #define LCD_DRAWMODE_NORMAL (0) #define LCD_DRAWMODE_XOR (1<<0) #define LCD_DRAWMODE_TRANS (1<<1) #define LCD_DRAWMODE_REV (1<<2) 7 defines /********************************************************************* * * Typedefs *//* ... */ typedef int LCD_DRAWMODE; typedef U32 LCD_COLOR; /********************************************************************* * * Data structures *//* ... */ typedef struct { I16P x,y; } GUI_POINT; typedef struct { I16 x0,y0,x1,y1; } LCD_RECT; typedef struct { int NumEntries; char HasTrans; const LCD_COLOR * pPalEntries; ...} LCD_LOGPALETTE; /* This is used for the simulation only ! */ typedef struct { int x,y; unsigned char KeyStat; ...} LCD_tMouseState; typedef struct { int NumEntries; const LCD_COLOR * pPalEntries; ...} LCD_PHYSPALETTE; /********************************************************************* * * LCD_L0_... color conversion *//* ... */ typedef LCD_COLOR tLCDDEV_Index2Color (LCD_PIXELINDEX Index); typedef LCD_PIXELINDEX tLCDDEV_Color2Index (LCD_COLOR Color); typedef LCD_PIXELINDEX tLCDDEV_GetIndexMask (void); typedef void tLCDDEV_Index2ColorBulk(void * pIndex, LCD_COLOR * pColor, U32 NumItems, U8 SizeOfIndex); typedef void tLCDDEV_Color2IndexBulk(LCD_COLOR * pColor, void * pIndex, U32 NumItems, U8 SizeOfIndex); /********************************************************************* * * Color conversion API tables *//* ... */ typedef struct { tLCDDEV_Color2Index * pfColor2Index; tLCDDEV_Index2Color * pfIndex2Color; tLCDDEV_GetIndexMask * pfGetIndexMask; int NoAlpha; tLCDDEV_Color2IndexBulk * pfColor2IndexBulk; tLCDDEV_Index2ColorBulk * pfIndex2ColorBulk; ...} LCD_API_COLOR_CONV; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_0; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1_2; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1_4; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1_5; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1_8; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1_16; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1_24; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_2; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_4; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_5; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_6; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_8; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_16; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_1616I; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_111; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_222; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_233; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_323; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_332; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_444_12; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_444_12_1; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_444_16; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_555; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_565; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_556; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_655; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_666; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_666_9; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_822216; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_84444; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_8666; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_8666_1; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_88666I; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_888; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_8888; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M111; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M1555I; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M222; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M233; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M323; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M332; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M4444I; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M444_12; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M444_12_1; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M444_16; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M555; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M565; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M556; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M655; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M666; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M666_9; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M8565; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M888; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M8888; extern const LCD_API_COLOR_CONV LCD_API_ColorConv_M8888I; #define GUICC_0 &LCD_API_ColorConv_0 #define GUICC_1 &LCD_API_ColorConv_1 #define GUICC_1_2 &LCD_API_ColorConv_1_2 #define GUICC_1_4 &LCD_API_ColorConv_1_4 #define GUICC_1_5 &LCD_API_ColorConv_1_5 #define GUICC_1_8 &LCD_API_ColorConv_1_8 #define GUICC_1_16 &LCD_API_ColorConv_1_16 #define GUICC_1_24 &LCD_API_ColorConv_1_24 #define GUICC_2 &LCD_API_ColorConv_2 #define GUICC_4 &LCD_API_ColorConv_4 #define GUICC_5 &LCD_API_ColorConv_5 #define GUICC_6 &LCD_API_ColorConv_6 #define GUICC_8 &LCD_API_ColorConv_8 #define GUICC_16 &LCD_API_ColorConv_16 #define GUICC_1616I &LCD_API_ColorConv_1616I #define GUICC_111 &LCD_API_ColorConv_111 #define GUICC_222 &LCD_API_ColorConv_222 #define GUICC_233 &LCD_API_ColorConv_233 #define GUICC_323 &LCD_API_ColorConv_323 #define GUICC_332 &LCD_API_ColorConv_332 #define GUICC_M4444I &LCD_API_ColorConv_M4444I #define GUICC_444_12 &LCD_API_ColorConv_444_12 #define GUICC_444_12_1 &LCD_API_ColorConv_444_12_1 #define GUICC_444_16 &LCD_API_ColorConv_444_16 #define GUICC_555 &LCD_API_ColorConv_555 #define GUICC_565 &LCD_API_ColorConv_565 #define GUICC_556 &LCD_API_ColorConv_556 #define GUICC_655 &LCD_API_ColorConv_655 #define GUICC_666 &LCD_API_ColorConv_666 #define GUICC_666_9 &LCD_API_ColorConv_666_9 #define GUICC_822216 &LCD_API_ColorConv_822216 #define GUICC_84444 &LCD_API_ColorConv_84444 #define GUICC_8666 &LCD_API_ColorConv_8666 #define GUICC_8666_1 &LCD_API_ColorConv_8666_1 #define GUICC_88666I &LCD_API_ColorConv_88666I #define GUICC_888 &LCD_API_ColorConv_888 #define GUICC_8888 &LCD_API_ColorConv_8888 #define GUICC_M111 &LCD_API_ColorConv_M111 #define GUICC_M1555I &LCD_API_ColorConv_M1555I #define GUICC_M222 &LCD_API_ColorConv_M222 #define GUICC_M233 &LCD_API_ColorConv_M233 #define GUICC_M323 &LCD_API_ColorConv_M323 #define GUICC_M332 &LCD_API_ColorConv_M332 #define GUICC_M444_12 &LCD_API_ColorConv_M444_12 #define GUICC_M444_12_1 &LCD_API_ColorConv_M444_12_1 #define GUICC_M444_16 &LCD_API_ColorConv_M444_16 #define GUICC_M555 &LCD_API_ColorConv_M555 #define GUICC_M565 &LCD_API_ColorConv_M565 #define GUICC_M556 &LCD_API_ColorConv_M556 #define GUICC_M655 &LCD_API_ColorConv_M655 #define GUICC_M666 &LCD_API_ColorConv_M666 #define GUICC_M666_9 &LCD_API_ColorConv_M666_9 #define GUICC_M8565 &LCD_API_ColorConv_M8565 #define GUICC_M888 &LCD_API_ColorConv_M888 #define GUICC_M8888 &LCD_API_ColorConv_M8888 #define GUICC_M8888I &LCD_API_ColorConv_M8888I 56 defines void GUICC_M1555I_SetCustColorConv(tLCDDEV_Color2IndexBulk * pfColor2IndexBulk, tLCDDEV_Index2ColorBulk * pfIndex2ColorBulk); void GUICC_M565_SetCustColorConv (tLCDDEV_Color2IndexBulk * pfColor2IndexBulk, tLCDDEV_Index2ColorBulk * pfIndex2ColorBulk); void GUICC_M4444I_SetCustColorConv(tLCDDEV_Color2IndexBulk * pfColor2IndexBulk, tLCDDEV_Index2ColorBulk * pfIndex2ColorBulk); void GUICC_M888_SetCustColorConv (tLCDDEV_Color2IndexBulk * pfColor2IndexBulk, tLCDDEV_Index2ColorBulk * pfIndex2ColorBulk); void GUICC_M8888I_SetCustColorConv(tLCDDEV_Color2IndexBulk * pfColor2IndexBulk, tLCDDEV_Index2ColorBulk * pfIndex2ColorBulk); /********************************************************************* * * Compatibility defines for older versions *//* ... */ #define GUI_COLOR_CONV_1 GUICC_1 #define GUI_COLOR_CONV_2 GUICC_2 #define GUI_COLOR_CONV_4 GUICC_4 #define GUI_COLOR_CONV_8666 GUICC_8666 #define GUI_COLOR_CONV_888 GUICC_888 #define GUI_COLOR_CONV_8888 GUICC_8888 #define GUI_COLOR_CONV_565 GUICC_565 #define GUI_COLOR_CONV_M565 GUICC_M565 8 defines /********************************************************************* * * LCDDEV function table * * Below the routines which need to in an LCDDEV routine table are * defined. All of these routines have to be in the low-level driver * (LCD_L0) or in the memory device which can be used to replace the * driver. * The one exception to this is the SetClipRect routine, which would * be identical for all drivers and is therefor contained in the * level above (LCD). *//* ... */ typedef void tLCDDEV_DrawPixel (int x, int y); typedef void tLCDDEV_DrawHLine (int x0, int y0, int x1); typedef void tLCDDEV_DrawVLine (int x , int y0, int y1); typedef void tLCDDEV_FillRect (int x0, int y0, int x1, int y1); typedef unsigned int tLCDDEV_GetPixelIndex(int x, int y); typedef void tLCDDEV_SetPixelIndex(int x, int y, int ColorIndex); typedef void tLCDDEV_XorPixel (int x, int y); typedef void tLCDDEV_FillPolygon (const GUI_POINT * pPoints, int NumPoints, int x0, int y0); typedef void tLCDDEV_FillPolygonAA(const GUI_POINT * pPoints, int NumPoints, int x0, int y0); typedef void tLCDDEV_GetRect (LCD_RECT * pRect); typedef int tLCDDEV_Init (void); typedef void tLCDDEV_On (void); typedef void tLCDDEV_Off (void); typedef void tLCDDEV_SetLUTEntry (U8 Pos, LCD_COLOR color); typedef void * tLCDDEV_GetDevFunc (int Index); typedef I32 tLCDDEV_GetDevProp (int Index); typedef void tLCDDEV_SetOrg (int x, int y); /********************************************************************* * * Memory device API tables *//* ... */ typedef struct GUI_DEVICE GUI_DEVICE; typedef struct GUI_DEVICE_API GUI_DEVICE_API; typedef void tLCDDEV_DrawBitmap (int x0, int y0, int xsize, int ysize, int BitsPerPixel, int BytesPerLine, const U8 * pData, int Diff, const void * pTrans); /* Really LCD_PIXELINDEX, but is void to avoid compiler warnings */ #define GUI_MEMDEV_APILIST_1 &GUI_MEMDEV_DEVICE_1 #define GUI_MEMDEV_APILIST_8 &GUI_MEMDEV_DEVICE_8 #define GUI_MEMDEV_APILIST_16 &GUI_MEMDEV_DEVICE_16 #define GUI_MEMDEV_APILIST_32 &GUI_MEMDEV_DEVICE_32 /********************************************************************* * * Defines for device capabilities * * The following is the list of device capabilities which can, but do * not have to be implemented in the driver. This way the driver can be * enhanced in the future without affecting the driver interface, * keeping older drivers compatible. * More DevCaps can always be added in the future, as older drivers * are guaranteed to return 0 for all unimplemented features or queries. * * The values below define the legal parameters to the LCD_GetDeviceCaps * and the LCD_GetpCapFunc routines. *//* ... */ #define LCD_DEVCAP_XSIZE 0x01 /* Quest horiz. res. of display */ #define LCD_DEVCAP_YSIZE 0x02 /* Quest vert. res. of display */ #define LCD_DEVCAP_VXSIZE 0x03 /* Quest vert. res. of virtual disp.*/ #define LCD_DEVCAP_VYSIZE 0x04 /* Quest vert. res. of virtual disp.*/ #define LCD_DEVCAP_XORG 0x05 /* X-origin ... usually 0 */ #define LCD_DEVCAP_YORG 0x06 /* Y-origin ... usually 0 */ #define LCD_DEVCAP_CONTROLLER 0x07 /* LCD Controller (Numerical) */ #define LCD_DEVCAP_BITSPERPIXEL 0x08 /* Bits per pixel ... 1/2/4/8 */ #define LCD_DEVCAP_NUMCOLORS 0x09 /* Quest number of colors */ #define LCD_DEVCAP_XMAG 0x0A #define LCD_DEVCAP_YMAG 0x0B #define LCD_DEVCAP_MIRROR_X 0x0C #define LCD_DEVCAP_MIRROR_Y 0x0D #define LCD_DEVCAP_SWAP_XY 0x0E #define LCD_DEVCAP_SWAP_RB 0x0F 19 defines int LCD_GetXSizeMax(void); int LCD_GetYSizeMax(void); int LCD_GetVXSizeMax(void); int LCD_GetVYSizeMax(void); int LCD_GetBitsPerPixelMax(void); void LCD_SetDisplaySize(int xSizeDisplay, int ySizeDisplay); int LCD_GetXSizeDisplay(void); int LCD_GetYSizeDisplay(void); int LCD_GetXSizeEx (int LayerIndex); int LCD_GetYSizeEx (int LayerIndex); int LCD_GetVXSizeEx (int LayerIndex); int LCD_GetVYSizeEx (int LayerIndex); int LCD_GetBitsPerPixelEx (int LayerIndex); U32 LCD_GetNumColorsEx (int LayerIndex); int LCD_GetXMagEx (int LayerIndex); int LCD_GetYMagEx (int LayerIndex); int LCD_GetMirrorXEx (int LayerIndex); int LCD_GetMirrorYEx (int LayerIndex); int LCD_GetSwapXYEx (int LayerIndex); int LCD_GetReversLUTEx (int LayerIndex); int LCD_GetPhysColorsInRAMEx(int LayerIndex); int LCD_GetXSize (void); int LCD_GetYSize (void); int LCD_GetVXSize (void); int LCD_GetVYSize (void); int LCD_GetBitsPerPixel (void); U32 LCD_GetNumColors (void); int LCD_GetXMag (void); int LCD_GetYMag (void); int LCD_GetMirrorX (void); int LCD_GetMirrorY (void); int LCD_GetSwapXY (void); int LCD_GetReversLUT (void); int LCD_GetPhysColorsInRAM (void); I32 LCD__GetBPP (U32 IndexMask); I32 LCD__GetBPPDevice(U32 IndexMask); tLCDDEV_Index2Color * LCD_GetpfIndex2ColorEx(int LayerIndex); tLCDDEV_Color2Index * LCD_GetpfColor2IndexEx(int LayerIndex); tLCDDEV_Color2Index * LCD_GetpfColor2Index(void); int LCD_GetNumLayers(void); LCD_COLOR * LCD_GetPalette (void); LCD_COLOR * LCD_GetPaletteEx(int LayerIndex); void (* LCD_GetDevFunc(int LayerIndex, int Item))(void); /********************************************************************* * * Values for requesting and setting function pointers (display driver) *//* ... */ /* Request of a function pointer for... */ #define LCD_DEVFUNC_READRECT 0x01 /* ...reading a rectangular display area */ #define LCD_DEVFUNC_SETALPHA 0x02 /* ...setting the alpha blending factor */ #define LCD_DEVFUNC_SETPOS 0x03 /* ...setting the layer position */ #define LCD_DEVFUNC_GETPOS 0x04 /* ...getting the layer position */ #define LCD_DEVFUNC_SETSIZE 0x05 /* ...setting the layer size */ #define LCD_DEVFUNC_SETVIS 0x06 /* ...setting the visibility of a layer */ #define LCD_DEVFUNC_24BPP 0x07 /* ...drawing 24bpp bitmaps */ #define LCD_DEVFUNC_NEXT_PIXEL 0x08 /* ...drawing a bitmap pixel by pixel */ #define LCD_DEVFUNC_SET_VRAM_ADDR 0x09 /* ...setting the VRAM address */ #define LCD_DEVFUNC_SET_VSIZE 0x0A /* ...setting the VRAM size */ #define LCD_DEVFUNC_SET_SIZE 0x0B /* ...setting the display size */ #define LCD_DEVFUNC_INIT 0x0C /* ...initializing the display controller */ #define LCD_DEVFUNC_CONTROLCACHE 0x0D /* ...controlling the cache */ #define LCD_DEVFUNC_ON 0x0E /* ...switching the display on */ #define LCD_DEVFUNC_OFF 0x0F /* ...switching the display off */ #define LCD_DEVFUNC_SETLUTENTRY 0x10 /* ...setting a LUT entry */ #define LCD_DEVFUNC_FILLPOLY 0x11 /* ...filling a polygon */ #define LCD_DEVFUNC_FILLPOLYAA 0x12 /* ...filling an antialiased polygon */ #define LCD_DEVFUNC_ALPHAMODE 0x13 /* ...setting the alpha blending mode */ #define LCD_DEVFUNC_CHROMAMODE 0x14 /* ...setting the chroma blending mode */ #define LCD_DEVFUNC_CHROMA 0x15 /* ...setting the chroma values */ #define LCD_DEVFUNC_SETFUNC 0x16 /* ...setting a function pointer */ #define LCD_DEVFUNC_REFRESH 0x17 /* ...refreshing the display */ #define LCD_DEVFUNC_SETRECT 0x18 /* ...setting the drawing rectangle */ /* Setting a function pointer for... */ #define LCD_DEVFUNC_FILLRECT 0x19 /* ...filling a rectangular area */ #define LCD_DEVFUNC_DRAWBMP_1BPP 0x20 /* ...drawing a 1bpp bitmap */ #define LCD_DEVFUNC_COPYBUFFER 0x21 /* ...copying complete frame buffers */ #define LCD_DEVFUNC_SHOWBUFFER 0x22 /* ...shows the given buffer */ #define LCD_DEVFUNC_COPYRECT 0x23 /* ...filling a rectangular area */ #define LCD_DEVFUNC_DRAWBMP_16BPP 0x24 /* ...drawing a 16bpp bitmap */ #define LCD_DEVFUNC_DRAWBMP_8BPP 0x25 /* ...drawing a 8bpp bitmap */ #define LCD_DEVFUNC_READPIXEL 0x26 /* ...reading a pixel index */ #define LCD_DEVFUNC_READMPIXELS 0x27 /* ...reading multiple pixel indices */ #define LCD_DEVFUNC_DRAWBMP_32BPP 0x28 /* ...drawing a 32bpp bitmap */ #define LCD_DEVFUNC_SET_BUFFERPTR 0x29 /* ...setting an array of buffer pointers */ /********************************************************************* * * Values for requesting function pointers (memory devices) *//* ... */ /* Request of a function pointer for... */ #define MEMDEV_DEVFUNC_WRITETOACTIVE 0x16 /* ...writing the memory device */ /********************************************************************* * * Values for requesting data *//* ... */ /* Request pointer to... */ #define LCD_DEVDATA_MEMDEV 0x01 /* ...default memory device API */ #define LCD_DEVDATA_PHYSPAL 0x02 /* ...physical palette */ 38 defines /********************************************************************* * * Structures for passing data to LCD_X_DisplayDriver() *//* ... */ typedef struct { void * pVRAM; ...} LCD_X_SETVRAMADDR_INFO; typedef struct { int xPos, yPos; ...} LCD_X_SETORG_INFO; typedef struct { LCD_COLOR Color; U8 Pos; ...} LCD_X_SETLUTENTRY_INFO; typedef struct { int xSize, ySize; ...} LCD_X_SETSIZE_INFO; typedef struct { int xPos, yPos; int xLen, yLen; int BytesPerPixel; U32 Off; ...} LCD_X_SETPOS_INFO; typedef struct { int Alpha; ...} LCD_X_SETALPHA_INFO; typedef struct { int OnOff; ...} LCD_X_SETVIS_INFO; typedef struct { int AlphaMode; ...} LCD_X_SETALPHAMODE_INFO; typedef struct { int ChromaMode; ...} LCD_X_SETCHROMAMODE_INFO; typedef struct { LCD_COLOR ChromaMin; LCD_COLOR ChromaMax; ...} LCD_X_SETCHROMA_INFO; typedef struct { int Index; ...} LCD_X_SHOWBUFFER_INFO; /********************************************************************* * * Commands for LCD_X_DisplayDriver() *//* ... */ #define LCD_X_INITCONTROLLER 0x01 /* Initializing the display controller */ #define LCD_X_SETVRAMADDR 0x02 /* Setting the video RAM address */ #define LCD_X_SETORG 0x03 /* Setting the origin within a layer */ #define LCD_X_SETLUTENTRY 0x04 /* Setting an entry of the LUT */ #define LCD_X_ON 0x05 /* Switching the display on */ #define LCD_X_OFF 0x06 /* Switching the display off */ #define LCD_X_SETSIZE 0x07 /* Setting the layer size */ #define LCD_X_SETPOS 0x08 /* Setting the layer position */ #define LCD_X_SETVIS 0x09 /* Setting the visibility of a layer */ #define LCD_X_SETALPHA 0x0A /* Setting the alpha value of the layer */ #define LCD_X_SETALPHAMODE 0x0B /* Setting the alpha blending mode */ #define LCD_X_SETCHROMAMODE 0x0C /* Setting the chroma blending mode */ #define LCD_X_SETCHROMA 0x0D /* Setting the chroma values */ #define LCD_X_SHOWBUFFER 0x0E /* Switching to the given buffer */ 14 defines int LCD_X_DisplayDriver(unsigned LayerIndex, unsigned Cmd, void * pData); void LCD_X_Config(void); /********************************************************************* * * Get/Set layer properties *//* ... */ int LCD_GetPosEx (int LayerIndex, int * pxPos, int * pyPos); int LCD_OffEx (int LayerIndex); int LCD_OnEx (int LayerIndex); int LCD_RefreshEx (int LayerIndex); int LCD_SetAlphaEx (int LayerIndex, int Alpha); int LCD_SetAlphaModeEx (int LayerIndex, int AlphaMode); int LCD_SetBufferPtrEx (int LayerIndex, const U32 * pBufferPTR); int LCD_SetChromaEx (int LayerIndex, LCD_COLOR ChromaMin, LCD_COLOR ChromaMax); int LCD_SetChromaModeEx(int LayerIndex, int ChromaMode); int LCD_SetDevFunc (int LayerIndex, int IdFunc, void (* pDriverFunc)(void)); int LCD_SetLUTEntryEx (int LayerIndex, U8 Pos, LCD_COLOR Color); int LCD_SetPosEx (int LayerIndex, int xPos, int yPos); int LCD_SetSizeEx (int LayerIndex, int xSize, int ySize); int LCD_SetVisEx (int LayerIndex, int OnOff); int LCD_SetVRAMAddrEx (int LayerIndex, void * pVRAM); int LCD_SetVSizeEx (int LayerIndex, int xSize, int ySize); int LCD_GetPos (int * pxPos, int * pyPos); int LCD_Off (void); int LCD_On (void); int LCD_Refresh (void); int LCD_SetAlpha (int Alpha); int LCD_SetAlphaMode (int AlphaMode); int LCD_SetBufferPtr (const U32 * pBufferPTR); int LCD_SetChroma (LCD_COLOR ChromaMin, LCD_COLOR ChromaMax); int LCD_SetChromaMode (int ChromaMode); int LCD_SetLUTEntry (U8 Pos, LCD_COLOR Color); void LCD_SetOrg (int xOrg, int yOrg); int LCD_SetPos (int xPos, int yPos); int LCD_SetSize (int xSize, int ySize); int LCD_SetVis (int OnOff); int LCD_SetVRAMAddr (void * pVRAM); int LCD_SetVSize (int xSize, int ySize); /********************************************************************* * * NEXT_PIXEL API support *//* ... */ typedef struct { int (* pfStart) (int x0, int y0, int x1, int y1); void (* pfSetPixel)(LCD_PIXELINDEX PixelIndex); void (* pfNextLine)(void); void (* pfEnd) (void); ...} LCD_API_NEXT_PIXEL; LCD_API_NEXT_PIXEL * LCD_GetNextPixelAPI(void); /********************************************************************* * * LCD_CLIP function table *//* ... */ typedef void tLCD_HL_DrawHLine (int x0, int y0, int x1); typedef void tLCD_HL_DrawPixel (int x0, int y0); typedef struct { tLCD_HL_DrawHLine * pfDrawHLine; tLCD_HL_DrawPixel * pfDrawPixel; ...} tLCD_HL_APIList; void LCD_DrawHLine(int x0, int y0, int x1); void LCD_DrawPixel(int x0, int y0); void LCD_DrawVLine(int x, int y0, int y1); /********************************************************************* * * Declarations for LCD_ *//* ... */ void LCD_SetClipRectEx(const LCD_RECT * pRect); void LCD_SetClipRectMax(void); /* Get device capabilities (0 if not supported) */ I32 LCD_GetDevCap (int Index); I32 LCD_GetDevCapEx(int LayerIndex, int Index); /* Initialize LCD using config-parameters */ int emWin_LCD_Init(void); int LCD_InitColors(void); void LCD_SetBkColor (LCD_COLOR Color); /* Set background color */ void LCD_SetColor (LCD_COLOR Color); /* Set foreground color */ void LCD_SetPixelIndex(int x, int y, int ColorIndex); /* Palette routines (Not available on all drivers) */ void LCD_InitLUT(void); void LCD_SetLUTEx(int LayerIndex, const LCD_PHYSPALETTE * pPalette); void LCD_SetLUT (const LCD_PHYSPALETTE * pPalette); LCD_DRAWMODE LCD_SetDrawMode (LCD_DRAWMODE dm); void LCD_SetColorIndex(unsigned PixelIndex); void LCD_SetBkColorIndex(unsigned PixelIndex); void LCD_FillRect(int x0, int y0, int x1, int y1); typedef void tLCD_SetPixelAA(int x, int y, U8 Intens); void LCD_SetPixelAA4_Trans (int x, int y, U8 Intens); void LCD_SetPixelAA4_NoTrans(int x, int y, U8 Intens); void LCD_SetPixelAA8_Trans (int x, int y, U8 Intens); void LCD_SetPixelAA8_NoTrans(int x, int y, U8 Intens); void LCD_AA_EnableGamma(int OnOff); void LCD_AA_SetGamma (U8 * pGamma); void LCD_AA_GetGamma (U8 * pGamma); LCD_COLOR LCD_AA_MixColors16 (LCD_COLOR Color, LCD_COLOR BkColor, U8 Intens); LCD_COLOR LCD_AA_MixColors256(LCD_COLOR Color, LCD_COLOR BkColor, U8 Intens); LCD_COLOR LCD_MixColors256 (LCD_COLOR Color, LCD_COLOR BkColor, unsigned Intens); LCD_COLOR LCD_GetPixelColor(int x, int y); /* Get RGB color of pixel */ unsigned int LCD_GetPixelIndex(int x, int y); int LCD_GetBkColorIndex (void); int LCD_GetColorIndex (void); #if (GUI_USE_ARGB) U32 LCD_AA_SetOrMask(U32 OrMask); #else U32 LCD_AA_SetAndMask(U32 AndMask); #endif /* Configuration */ int LCD_SetMaxNumColors(unsigned MaxNumColors); int LCD_GetMaxNumColors(void); void LCD__SetPaletteConversionHook(void (* pfPaletteConversionHook)(const LCD_LOGPALETTE * pLogPal)); /********************************************************************* * * Optional support for rotation *//* ... */ #if GUI_SUPPORT_ROTATION typedef void tLCD_DrawBitmap(int x0, int y0, int xsize, int ysize, int xMul, int yMul, int BitsPerPixel, int BytesPerLine, const U8 * pPixel, const void * pTrans); typedef void tRect2TextRect (LCD_RECT * pRect); struct tLCD_APIList_struct { tLCD_DrawBitmap * pfDrawBitmap; tRect2TextRect * pfRect2TextRect; tRect2TextRect * pfTransformRect; ...}; typedef struct tLCD_APIList_struct tLCD_APIList; extern tLCD_APIList LCD_APIListCCW; extern tLCD_APIList LCD_APIListCW; extern tLCD_APIList LCD_APIList180; #define GUI_ROTATION tLCD_APIList #define GUI_ROTATE_CCW &LCD_APIListCCW #define GUI_ROTATE_CW &LCD_APIListCW #define GUI_ROTATE_180 &LCD_APIList180 #define GUI_ROTATE_0 0 5 defines tLCD_SetPixelAA * LCD__GetPfSetPixel(int BitsPerPixel); /* ... */ #endif /********************************************************************* * * Physical color access, internally used only *//* ... */ void LCD__SetPhysColor(U8 Pos, LCD_COLOR Color); /********************************************************************* * * Cache control *//* ... */ #define LCD_CC_UNLOCK (0) /* Default mode: Cache is transparent */ #define LCD_CC_LOCK (1) /* Cache is locked, no write operations */ #define LCD_CC_FLUSH (2) /* Flush cache, do not change mode */ int LCD_ControlCache (int Cmd); int LCD_ControlCacheEx(int LayerIndex, int Cmd); /********************************************************************* * * Color conversion *//* ... */ LCD_PIXELINDEX LCD_Color2Index (LCD_COLOR Color); LCD_COLOR LCD_Index2Color (int Index); LCD_COLOR LCD_Index2ColorEx (int i, unsigned LayerIndex); /********************************************************************* * * LCD_X_... *//* ... */ unsigned char LCD_X_Read00(void); unsigned char LCD_X_Read01(void); void LCD_X_Write00 (unsigned char c); void LCD_X_Write01 (unsigned char c); void LCD_X_WriteM01(unsigned char * pData, int NumBytes); #if defined(__cplusplus) }extern "C" { ... } #endif /* ... */ #endif /* LCD_H */ /*************************** End of file ****************************/