|
9 | 9 |
|
10 | 10 | #include <esp_cache.h>
|
11 | 11 |
|
| 12 | +/* HX83xx User Define command set 用户自定义命令集 */ |
| 13 | +#define UD_SETADDRESSMODE 0x36 /* Set address mode */ |
| 14 | +#define UD_SETSEQUENCE 0xB0 /* Set sequence */ |
| 15 | +#define UD_SETPOWER 0xB1 /* Set power */ |
| 16 | +#define UD_SETDISP 0xB2 /* Set display related register */ |
| 17 | +#define UD_SETCYC 0xB4 /* Set display waveform cycles */ |
| 18 | +#define UD_SETVCOM 0xB6 /* Set VCOM voltage */ |
| 19 | +#define UD_SETTE 0xB7 /* Set internal TE function */ |
| 20 | +#define UD_SETSENSOR 0xB8 /* Set temperature sensor */ |
| 21 | +#define UD_SETEXTC 0xB9 /* Set extension command */ |
| 22 | +#define UD_SETMIPI 0xBA /* Set MIPI control */ |
| 23 | +#define UD_SETOTP 0xBB /* Set OTP */ |
| 24 | +#define UD_SETREGBANK 0xBD /* Set register bank */ |
| 25 | +#define UD_SETDGCLUT 0xC1 /* Set DGC LUT */ |
| 26 | +#define UD_SETID 0xC3 /* Set ID */ |
| 27 | +#define UD_SETDDB 0xC4 /* Set DDB */ |
| 28 | +#define UD_SETCABC 0xC9 /* Set CABC control */ |
| 29 | +#define UD_SETCABCGAIN 0xCA |
| 30 | +#define UD_SETPANEL 0xCC |
| 31 | +#define UD_SETOFFSET 0xD2 |
| 32 | +#define UD_SETGIP0 0xD3 /* Set GIP Option0 */ |
| 33 | +#define UD_SETGIP1 0xD5 /* Set GIP Option1 */ |
| 34 | +#define UD_SETGIP2 0xD6 /* Set GIP Option2 */ |
| 35 | +#define UD_SETGIP3 0xD8 /* Set GIP Option2 */ |
| 36 | +#define UD_SETGPO 0xD9 |
| 37 | +#define UD_SETSCALING 0xDD |
| 38 | +#define UD_SETIDLE 0xDF |
| 39 | +#define UD_SETGAMMA 0xE0 /* Set gamma curve related setting */ |
| 40 | +#define UD_SETCHEMODE_DYN 0xE4 |
| 41 | +#define UD_SETCHE 0xE5 |
| 42 | +#define UD_SETCESEL 0xE6 /* Enable color enhance */ |
| 43 | +#define UD_SET_SP_CMD 0xE9 |
| 44 | +#define UD_SETREADINDEX 0xFE /* Set SPI Read Index */ |
| 45 | +#define UD_GETSPIREAD 0xFF /* SPI Read Command Data */ |
| 46 | + |
| 47 | + |
| 48 | +static const lcd_init_cmd_t hx8394_init_operations[] = { |
| 49 | + // {cmd, { data }, data_size, delay_ms} |
| 50 | + /* 720 * 1280 */ |
| 51 | + {UD_SETADDRESSMODE, (uint8_t []){0x01}, 1,0}, |
| 52 | + {UD_SETEXTC, (uint8_t []){0xFF, 0x83, 0x94}, 3,0}, |
| 53 | + {UD_SETMIPI, (uint8_t []){0x61, 0x03, 0x68, 0x6B, 0xB2, 0xC0}, 6,0}, //0x61 |
| 54 | + {UD_SETPOWER, (uint8_t []){0x48, 0x12, 0x72, 0x09, 0x32, 0x54, 0x71, 0x71, 0x57, 0x47}, 10,0}, |
| 55 | + {UD_SETDISP, (uint8_t []){0x00, 0x80, 0x64, 0x0C, 0x0D, 0x2F}, 6,0}, |
| 56 | + {UD_SETCYC, (uint8_t []){0x73, 0x74, 0x73, 0x74, 0x73, 0x74, 0x01, 0x0C, 0x86, 0x75, 0x00, 0x3F, 0x73, 0x74, 0x73, 0x74, 0x73, 0x74, 0x01, 0x0C, 0x86}, 21,0}, |
| 57 | + {UD_SETGIP0, (uint8_t []){0x00, 0x00, 0x07, 0x07, 0x40, 0x07, 0x0C, 0x00, 0x08, 0x10, 0x08, 0x00, 0x08, 0x54, 0x15, 0x0A, 0x05, 0x0A, 0x02, 0x15, 0x06, 0x05, 0x06, 0x47, 0x44, 0x0A, 0x0A, 0x4B, 0x10, 0x07, 0x07, 0x0C, 0x40}, 33,0}, |
| 58 | + {UD_SETGIP1, (uint8_t []){0x1C, 0x1C, 0x1D, 0x1D, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x24, 0x25, 0x18, 0x18, 0x26, 0x27, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x20, 0x21, 0x18, 0x18, 0x18, 0x18}, 44,0}, |
| 59 | + {UD_SETGIP2, (uint8_t []){0x1C, 0x1C, 0x1D, 0x1D, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x0B, 0x0A, 0x09, 0x08, 0x21, 0x20, 0x18, 0x18, 0x27, 0x26, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x25, 0x24, 0x18, 0x18, 0x18, 0x18}, 44,0}, |
| 60 | + {UD_SETVCOM, (uint8_t []){0x6E, 0x6E}, 2,0}, //caiji |
| 61 | + {UD_SETGAMMA, (uint8_t []){0x00, 0x0A, 0x15, 0x1B, 0x1E, 0x21, 0x24, 0x22, 0x47, 0x56, 0x65, 0x66, 0x6E, 0x82, 0x88, 0x8B, 0x9A, 0x9D, 0x98, 0xA8, 0xB9, 0x5D, 0x5C, 0x61, 0x66, 0x6A, 0x6F, 0x7F, 0x7F, 0x00, 0x0A, 0x15, 0x1B, 0x1E, 0x21, 0x24, 0x22, 0x47, 0x56, 0x65, 0x65, 0x6E, 0x81, 0x87, 0x8B, 0x98, 0x9D, 0x99, 0xA8, 0xBA, 0x5D, 0x5D, 0x62, 0x67, 0x6B, 0x72, 0x7F, 0x7F}, 58,0}, |
| 62 | + {0xC0, (uint8_t []){0x1F, 0x31}, 2,0}, |
| 63 | + {UD_SETPANEL, (uint8_t []){0x03}, 1,0}, |
| 64 | + {0xD4, (uint8_t []){0x02}, 1,0}, |
| 65 | + {UD_SETREGBANK, (uint8_t []){0x02}, 1,0}, |
| 66 | + {UD_SETGIP3, (uint8_t []){0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}, 12,0}, |
| 67 | + {UD_SETREGBANK, (uint8_t []){0x00}, 1,0}, |
| 68 | + {UD_SETREGBANK, (uint8_t []){0x01}, 1,0}, |
| 69 | + {UD_SETPOWER, (uint8_t []){0x00}, 1,0}, |
| 70 | + {UD_SETREGBANK, (uint8_t []){0x00}, 1,0}, |
| 71 | + {0xBF, (uint8_t []){0x40, 0x81, 0x50, 0x00, 0x1A, 0xFC, 0x01}, 7,0}, |
| 72 | + {0xC6, (uint8_t []){0xED}, 1,0}, |
| 73 | + {0x11, (uint8_t[]){0x00}, 0, 120}, |
| 74 | + {0x29, (uint8_t[]){0x00}, 0, 0}, |
| 75 | +}; |
| 76 | + |
| 77 | + |
12 | 78 | static const lcd_init_cmd_t jd9165_init_operations[] = {
|
13 | 79 | // {cmd, { data }, data_size, delay_ms}
|
14 | 80 | //{0x11, (uint8_t []){0x00}, 1, 120},
|
|
0 commit comments