Skip to content

Commit 454c852

Browse files
leonardocavagnisfacchinm
authored andcommitted
rename H7_Video lib in Arduino_H7_Video library
1 parent 1e44e29 commit 454c852

23 files changed

+39
-32
lines changed

libraries/H7_Video/examples/ArduinoLogo/ArduinoLogo.ino libraries/Arduino_H7_Video/examples/ArduinoLogo/ArduinoLogo.ino

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
by Leonardo Cavagnis
66
*/
77

8-
#include "ArduinoGraphics.h"
9-
#include "H7_Video.h" // H7_Video depends on ArduinoGraphics
8+
#include "Arduino_H7_Video.h"
109

1110
#include "img_arduinologo.h"
1211
// Alternatively, any raw RGB565 image can be included on demand using this macro
@@ -17,8 +16,8 @@
1716
INCBIN(test, "/home/user/Downloads/test.bin");
1817
*/
1918

20-
H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
21-
//H7_Video Display(720, 480);
19+
Arduino_H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
20+
//Arduino_H7_Video Display(720, 480);
2221

2322
void setup() {
2423
Display.begin();

libraries/H7_Video/examples/ArduinoLogoDrawing/ArduinoLogoDrawing.ino libraries/Arduino_H7_Video/examples/ArduinoLogoDrawing/ArduinoLogoDrawing.ino

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
by Leonardo Cavagnis
66
*/
77

8-
#include "ArduinoGraphics.h"
9-
#include "H7_Video.h" // H7_Video depends on ArduinoGraphics
8+
#include "Arduino_H7_Video.h"
109

11-
H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
12-
//H7_Video Display(720, 480);
10+
Arduino_H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
11+
//Arduino_H7_Video Display(720, 480);
1312

1413
void setup() {
1514
Display.begin();

libraries/H7_Video/examples/LVGLDemo/LVGLDemo.ino libraries/Arduino_H7_Video/examples/LVGLDemo/LVGLDemo.ino

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
#include "H7_Video.h"
1+
2+
/*
3+
LVGLDemo
4+
5+
created DD MMM YYYY
6+
by Leonardo Cavagnis
7+
*/
8+
9+
#include "Arduino_H7_Video.h"
10+
211
#include "lvgl.h"
312
#include "giga_touch.h"
413

5-
H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
6-
//H7_Video Display(720, 480);
14+
Arduino_H7_Video Display(480, 800, GIGA_DISPLAY_SHIELD);
15+
//Arduino_H7_Video Display(720, 480);
716

817
//@TODO: Complete demo with 4 main features
918

Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name=H7_Video
1+
name=Arduino_H7_Video
22
version=1.0
33
author=Arduino
44
maintainer=Arduino <info@arduino.cc>
55
sentence=video primitives for Portenta H7 and Giga R1
66
paragraph=
77
category=Display
8-
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/H7_Video
8+
url=https://github.com/arduino/ArduinoCore-mbed/tree/master/libraries/Arduino_H7_Video
99
architectures=mbed,mbed_portenta,mbed_giga

libraries/H7_Video/src/H7_Video.cpp libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
******************************************************************************
3-
* @file H7_Video.cpp
3+
* @file Arduino_H7_Video.cpp
44
* @author
55
* @version
66
* @date
@@ -9,7 +9,7 @@
99
*/
1010

1111
/* Includes ------------------------------------------------------------------*/
12-
#include "H7_Video.h"
12+
#include "Arduino_H7_Video.h"
1313

1414
#include "dsi.h"
1515
#include "st7701.h"
@@ -27,23 +27,23 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color
2727
#endif
2828

2929
/* Functions -----------------------------------------------------------------*/
30-
H7_Video::H7_Video(int width, int heigth, DisplayShieldModel shield) :
30+
Arduino_H7_Video::Arduino_H7_Video(int width, int heigth, DisplayShieldModel shield) :
3131
ArduinoGraphics(width, heigth) {
3232
_shield = shield;
3333
}
3434

35-
H7_Video::~H7_Video() {
35+
Arduino_H7_Video::~Arduino_H7_Video() {
3636
}
3737

38-
int H7_Video::begin() {
38+
int Arduino_H7_Video::begin() {
3939
int ret = 0;
4040

4141
ret = begin(true);
4242

4343
return ret;
4444
}
4545

46-
int H7_Video::begin(bool landscape) {
46+
int Arduino_H7_Video::begin(bool landscape) {
4747
if (!ArduinoGraphics::begin()) {
4848
return 0;
4949
}
@@ -120,11 +120,11 @@ int H7_Video::begin(bool landscape) {
120120
return 1;
121121
}
122122

123-
void H7_Video::end() {
123+
void Arduino_H7_Video::end() {
124124
ArduinoGraphics::end();
125125
}
126126

127-
void H7_Video::beginDraw() {
127+
void Arduino_H7_Video::beginDraw() {
128128
ArduinoGraphics::beginDraw();
129129

130130
#if __has_include("lvgl.h")
@@ -134,18 +134,18 @@ void H7_Video::beginDraw() {
134134
dsi_lcdClear(0);
135135
}
136136

137-
void H7_Video::endDraw() {
137+
void Arduino_H7_Video::endDraw() {
138138
ArduinoGraphics::endDraw();
139139

140140
dsi_getNextFrameBuffer();
141141
}
142142

143-
void H7_Video::clear(){
143+
void Arduino_H7_Video::clear(){
144144
uint32_t bg = ArduinoGraphics::background();
145145
dsi_lcdClear(bg);
146146
}
147147

148-
void H7_Video::set(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
148+
void Arduino_H7_Video::set(int x, int y, uint8_t r, uint8_t g, uint8_t b) {
149149
uint32_t x_rot, y_rot;
150150

151151
if (_landscape) {
@@ -170,7 +170,7 @@ void lvgl_displayFlushing(lv_disp_drv_t * disp, const lv_area_t * area, lv_color
170170
lv_disp_flush_ready(disp); /* Indicate you are ready with the flushing*/
171171
}
172172

173-
void H7_Video::attachLVGLTouchCb(void (*touch_cb)(void*,void*)) {
173+
void Arduino_H7_Video::attachLVGLTouchCb(void (*touch_cb)(void*,void*)) {
174174
static lv_indev_drv_t indev_drv; /* Descriptor of a input device driver */
175175
lv_indev_drv_init(&indev_drv); /* Basic initialization */
176176
indev_drv.type = LV_INDEV_TYPE_POINTER; /* Touch pad is a pointer-like device */

libraries/H7_Video/src/H7_Video.h libraries/Arduino_H7_Video/src/Arduino_H7_Video.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
/**
22
******************************************************************************
3-
* @file H7_Video.h
3+
* @file Arduino_H7_Video.h
44
* @author
55
* @version
66
* @date
77
* @brief
88
******************************************************************************
99
*/
1010

11-
#ifndef _H7_VIDEO_H
12-
#define _H7_VIDEO_H
11+
#ifndef _ARDUINO_H7_VIDEO_H
12+
#define _ARDUINO_H7_VIDEO_H
1313

1414
/* Includes ------------------------------------------------------------------*/
1515
#include <ArduinoGraphics.h>
@@ -25,10 +25,10 @@ enum DisplayShieldModel {
2525
};
2626

2727
/* Class ----------------------------------------------------------------------*/
28-
class H7_Video : public ArduinoGraphics {
28+
class Arduino_H7_Video : public ArduinoGraphics {
2929
public:
30-
H7_Video(int width = H7_VIDEO_MAX_WIDTH, int heigth = H7_VIDEO_MAX_HEIGHT, DisplayShieldModel shield = NONE_SHIELD);
31-
virtual ~H7_Video();
30+
Arduino_H7_Video(int width = H7_VIDEO_MAX_WIDTH, int heigth = H7_VIDEO_MAX_HEIGHT, DisplayShieldModel shield = NONE_SHIELD);
31+
virtual ~Arduino_H7_Video();
3232

3333
int begin();
3434
int begin(bool landscape);
@@ -47,4 +47,4 @@ class H7_Video : public ArduinoGraphics {
4747
bool _landscape;
4848
};
4949

50-
#endif /* _H7_VIDEO_H */
50+
#endif /* _ARDUINO_H7_VIDEO_H */
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)