Skip to content

Commit 0872171

Browse files
committedMay 24, 2023
doc: add doxygen comment
1 parent ce239d2 commit 0872171

File tree

2 files changed

+104
-16
lines changed

2 files changed

+104
-16
lines changed
 

‎libraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
1+
/*
2+
* Copyright 2023 Arduino SA
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU Lesser General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public License
15+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
*
17+
*/
18+
119
/**
2-
******************************************************************************
3-
* @file Arduino_H7_Video.cpp
4-
* @author
5-
* @version
6-
* @date
7-
* @brief
8-
******************************************************************************
9-
*/
20+
* @file Arduino_H7_Video.cpp
21+
* @author Leonardo Cavagnis
22+
* @brief Source file for the Arduino H7 Video library.
23+
*/
1024

1125
/* Includes ------------------------------------------------------------------*/
1226
#include "Arduino_H7_Video.h"

‎libraries/Arduino_H7_Video/src/Arduino_H7_Video.h

Lines changed: 82 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1+
/*
2+
* Copyright 2023 Arduino SA
3+
*
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU Lesser General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public License
15+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
16+
*
17+
*/
18+
119
/**
2-
******************************************************************************
3-
* @file Arduino_H7_Video.h
4-
* @author
5-
* @version
6-
* @date
7-
* @brief
8-
******************************************************************************
9-
*/
20+
* @file Arduino_H7_Video.h
21+
* @author Leonardo Cavagnis
22+
* @brief Header file for the Arduino H7 Video library.
23+
*
24+
* This library allows to manage the video output on Arduino boards based on the STM32H7 microcontroller
25+
* providing functions to draw graphics on the screen.
26+
*/
1027

1128
#ifndef _ARDUINO_H7_VIDEO_H
1229
#define _ARDUINO_H7_VIDEO_H
@@ -23,31 +40,88 @@
2340
/* Exported enumeration ------------------------------------------------------*/
2441

2542
/* Class ----------------------------------------------------------------------*/
43+
44+
/**
45+
* @class Arduino_H7_Video
46+
* @brief The main class for managing the video controller and the display.
47+
*/
2648
class Arduino_H7_Video
2749
#ifdef HAS_ARDUINOGRAPHICS
2850
: public ArduinoGraphics
2951
#endif
3052
{
3153
public:
54+
/**
55+
* @brief Constructs a new Arduino_H7_Video object with the specified width, height, and display shield.
56+
*
57+
* @param width The width of the display.
58+
* @param height The height of the display.
59+
* @param shield The display shield used.
60+
* - GigaDisplayShield: Giga Display Shield
61+
* - USBCVideo: Display attach to the USB-C port
62+
*/
3263
#if defined(ARDUINO_PORTENTA_H7_M7)
3364
Arduino_H7_Video(int width = 1024, int height = 768, H7DisplayShield &shield = USBCVideo);
3465
#elif defined(ARDUINO_GIGA)
3566
Arduino_H7_Video(int width = 800, int height = 480, H7DisplayShield &shield = GigaDisplayShield);
3667
#endif
68+
69+
/**
70+
* @brief Destructor for the Arduino_H7_Video object.
71+
*/
3772
~Arduino_H7_Video();
3873

74+
/**
75+
* @brief Initialize the video controller and display.
76+
*
77+
* @return int 0 if initialization is successful, otherwise an error code.
78+
*/
3979
int begin();
80+
81+
/**
82+
* @brief De-initialize the video controller and display.
83+
*/
4084
void end();
4185

86+
/**
87+
* @brief Get the width of the display.
88+
*
89+
* @return int The width of the display.
90+
*/
4291
int width();
92+
93+
/**
94+
* @brief Get the height of the display.
95+
*
96+
* @return int The height of the display.
97+
*/
4398
int height();
4499

45100
#ifdef HAS_ARDUINOGRAPHICS
101+
/**
102+
* @brief Clear the display.
103+
*/
46104
void clear();
47105

106+
/**
107+
* @brief Begin drawing operations on the display.
108+
*/
48109
virtual void beginDraw();
110+
111+
/**
112+
* @brief End drawing operations on the display.
113+
*/
49114
virtual void endDraw();
50115

116+
/**
117+
* @brief Set the color of the pixel at the specified coordinates.
118+
*
119+
* @param x The x-coordinate of the pixel.
120+
* @param y The y-coordinate of the pixel.
121+
* @param r The red component of the color.
122+
* @param g The green component of the color.
123+
* @param b The blue component of the color.
124+
*/
51125
virtual void set(int x, int y, uint8_t r, uint8_t g, uint8_t b);
52126
#endif
53127
private:

0 commit comments

Comments
 (0)
Please sign in to comment.