2020//LCD重要参数集
2121typedef struct
2222{
23- uint16_t width ; //LCD 宽度
24- uint16_t height ; //LCD 高度
25- uint16_t id ; //LCD ID
26- uint8_t dir ; //横屏还是竖屏控制:0,竖屏;1,横屏。
27- uint16_t wramcmd ; //开始写gram指令
28- uint16_t setxcmd ; //设置x坐标指令
29- uint16_t setycmd ; //设置y坐标指令
23+ uint16_t width ; //LCD 宽度
24+ uint16_t height ; //LCD 高度
25+ uint16_t id ; //LCD ID
26+ uint8_t dir ; //横屏还是竖屏控制:0,竖屏;1,横屏。
27+ uint16_t wramcmd ; //开始写gram指令
28+ uint16_t setxcmd ; //设置x坐标指令
29+ uint16_t setycmd ; //设置y坐标指令
3030}_lcd_dev ;
3131
3232//LCD参数
33- extern _lcd_dev lcddev ; //管理LCD重要参数
33+ extern _lcd_dev lcddev ; //管理LCD重要参数
3434
3535typedef struct
3636{
@@ -39,33 +39,33 @@ typedef struct
3939}LCD_CONTROLLER_TypeDef ;
4040
4141//扫描方向定义
42- #define L2R_U2D 0 //从左到右,从上到下
43- #define L2R_D2U 1 //从左到右,从下到上
44- #define R2L_U2D 2 //从右到左,从上到下
45- #define R2L_D2U 3 //从右到左,从下到上
42+ #define L2R_U2D 0 //从左到右,从上到下
43+ #define L2R_D2U 1 //从左到右,从下到上
44+ #define R2L_U2D 2 //从右到左,从上到下
45+ #define R2L_D2U 3 //从右到左,从下到上
4646
47- #define U2D_L2R 4 //从上到下,从左到右
48- #define U2D_R2L 5 //从上到下,从右到左
49- #define D2U_L2R 6 //从下到上,从左到右
50- #define D2U_R2L 7 //从下到上,从右到左
47+ #define U2D_L2R 4 //从上到下,从左到右
48+ #define U2D_R2L 5 //从上到下,从右到左
49+ #define D2U_L2R 6 //从下到上,从左到右
50+ #define D2U_R2L 7 //从下到上,从右到左
5151
5252#define DFT_SCAN_DIR L2R_U2D //默认的扫描方向
5353
5454//LCD分辨率设置
55- #define SSD_HOR_RESOLUTION 800 //LCD水平分辨率
56- #define SSD_VER_RESOLUTION 480 //LCD垂直分辨率
55+ #define SSD_HOR_RESOLUTION 800 //LCD水平分辨率
56+ #define SSD_VER_RESOLUTION 480 //LCD垂直分辨率
5757//LCD驱动参数设置
58- #define SSD_HOR_PULSE_WIDTH 1 //水平脉宽
59- #define SSD_HOR_BACK_PORCH 46 //水平前廊
60- #define SSD_HOR_FRONT_PORCH 210 //水平后廊
58+ #define SSD_HOR_PULSE_WIDTH 1 //水平脉宽
59+ #define SSD_HOR_BACK_PORCH 46 //水平前廊
60+ #define SSD_HOR_FRONT_PORCH 210 //水平后廊
6161
62- #define SSD_VER_PULSE_WIDTH 1 //垂直脉宽
63- #define SSD_VER_BACK_PORCH 23 //垂直前廊
64- #define SSD_VER_FRONT_PORCH 22 //垂直前廊
62+ #define SSD_VER_PULSE_WIDTH 1 //垂直脉宽
63+ #define SSD_VER_BACK_PORCH 23 //垂直前廊
64+ #define SSD_VER_FRONT_PORCH 22 //垂直前廊
6565//如下几个参数,自动计算
66- #define SSD_HT (SSD_HOR_RESOLUTION+SSD_HOR_BACK_PORCH+SSD_HOR_FRONT_PORCH)
67- #define SSD_HPS (SSD_HOR_BACK_PORCH)
68- #define SSD_VT (SSD_VER_RESOLUTION+SSD_VER_BACK_PORCH+SSD_VER_FRONT_PORCH)
66+ #define SSD_HT (SSD_HOR_RESOLUTION+SSD_HOR_BACK_PORCH+SSD_HOR_FRONT_PORCH)
67+ #define SSD_HPS (SSD_HOR_BACK_PORCH)
68+ #define SSD_VT (SSD_VER_RESOLUTION+SSD_VER_BACK_PORCH+SSD_VER_FRONT_PORCH)
6969#define SSD_VPS (SSD_VER_BACK_PORCH)
7070
7171
0 commit comments