Skip to content

Commit ff0bd6f

Browse files
leonardocavagnisfacchinm
authored andcommitted
cosmetics
1 parent 9ad94f3 commit ff0bd6f

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

libraries/H7_Video/src/dsi.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include <Arduino.h>
1717
#include <anx7625.h>
18-
//#include "stm32h7xx_hal.h"
1918
#include "dsi.h"
2019
#include "SDRAM.h"
2120

libraries/H7_Video/src/dsi.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
#ifndef _DSI_H_
2-
#define _DSI_H_
1+
#ifndef _DSI_H
2+
#define _DSI_H
3+
4+
extern DSI_HandleTypeDef dsi;
35

46
int stm32_dsi_config(uint8_t bus, struct edid *edid, struct display_timing *dt);
57
void stm32_LCD_Clear(uint32_t color);
@@ -13,4 +15,4 @@ uint32_t stm32_getYSize(void);
1315
uint32_t getFramebufferEnd(void );
1416
DMA2D_HandleTypeDef* stm32_get_DMA2D(void);
1517

16-
#endif /* _DSI_H_ */
18+
#endif /* _DSI_H */

libraries/H7_Video/src/st7701.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include "Arduino.h"
22
#include "st7701.h"
3+
#include "dsi.h"
34

45
/* Command2 BKx selection command */
56
#define DSI_CMD2BKX_SEL 0xFF
@@ -36,22 +37,21 @@
3637
#define Set_RESET(a,b)
3738
#define SSD_LANE(a,b)
3839

39-
extern DSI_HandleTypeDef dsi;
4040
#define hdsi_eval dsi
4141

4242
#define LCD_ST7701_ID 0x00 // VC (Virtual channel, for using muliple displays)
4343

4444
#define Delay(x) delay(x)
4545

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+
4650
static void Generic_Long_Write(uint8_t* pdata, int length);
4751
static void DCS_Short_Write_NP(uint8_t data0);
4852
static void Generic_Short_Write_1P(uint8_t data0, uint8_t data1);
4953
static void DCS_Short_Read_NP(uint8_t data0, int length, uint8_t* p_data);
5054

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-
5555
void st7701_init(void) {
5656
DCS_Short_Write_NP(MIPI_DCS_SOFT_RESET);
5757
Delay(200);
@@ -206,7 +206,7 @@ void DCS_Short_Write_NP(uint8_t data0) {
206206
HAL_DSI_ShortWrite(&hdsi_eval, LCD_ST7701_ID, DSI_DCS_SHORT_PKT_WRITE_P1, data0, 0x00); // DSI_DCS_SHORT_PKT_WRITE_P0
207207
}
208208

209-
void Generic_Short_Write_1P (uint8_t data0, uint8_t data1) {
209+
void Generic_Short_Write_1P(uint8_t data0, uint8_t data1) {
210210
HAL_DSI_ShortWrite(&hdsi_eval, LCD_ST7701_ID, DSI_GEN_SHORT_PKT_WRITE_P1, data0, data1);
211211
}
212212

libraries/H7_Video/src/st7701.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#ifndef ST7701_H
2-
#define ST7701_H
1+
#ifndef _ST7701_H
2+
#define _ST7701_H
33

44
void st7701_init();
55

6-
#endif // ST7701_H
6+
#endif // _ST7701_H

0 commit comments

Comments
 (0)