@@ -103,8 +103,74 @@ static VPOST_T DEF_FW070TFT =
103103 0x020001f6 /*!< CRTCVR register value */
104104};
105105
106+ #define FW043TFT_WIDTH 480 /*!< XRES */
107+ #define FW043TFT_HEIGHT 272 /*!< YRES */
108+ #define FW043TFT_MARGIN_LEFT 30 /*!< HBP (Horizontal Back Porch) */
109+ #define FW043TFT_MARGIN_RIGHT 5 /*!< HFP (Horizontal Front Porch) */
110+ #define FW043TFT_MARGIN_UPPER 2 /*!< VBP (Vertical Back Porch) */
111+ #define FW043TFT_MARGIN_LOWER 27 /*!< VFP (Vertical Front Porch) */
112+ #define FW043TFT_HSYNC_LEN 41 /*!< HPW (HSYNC plus width) */
113+ #define FW043TFT_VSYNC_LEN 10 /*!< VPW (VSYNC width) */
114+ static VPOST_T DEF_FW043TFT =
115+ {
116+ FW043TFT_WIDTH , /*!< Panel width */
117+ FW043TFT_HEIGHT , /*!< Panel height */
118+ 0 , /*!< MPU command line low indicator */
119+ 0 , /*!< MPU command width */
120+ 0 , /*!< MPU bus width */
121+ VPOSTB_DATA16or18 , /*!< Display bus width */
122+ 0 , /*!< MPU mode */
123+ VPOSTB_COLORTYPE_16M , /*!< Display colors */
124+ VPOSTB_DEVICE_SYNC_HIGHCOLOR , /*!< Type of display panel */
125+
126+ .sCRTCSIZE =
127+ {
128+ /*!< Horizontal Total */
129+ .HTT = FW043TFT_MARGIN_LEFT + FW043TFT_WIDTH + FW043TFT_MARGIN_RIGHT ,
130+
131+ /*!< Vertical Total */
132+ .VTT = FW043TFT_MARGIN_UPPER + FW043TFT_HEIGHT + FW043TFT_MARGIN_LOWER ,
133+ },
134+ .sCRTCDEND =
135+ {
136+ /*!< Horizontal Display Enable End */
137+ .HDEND = FW043TFT_WIDTH ,
138+
139+ /*!< Vertical Display Enable End */
140+ .VDEND = FW043TFT_HEIGHT ,
141+ },
142+ .sCRTCHR =
143+ {
144+ /*!< Internal Horizontal Retrace Start Timing */
145+ .HRS = FW043TFT_WIDTH + 1 ,
146+
147+ /*!< Internal Horizontal Retrace End Low */
148+ .HRE = FW043TFT_WIDTH + 5 ,
149+ },
150+ .sCRTCHSYNC =
151+ {
152+ /*!< Horizontal Sync Start Timing */
153+ .HSYNC_S = FW043TFT_WIDTH + FW043TFT_MARGIN_LEFT ,
154+
155+ /*!< Horizontal Sync End Timing */
156+ .HSYNC_E = FW043TFT_WIDTH + FW043TFT_MARGIN_LEFT + FW043TFT_HSYNC_LEN ,
157+
158+ /*!< Hsync Signal Adjustment For Multi-Cycles Per Pixel Mode Of Sync-Based Unipac-LCD */
159+ .HSYNC_SHIFT = 0 ,
160+ },
161+ .sCRTCVR =
162+ {
163+ /*!< Vertical Internal Retrace Start Timing */
164+ .VRS = FW043TFT_HEIGHT + FW043TFT_MARGIN_UPPER ,
165+
166+ /*!< Vertical Internal Retrace End Low */
167+ .VRE = FW043TFT_HEIGHT + FW043TFT_MARGIN_UPPER + FW043TFT_VSYNC_LEN ,
168+ }
169+ };
170+
171+
106172/* LCD build-in support list */
107- static VPOST_T * DisplayDevList [4 ] = {& DEF_E50A2V1 , & DEF_ILI9341_MPU80 , & DEF_LSA40AT9001 , & DEF_FW070TFT };
173+ static VPOST_T * DisplayDevList [5 ] = {& DEF_E50A2V1 , & DEF_ILI9341_MPU80 , & DEF_LSA40AT9001 , & DEF_FW070TFT , & DEF_FW043TFT };
108174static VPOST_T curDisplayDev ;
109175static OSDFORMATEX curOSDDev = {0 };
110176static LCDFORMATEX curVADev = {0 };
0 commit comments