1 /***************************************************************************************
2 ** File Name: lcdc_data_type.h *
4 ** Copyright: 2005 Spreatrum, Incoporated. All Rights Reserved. *
5 ** Description: this file defines macro and data type for LCM and LCDC *
6 ****************************************************************************************
8 ****************************************************************************************
10 **-------------------------------------------------------------------------------------*
11 ** DATE NAME DESCRIPTION *
12 ** 28/09/2005 Jianping.wang Create. *
13 ****************************************************************************************/
15 #ifndef _LCDC_DATA_TYPE_H_
16 #define _LCDC_DATA_TYPE_H_
18 /**------------------------------------------------------------------------------------*
20 **------------------------------------------------------------------------------------*/
21 #include "sci_types.h"
23 /**------------------------------------------------------------------------------------*
25 **------------------------------------------------------------------------------------*/
31 typedef void (* lcdc_func_t) (void);
34 typedef struct lcdc_config_tag
62 typedef struct lcm_config_tag
71 typedef struct lcd_controller_cfg_tag
73 LCDC_CONFIG_T lcdc_cfg;
75 } LCD_CONTROLLER_CFG_T;
76 /**********************************************************************************************************/
77 // LCDC TYPE STRUCTURE
78 /**********************************************************************************************************/
79 typedef struct _LCDC_T_tag
81 uint32 lcdc_mode; //0:LCDC RGB mode,1:LCDC MCU mode
82 uint16 main_lcd_width; //main lcd width
83 uint16 main_lcd_height; //main lcd height
84 uint16 sub_lcd_width; //sub lcd widht
85 uint16 sub_lcd_height; //sub lcd height
86 uint16 main_lcd_cd; //0 means that cd pin is 0 for command,cd pin is 1 for data
87 //1 means that cd pin is 1 for command,cd pin is 0 for data
88 uint16 sub_lcd_cd; //0 means that cd pin is 0 for command,cd pin is 1 for data
89 //1 means that cd pin is 1 for command,cd pin is 0 for data
90 uint32 lcd_background; //lcd background color
91 uint32 mcu_lcd_sum; //when LCDC is MCU mode,lcd sum with lcdc
93 uint32 lcdc_refresh_mode;
94 uint16 main_lcd_cs_pin;
95 uint16 sub_lcd_cs_pin;
99 /**********************************************************************************************************/
100 // DISPLAY BLOCK DATA STRUCTURE
101 /**********************************************************************************************************/
102 typedef union _BLOCK_START_REG_U_tag
106 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
107 volatile uint start_x :12;//block start horizontal coordinate to LCD left top point
108 volatile uint res :4; //reserved
109 volatile uint start_y :12;//block start vertical coordinate to LCD left top point
110 volatile uint priority :3; //0~7,high:7,low:0
111 volatile uint enable :1; //1:enable block;0:disable block;
113 volatile uint enable :1; //1:enable block;0:disable block;
114 volatile uint priority :3; //0~7,high:7,low:0
115 volatile uint start_y :12;//block start vertical coordinate to LCD left top point
116 volatile uint res :4; //reserved
117 volatile uint start_x :12;//block start horizontal coordinate to LCD left top point
120 volatile uint32 value;
123 typedef union _BLOCK_END_REG_U_tag
127 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
128 volatile uint end_x :12;//block end horizontal coordinate to LCD left top point
129 volatile uint end_y :12;//block end vertical coordinate to LCD left top point
130 volatile uint width :8; //block real data width in SDRAM should be sdram_blk_width*8
132 volatile uint width :8; //block real data width in SDRAM should be sdram_blk_width*8
133 volatile uint end_y :12;//block end vertical coordinate to LCD left top point
134 volatile uint end_x :12;//block end horizontal coordinate to LCD left top point
137 volatile uint32 value;
140 typedef union _BLOCK_CONFIG_REG_U_tag
142 struct CONFIG_REG_map
144 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
145 volatile uint alpha :8;
146 volatile uint colorkey :16;
147 volatile uint resolution :2;
148 volatile uint alpha_sel :1;
149 volatile uint colorkey_en :1;
150 volatile uint type :1;
151 volatile uint res :3;
153 volatile uint res :3;
154 volatile uint type :1;
155 volatile uint colorkey_en :1;
156 volatile uint alpha_sel :1;
157 volatile uint resolution :2;
158 volatile uint colorkey :16;
159 volatile uint alpha :8;
162 volatile uint32 value;
163 } BLOCK_CONFIG_REG_U;
165 typedef struct _BLOCK_T_tag
167 BLOCK_START_REG_U blk_start;
168 BLOCK_END_REG_U blk_end;
169 BLOCK_CONFIG_REG_U blk_config;
170 uint32 sdram_addr; //start address of block pixel data
171 uint32 blk_num; //0~5
174 typedef struct _BLOCK_ACCESS_T_tag
176 uint32 blk_num; //0~5
177 uint32 blk_used; //0:don't use this block;1:use this block
178 uint32 blk_mask; //access the block mask.If mask is correct,can access block
181 /**********************************************************************************************************/
182 // LCD COMMAND STRUCTURE
183 /**********************************************************************************************************/
184 typedef struct _LCD_CMD_T_tag
186 volatile uint32 left_cmd; //set LCD display window left position command
187 volatile uint32 top_cmd; //set LCD display window top position command
188 volatile uint32 right_cmd; //set LCD display window right position command
189 volatile uint32 bottom_cmd;//set LCD display window bottom position command
191 /**********************************************************************************************************/
192 // LCDC COLOR STRUCTURE
193 /**********************************************************************************************************/
194 typedef union _COLOR_REG_U_tag
196 struct _COLOR_REG_map
198 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
199 volatile uint colorCoeff :12;
200 volatile uint res :20;//reserved
202 volatile uint res :20;//reserved
203 volatile uint colorCoeff :12;
206 volatile uint32 value;
209 typedef struct _COLORMATRIX_T_tag
221 /**********************************************************************************************************/
222 // LCDC RGB MODE DATA STRUCTURE
223 /**********************************************************************************************************/
224 typedef union _LCDC_RGB_LCD_TIMING0_U
226 struct RGB_TIMING0_map
228 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
229 volatile uint bfw :8;//bit7~bit0,beginning of frame horizontal sync clock wait count - 1
230 volatile uint efw :8;//bit15~bit8,end of frame horizontal sync clock wait count - 1
231 volatile uint vsw :8;//bit23~vit16,Vertical Sync Pulse Width - 1
232 volatile uint res :8;//bit31~bit24,reserved
234 volatile uint res :8;//bit31~bit24,reserved
235 volatile uint vsw :8;//bit23~vit16,Vertical Sync Pulse Width - 1
236 volatile uint efw :8;//bit15~bit8,end of frame horizontal sync clock wait count - 1
237 volatile uint bfw :8;//bit7~bit0,beginning of frame horizontal sync clock wait count - 1
240 volatile uint32 value;
241 } LCDC_RGB_LCD_TIMING0_U;
243 typedef union _LCDC_RGB_LCD_TIMING1_U
245 struct RGB_TIMING1_map
247 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
248 volatile uint blw :8;//8bits,beginning of line pixel cloxk wait count - 1
249 volatile uint elw :8;//8bits,end of line pixel cloxk wait count - 1
250 volatile uint hsw :8;//8bits,Horizontal sync Pulse width - 1
251 volatile uint res :8;//bit31~bit24,reserved
253 volatile uint res :8;//bit31~bit24,reserved
254 volatile uint hsw :8;//8bits,Horizontal sync Pulse width - 1
255 volatile uint elw :8;//8bits,end of line pixel cloxk wait count - 1
256 volatile uint blw :8;//8bits,beginning of line pixel cloxk wait count - 1
260 volatile uint32 value;
261 } LCDC_RGB_LCD_TIMING1_U;
263 typedef union _LCDC_RGB_LCD_CTRL_U
265 struct RGB_LCD_CTRL_map
267 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
268 volatile uint res_1 :1; //1bit,ScalingUp,for LCD,bypass scalingUP mode
269 volatile uint hsync_pol :1; //1bit,0:LCD_HSYNC is valid when it is 1'b1;1:LCD_HSYNC is valid when it is 1'b0
270 volatile uint vsync_pol :1; //1bit,0:LCD_VSYNC is valid when it is 1'b1;1:LCD_VSYNC is valid when it is 1'b0
271 volatile uint enable_pol :1; //1bit,0:LCD_Enable is valid when it is 1'b1;1:LCD_Enable is valid when it is 1'b0
272 volatile uint lcd_bpp :2; //2bits,Bit Per Pixel;00¡êo888 01¡êo666;10: 565 11: Rsved
273 volatile uint trans_cycle :1; //1bits,0: 1 cycle per Pixel;1: 3 cycle per Pixel
274 volatile uint rb_format :1; //1bits,0: pixel output sequence is RGB 1: output sequence is BGR
275 volatile uint res :24;//bit31~bit8
277 volatile uint res :24;//bit31~bit8
278 volatile uint rb_format :1; //1bits,0: pixel output sequence is RGB 1: output sequence is BGR
279 volatile uint trans_cycle :1; //1bits,0: 1 cycle per Pixel;1: 3 cycle per Pixel
280 volatile uint lcd_bpp :2; //2bits,Bit Per Pixel;00¡êo888 01¡êo666;10: 565 11: Rsved
281 volatile uint enable_pol :1; //1bit,0:LCD_Enable is valid when it is 1'b1;1:LCD_Enable is valid when it is 1'b0
282 volatile uint vsync_pol :1; //1bit,0:LCD_VSYNC is valid when it is 1'b1;1:LCD_VSYNC is valid when it is 1'b0
283 volatile uint hsync_pol :1; //1bit,0:LCD_HSYNC is valid when it is 1'b1;1:LCD_HSYNC is valid when it is 1'b0
284 volatile uint res_1 :1; //1bit,ScalingUp,for LCD,bypass scalingUP mode
287 volatile uint32 value;
288 } LCDC_RGB_LCD_CTRL_U;
290 typedef struct _LCDC_RGB_INT_ENA_T_tag
292 uint16 end_of_frame; //1bit:0:disable;1:enable
293 uint16 start_of_frame;//1bit:0:disable;1:enable
294 } LCDC_RGB_INT_ENA_T;
296 typedef struct _LCDC_RGB_SPEC_T_tag
298 // LCDC_RGB_LCD_TIMING0_U timing0;
299 // LCDC_RGB_LCD_TIMING1_U timing1;
300 LCDC_RGB_LCD_CTRL_U lcd_ctrl;
303 typedef struct _LCDC_RGB_INFO_T_tag
305 LCDC_RGB_LCD_TIMING0_U timing0;
306 LCDC_RGB_LCD_TIMING1_U timing1;
307 LCDC_RGB_LCD_CTRL_U lcd_ctrl;
309 /**********************************************************************************************************/
310 // LCDC MCU MODE DATA STRUCTURE
311 /**********************************************************************************************************/
312 typedef union _LCDC_MCU_LCD_PARAMETER0_U
314 struct MCU_PARAMETER0_map
316 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
317 volatile uint whpw :4; //Write High Pulse Width
318 volatile uint wlpw :4; //Write Lower Pulse Width
319 volatile uint wcss :2; //Write CS Status
320 volatile uint rhpw :4; //Read High Pulse Width
321 volatile uint rlpw :4; //Read Lower Pulse Width
322 volatile uint rcss :2; //Read CS Status
323 volatile uint res :12;//reserved
325 volatile uint res :12;//reserved
326 volatile uint rcss :2; //Read CS Status
327 volatile uint rlpw :4; //Read Lower Pulse Width
328 volatile uint rhpw :4; //Read High Pulse Width
329 volatile uint wcss :2; //Write CS Status
330 volatile uint wlpw :4; //Write Lower Pulse Width
331 volatile uint whpw :4; //Write High Pulse Width
334 volatile uint32 value;
335 } LCDC_MCU_LCD_PARAMETER0_U;
337 typedef union _LCDC_MCU_LCD_PARAMETER1_U
339 struct MCU_PARAMETER1_map
341 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
342 volatile uint whpw :4; //Write High Pulse Width
343 volatile uint wlpw :4; //Write Lower Pulse Width
344 volatile uint wcss :2; //Write CS Status
345 volatile uint rhpw :4; //Read High Pulse Width
346 volatile uint rlpw :4; //Read Lower Pulse Width
347 volatile uint rcss :2; //Read CS Status
348 volatile uint res :12;//reserved
350 volatile uint res :12;//reserved
351 volatile uint rcss :2; //Read CS Status
352 volatile uint rlpw :4; //Read Lower Pulse Width
353 volatile uint rhpw :4; //Read High Pulse Width
354 volatile uint wcss :2; //Write CS Status
355 volatile uint wlpw :4; //Write Lower Pulse Width
356 volatile uint whpw :4; //Write High Pulse Width
359 volatile uint32 value;
360 } LCDC_MCU_LCD_PARAMETER1_U;
362 typedef union _LCDC_MCU_MODESEL_U
364 struct MCU_MODESEL_map
366 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
367 volatile uint modesel0 :1; //ModeSel0:0: 8080;1: 6800
368 volatile uint modesel1 :1; //ModeSel1:0: 8080;1: 6800
369 volatile uint res :30;//reserved
371 volatile uint res :30;//reserved
372 volatile uint modesel1 :1; //ModeSel1:0: 8080;1: 6800
373 volatile uint modesel0 :1; //ModeSel0:0: 8080;1: 6800
376 volatile uint32 value;
377 } LCDC_MCU_LCD_MODESEL_U;
379 typedef union _LCDC_MCU_RGBMODE_U
381 struct MCU_RGBMODE_map
383 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
384 volatile uint cs0_rgb_mode :2; //CS0 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
385 volatile uint cs1_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
386 volatile uint res :28;//reserved
388 volatile uint res :28;//reserved
389 volatile uint cs1_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
390 volatile uint cs0_rgb_mode :2; //CS0 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
393 volatile uint32 value;
394 } LCDC_MCU_LCD_RGBMODE_U;
396 typedef struct _LCDC_MCU_SPEC_T_tag
398 LCDC_MCU_LCD_PARAMETER0_U parameter0;
399 LCDC_MCU_LCD_PARAMETER1_U parameter1;
400 LCDC_MCU_LCD_MODESEL_U modesel;
401 LCDC_MCU_LCD_RGBMODE_U rgbmode;
405 typedef struct _LCDC_MCU_INFO_T_tag
407 LCDC_MCU_LCD_PARAMETER0_U parameter0;
408 LCDC_MCU_LCD_PARAMETER1_U parameter1;
409 LCDC_MCU_LCD_MODESEL_U modesel;
410 LCDC_MCU_LCD_RGBMODE_U rgbmode;
411 uint32 lcd_cd[2];//0:command is 0,data is 1,1:command is 1,data is 0
412 uint32 lcd_sum; //lcd total number
415 typedef struct _LCDC_MCU_CMD_DATA_ADDR_tag
420 /**********************************************************************************************************/
421 // LCD INTERRUPT STRUCTURE
422 /**********************************************************************************************************/
423 typedef struct _LCD_INT_ENA_T_tag
425 LCDC_RGB_INT_ENA_T rgb_int_enable;//is used only when lcdc rgb mode
426 uint32 mcu_endofosd_en; //1:enable;0:disable,is used only when lcdc mcu mode
428 /**********************************************************************************************************/
429 // LCDC SPEC STRUCTURE
430 /**********************************************************************************************************/
431 typedef struct _LCDC_SPEC_T_tag
433 LCDC_RGB_SPEC_T rgb_lcd_spec;
434 LCDC_MCU_SPEC_T mcu_lcd_spec;
436 /**********************************************************************************************************/
437 // LCD INFORMATION STRUCTURE
438 /**********************************************************************************************************/
439 typedef struct _LCDC_INFO_T_tag
441 LCDC_RGB_INFO_T rgb_info;
442 LCDC_MCU_INFO_T mcu_info;
445 /**********************************************************************************************************/
446 // LCM TYPE STRUCTURE
447 /**********************************************************************************************************/
448 typedef struct _LCM_TYPE_T_tag
450 uint16 lcm_lcd_sum; //when use LCM module,lcd sum
451 uint16 lcm_lcd_databits_max; //LCD linked to LCM data bits number maximum
453 /**********************************************************************************************************/
454 // LCM CONFIGURE STRUCTURE
455 /**********************************************************************************************************/
456 typedef union _LCM_LCD_PARAMETER_U_tag
458 struct LCM_PARAMETER_map
460 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
461 volatile uint whpw :4; //Write High Pulse Width
462 volatile uint wlpw :4; //Write Lower Pulse Width
463 volatile uint wcss :2; //Write CS Setup time
464 volatile uint rhpw :4; //Read High Pulse Width
465 volatile uint rlpw :4; //Read Lower Pulse Width
466 volatile uint rcss :2; //Read CS Setup time
467 volatile uint res :12;//reserved
469 volatile uint res :12;//reserved
470 volatile uint rcss :2; //Read CS Setup time
471 volatile uint rlpw :4; //Read Lower Pulse Width
472 volatile uint rhpw :4; //Read High Pulse Width
473 volatile uint wcss :2; //Write CS Setup time
474 volatile uint wlpw :4; //Write Lower Pulse Width
475 volatile uint whpw :4; //Write High Pulse Width
478 volatile uint32 value;
479 } LCM_LCD_PARAMETER_U;
480 typedef union _LCM_LCD_PARAMETER0_U_tag
482 struct LCM_PARAMETER0_map
484 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
485 volatile uint whpw :4; //Write High Pulse Width
486 volatile uint wlpw :4; //Write Lower Pulse Width
487 volatile uint wcss :2; //Write CS Setup time
488 volatile uint rhpw :4; //Read High Pulse Width
489 volatile uint rlpw :4; //Read Lower Pulse Width
490 volatile uint rcss :2; //Read CS Setup time
491 volatile uint res :12;//reserved
493 volatile uint res :12;//reserved
494 volatile uint rcss :2; //Read CS Status
495 volatile uint rlpw :4; //Read Lower Pulse Width
496 volatile uint rhpw :4; //Read High Pulse Width
497 volatile uint wcss :2; //Write CS Status
498 volatile uint wlpw :4; //Write Lower Pulse Width
499 volatile uint whpw :4; //Write High Pulse Width
502 volatile uint32 value;
503 } LCM_LCD_PARAMETER0_U;
505 typedef union _LCM_LCD_PARAMETER1_U_tag
507 struct LCM_PARAMETER1_map
509 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
510 volatile uint whpw :4; //Write High Pulse Width
511 volatile uint wlpw :4; //Write Lower Pulse Width
512 volatile uint wcss :2; //Write CS Setup time
513 volatile uint rhpw :4; //Read High Pulse Width
514 volatile uint rlpw :4; //Read Lower Pulse Width
515 volatile uint rcss :2; //Read CS Setup time
516 volatile uint res :12;//reserved
518 volatile uint res :12;//reserved
519 volatile uint rcss :2; //Read CS Status
520 volatile uint rlpw :4; //Read Lower Pulse Width
521 volatile uint rhpw :4; //Read High Pulse Width
522 volatile uint wcss :2; //Write CS Status
523 volatile uint wlpw :4; //Write Lower Pulse Width
524 volatile uint whpw :4; //Write High Pulse Width
527 volatile uint32 value;
528 } LCM_LCD_PARAMETER1_U;
530 typedef union _LCM_MODESEL_U
534 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
535 volatile uint modesel0 :1; //ModeSel0:0: 8080;1: 6800
536 volatile uint modesel1 :1; //ModeSel1:0: 8080;1: 6800
537 volatile uint modesel2 :1; //ModeSel1:0: 8080;1: 6800
538 volatile uint modesel3 :1; //ModeSel1:0: 8080;1: 6800
539 volatile uint modesel4 :1; //ModeSel1:0: 8080;1: 6800
540 volatile uint modesel5 :1; //ModeSel1:0: 8080;1: 6800
541 volatile uint res :26;//reserved
543 volatile uint res :26;//reserved
544 volatile uint modesel5 :1; //ModeSel1:0: 8080;1: 6800
545 volatile uint modesel4 :1; //ModeSel1:0: 8080;1: 6800
546 volatile uint modesel3 :1; //ModeSel1:0: 8080;1: 6800
547 volatile uint modesel2 :1; //ModeSel1:0: 8080;1: 6800
548 volatile uint modesel1 :1; //ModeSel1:0: 8080;1: 6800
549 volatile uint modesel0 :1; //ModeSel0:0: 8080;1: 6800
552 volatile uint32 value;
555 typedef union _LCM_RGBMODE_U
559 #if defined CHIP_ENDIAN_LITTLE && !defined _BIG_ENDIAN
560 volatile uint cs0_rgb_mode :2; //CS0 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
561 volatile uint cs1_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
562 volatile uint cs2_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
563 volatile uint cs3_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
564 volatile uint cs4_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
565 volatile uint cs5_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
566 volatile uint res :20;//reserved
568 volatile uint res :20;//reserved
569 volatile uint cs5_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
570 volatile uint cs4_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
571 volatile uint cs3_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
572 volatile uint cs2_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
573 volatile uint cs1_rgb_mode :2; //CS1 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
574 volatile uint cs0_rgb_mode :2; //CS0 device RGB mode:2'b00¡êo16bit (565);2'b01¡êo18bit (666);2'b10: 8bit;2'b11: 9bit
577 volatile uint32 value;
579 typedef struct _LCM_LCDC_SPEC_T_tag
581 // LCM_LCD_PARAMETER0_U para0;
582 // LCM_LCD_PARAMETER1_U para1;
583 LCM_LCD_MODESEL_U mode_sel;
584 LCM_LCD_RGBMODE_U rgb_mode;
586 /**********************************************************************************************************/
587 // LCM LCD INFORMATION STRUCTURE
588 /**********************************************************************************************************/
589 typedef struct _LCM_LCDC_INFO_T_tag
591 LCM_LCD_PARAMETER0_U para0;
592 LCM_LCD_PARAMETER1_U para1;
593 LCM_LCD_MODESEL_U mode_sel;
594 LCM_LCD_RGBMODE_U rgb_mode;
597 /**********************************************************************************************************/
598 // LCM PIN USE STRUCTURE
599 /**********************************************************************************************************/
600 typedef struct _LCM_LCD_PIN_T_tag
604 uint8 lcd_used;//0:don't used;1:is used
608 typedef struct _LCM_PIN_USE_T_tag
618 /**********************************************************************************************************/
619 // OPERATION RETURN RESULT
620 /**********************************************************************************************************/
621 #define LCD_ERROR_BASE 0
622 #define LCD_OK (LCD_ERROR_BASE - 0) //operation success
623 #define LCD_ERROR_RGB_BPP (LCD_ERROR_BASE - 1) //RGB mode,LCD pixel bit sum is wrong
624 #define LCD_ERROR_MALLOC_BLOCK (LCD_ERROR_BASE - 2) //malloc block fail
625 #define LCD_ERROR_DISPLAYWINDOW (LCD_ERROR_BASE - 3) //lcd display window is wrong
626 #define LCD_ERROR_POINTER_NULL (LCD_ERROR_BASE - 4) //pointer is null
627 #define LCD_ERROR_LCD_ID (LCD_ERROR_BASE - 5) //lcd id is wrong
628 #define LCD_ERROR_LCD_DISPLAY_SIZE (LCD_ERROR_BASE - 6) //lcd display size is wrong
629 #define LCD_ERROR_MODE (LCD_ERROR_BASE - 7) //lcdc mode is wrong
630 #define LCD_ERROR_MODE_OPERATION (LCD_ERROR_BASE - 8) //mode and operation are mismatches
631 #define LCD_ERROR_BLOCK_NUMBER (LCD_ERROR_BASE - 9) //display block num is wrong
632 #define LCD_ERROR_ACCESS_MASK (LCD_ERROR_BASE - 10)//can't access display block
633 #define LCD_ERROR_RESOLUTION (LCD_ERROR_BASE - 11)//display data resolution is wrong
634 #define LCD_ERROR_BLOCK_POSITION (LCD_ERROR_BASE - 12)//block position is wrong
635 #define LCD_ERROR_TV_MODE (LCD_ERROR_BASE - 13)//tv mode is wrong
636 #define LCD_ERROR_LCM_PIN_USE (LCD_ERROR_BASE - 14)//LCM pin reuse is wrong
637 #define LCD_ERROR_LCM_RGBMODE (LCD_ERROR_BASE - 15)//LCM RGB mode is wrong
638 #define LCD_ERROR_LCM_LCD_SUM (LCD_ERROR_BASE - 16)//LCD sum is mismatch with LCD rgb mode for LCM
639 #define LCD_ERROR_CD_LEVEL (LCD_ERROR_BASE - 17)//LCD cd level is wrong
640 #define LCD_ERROR_NO_SUPPORT (LCD_ERROR_BASE - 18)//not support interface
641 #define LCD_ERROR_LCD_BITS (LCD_ERROR_BASE - 19)//LCD bits error
642 #define LCD_ERROR_LCD_PIXEL_NUM (LCD_ERROR_BASE - 20)//refresh pixels number is wrong
643 #define LCD_ERROR_NO_FOUND (LCD_ERROR_BASE - 100)
644 /**********************************************************************************************************/
646 /**-----------------------------------------------------------------------------------------*
648 **-----------------------------------------------------------------------------------------*/
654 #endif//end of _LCDC_DATA_TYPE_H
656 //end of lcdc_data_type.h