diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/console.c | 44 | ||||
-rw-r--r-- | src/gdisp-readme.txt | 14 | ||||
-rw-r--r-- | src/gdisp.c | 2 | ||||
-rw-r--r-- | src/gdisp_fonts.c | 2 | ||||
-rw-r--r-- | src/graph.c | 2 | ||||
-rw-r--r-- | src/gwin.c | 3 | ||||
-rw-r--r-- | src/touchpad.c | 5 |
7 files changed, 51 insertions, 21 deletions
diff --git a/src/console.c b/src/console.c index 064b6a05..55549fd1 100644 --- a/src/console.c +++ b/src/console.c @@ -18,11 +18,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/**
+ * @file src/console.c
+ * @brief CONSOLE code.
+ *
+ * @addtogroup CONSOLE
+ * @{
+ */
+
#include "ch.h"
#include "hal.h"
#include "console.h"
-#if GFX_USE_CONSOLE
+#if GFX_USE_CONSOLE || defined(__DOXYGEN__)
/*
* Interface implementation. The interface is write only
@@ -86,6 +94,18 @@ static const struct GConsoleVMT vmt = { putt, gett, writet, readt
};
+/**
+ * @brief Initializes a console.
+ *
+ * @param[in] console The console driver struct
+ * @param[in] x0,y0 The location of the upper left corner of the resulting window
+ * @param[in] width, height The width and height of the window
+ * @param[in] font The font to be used when printing to the console
+ * @param[in] bkcolor The background color
+ * @param[in] color The foreground / font color
+ *
+ * @return RDY_OK if done
+ */
msg_t gfxConsoleInit(GConsole *console, coord_t x0, coord_t y0, coord_t width, coord_t height, font_t font, pixel_t bkcolor, pixel_t color) {
console->vmt = &vmt;
/* read font, get height & padding */
@@ -110,6 +130,14 @@ msg_t gfxConsoleInit(GConsole *console, coord_t x0, coord_t y0, coord_t width, c return RDY_OK;
}
+/**
+ * @brief Write a single character to the console.
+ *
+ * @param[in] console The console driver struct
+ * @param[in] c The char to be written
+ *
+ * @return RDY_OK if done
+ */
msg_t gfxConsolePut(GConsole *console, char c) {
uint8_t width;
@@ -164,6 +192,17 @@ msg_t gfxConsolePut(GConsole *console, char c) { return RDY_OK;
}
+/**
+ * @brief Write a string to the console.
+ *
+ * @param[in] console The console driver struct
+ * @param[in] bp The buffer / string
+ * @param[in] n The size of the buffer
+ *
+ * @return RDY_OK if done
+ *
+ * @api
+ */
msg_t gfxConsoleWrite(GConsole *console, const uint8_t *bp, size_t n) {
size_t i;
for(i = 0; i < n; i++)
@@ -172,5 +211,6 @@ msg_t gfxConsoleWrite(GConsole *console, const uint8_t *bp, size_t n) { return RDY_OK;
}
-#endif
+#endif /* GFX_USE_CONSOLE */
+/** @} */
diff --git a/src/gdisp-readme.txt b/src/gdisp-readme.txt deleted file mode 100644 index 28b86077..00000000 --- a/src/gdisp-readme.txt +++ /dev/null @@ -1,14 +0,0 @@ -The new GDISP driver is an architecture independent rewrite of the GLCD interface.
-This new architecture independence should allow many new low level drivers to be easily added.
-
-GDISP allows low-level driver hardware accelerated drawing routines while providing a software emulation
-if the low level driver can not provide it. A basic low level driver now only requires 2 routines to be written.
-
-A glcd.h compatibility file has been included that allow applications written to use the existing GLCD driver to
-use the GDISP driver with little or no change.
-
-It is written in the ChibiOS style with ChibiOS style includes and documentation.
-
-It is encapsulated into a "halext" structure with appropriate readme's that allow for easy inclusion in any
-ChibiOS project. This structure can be seamlessly added to as new driver types are added and it supports
-low level drivers that are neither platform or board specific (although they can be).
diff --git a/src/gdisp.c b/src/gdisp.c index af95f632..2d4e7f3e 100644 --- a/src/gdisp.c +++ b/src/gdisp.c @@ -19,7 +19,7 @@ */
/**
- * @file gdisp.c
+ * @file src/gdisp.c
* @brief GDISP Driver code.
*
* @addtogroup GDISP
diff --git a/src/gdisp_fonts.c b/src/gdisp_fonts.c index a58c538d..bd30342c 100644 --- a/src/gdisp_fonts.c +++ b/src/gdisp_fonts.c @@ -17,6 +17,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
/*
Font tables included into gdisp.c
*/
@@ -653,3 +654,4 @@ #endif /* GDISP_NEED_TEXT */
#endif /* GFX_USE_GDISP */
+
diff --git a/src/graph.c b/src/graph.c index 2a10bf72..51e584c6 100644 --- a/src/graph.c +++ b/src/graph.c @@ -19,7 +19,7 @@ */ /** - * @file graph.c + * @file src/graph.c * @brief GRAPH module code. * * @addtogroup GRAPH @@ -19,7 +19,7 @@ */
/**
- * @file gwin.c
+ * @file src/gwin.c
* @brief GWIN Driver code.
*
* @addtogroup GWIN
@@ -888,3 +888,4 @@ void gwinButtonDraw(GHandle gh) { #endif /* _GWIN_C */
/** @} */
+
diff --git a/src/touchpad.c b/src/touchpad.c index 7559d6d3..d47026b2 100644 --- a/src/touchpad.c +++ b/src/touchpad.c @@ -1,4 +1,4 @@ -/* ChibiOS/GFX - Copyright (C) 2012 +/* ChibiOS/GFX - Copyright (C) 2012 Joel Bodenmann aka Tectu <joel@unormal.org> This file is part of ChibiOS/GFX. @@ -18,12 +18,13 @@ */ /** - * @file touchpad.c + * @file src/touchpad.c * @brief Touchpad Driver code. * * @addtogroup TOUCHPAD * @{ */ + #include "ch.h" #include "hal.h" #include "gdisp.h" |