|
1 | 1 | #include "Arduino.h"
|
2 | 2 | #include "st7701.h"
|
| 3 | +#include "dsi.h" |
3 | 4 |
|
4 | 5 | /* Command2 BKx selection command */
|
5 | 6 | #define DSI_CMD2BKX_SEL 0xFF
|
|
36 | 37 | #define Set_RESET(a,b)
|
37 | 38 | #define SSD_LANE(a,b)
|
38 | 39 |
|
39 |
| -extern DSI_HandleTypeDef dsi; |
40 | 40 | #define hdsi_eval dsi
|
41 | 41 |
|
42 | 42 | #define LCD_ST7701_ID 0x00 // VC (Virtual channel, for using muliple displays)
|
43 | 43 |
|
44 | 44 | #define Delay(x) delay(x)
|
45 | 45 |
|
| 46 | +const uint16_t _E5[17] = {0xE5,0x0E,0x2D,0xA0,0xa0,0x10,0x2D,0xA0,0xA0,0x0A,0x2D,0xA0,0xA0,0x0C,0x2D,0xA0,0xA0}; |
| 47 | +const uint16_t _E8[17] = {0xE8,0x0D,0x2D,0xA0,0xA0,0x0F,0x2D,0xA0,0xA0,0x09,0x2D,0xA0,0xA0,0x0B,0x2D,0xA0,0xA0}; |
| 48 | +const uint16_t _ED[17] = {0xED,0xAB,0x89,0x76,0x54,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x10,0x45,0x67,0x98,0xBA}; |
| 49 | + |
46 | 50 | static void Generic_Long_Write(uint8_t* pdata, int length);
|
47 | 51 | static void DCS_Short_Write_NP(uint8_t data0);
|
48 | 52 | static void Generic_Short_Write_1P(uint8_t data0, uint8_t data1);
|
49 | 53 | static void DCS_Short_Read_NP(uint8_t data0, int length, uint8_t* p_data);
|
50 | 54 |
|
51 |
| -const uint16_t _E5[17] = {0xE5,0x0E,0x2D,0xA0,0xa0,0x10,0x2D,0xA0,0xA0,0x0A,0x2D,0xA0,0xA0,0x0C,0x2D,0xA0,0xA0}; |
52 |
| -const uint16_t _E8[17] = {0xE8,0x0D,0x2D,0xA0,0xA0,0x0F,0x2D,0xA0,0xA0,0x09,0x2D,0xA0,0xA0,0x0B,0x2D,0xA0,0xA0}; |
53 |
| -const uint16_t _ED[17] = {0xED,0xAB,0x89,0x76,0x54,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x10,0x45,0x67,0x98,0xBA}; |
54 |
| - |
55 | 55 | void st7701_init(void) {
|
56 | 56 | DCS_Short_Write_NP(MIPI_DCS_SOFT_RESET);
|
57 | 57 | Delay(200);
|
@@ -206,7 +206,7 @@ void DCS_Short_Write_NP(uint8_t data0) {
|
206 | 206 | HAL_DSI_ShortWrite(&hdsi_eval, LCD_ST7701_ID, DSI_DCS_SHORT_PKT_WRITE_P1, data0, 0x00); // DSI_DCS_SHORT_PKT_WRITE_P0
|
207 | 207 | }
|
208 | 208 |
|
209 |
| -void Generic_Short_Write_1P (uint8_t data0, uint8_t data1) { |
| 209 | +void Generic_Short_Write_1P(uint8_t data0, uint8_t data1) { |
210 | 210 | HAL_DSI_ShortWrite(&hdsi_eval, LCD_ST7701_ID, DSI_GEN_SHORT_PKT_WRITE_P1, data0, data1);
|
211 | 211 | }
|
212 | 212 |
|
|
0 commit comments