Skip to content

Commit f24f6f4

Browse files
leonardocavagnisfacchinm
authored andcommitted
add support for PortentaH7+GIGA Display in H7_Video library
1 parent a8ad320 commit f24f6f4

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

libraries/H7_Video/examples/ArduinoLogo/ArduinoLogo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
INCBIN(test, "/home/user/Downloads/test.bin");
1818
*/
1919

20-
H7_Video Display(480, 800);
20+
H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
2121

2222
void setup() {
2323
Display.begin();

libraries/H7_Video/examples/ArduinoLogoDrawing/ArduinoLogoDrawing.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "ArduinoGraphics.h"
99
#include "H7_Video.h" // H7_Video depends on ArduinoGraphics
1010

11-
H7_Video Display(480, 800);
11+
H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
1212

1313
void setup() {
1414
Display.begin();

libraries/H7_Video/examples/LVGLDemo/LVGLDemo.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "lvgl.h"
33
#include "giga_touch.h"
44

5-
H7_Video Display(480,800);
5+
H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
66

77
//@TODO: Complete demo with 4 main features
88

libraries/H7_Video/examples/LVGLDemo/giga_touch.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ REDIRECT_STDOUT_TO(Serial);
1313
#endif
1414

1515
#ifdef ARDUINO_PORTENTA_H7_M7
16-
#define Wire Wire2
1716
#define INT_PIN PinNameToIndex(PD_4)
1817
#define RST_PIN PinNameToIndex(PD_5)
1918
#endif
@@ -36,7 +35,7 @@ void handleTouch(int8_t contacts, GTPoint *points) {
3635
}
3736

3837
void touchStart() {
39-
if (touch.begin(INT_PIN, RST_PIN, 0xDD) != true) {
38+
if (touch.begin(Wire, INT_PIN, RST_PIN, 0xDD) != true) {
4039
Serial.println("! Module reset failed");
4140
} else {
4241
Serial.println("Module reset OK");

libraries/H7_Video/src/H7_Video.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ int H7_Video::begin(bool landscape) {
3535
if (_shield == NONE_SHIELD) {
3636
portenta_init_video();
3737
} else if (_shield == GIGA_DISPLAY_SHIELD) {
38-
//@TODO Init portenta w/o ANX
38+
giga_init_video();
39+
LCD_ST7701_Init();
3940
}
4041
#elif defined(ARDUINO_GIGA)
4142
giga_init_video();

libraries/H7_Video/src/display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ do { \
207207

208208
void LCD_ST7701_Init(void)
209209
{
210-
pinMode(PD_3, OUTPUT);
210+
pinMode(PD_3, OUTPUT); //Microphone PDM CLK (?)
211211
digitalWrite(PD_3, HIGH);
212212

213213
DCS_Short_Write_NP(MIPI_DCS_SOFT_RESET);

0 commit comments

Comments
 (0)