diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-10-11 09:27:02 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-10-11 09:27:02 +0200 |
commit | 069b0d32d886854e8c6dc959ba6889130a53a348 (patch) | |
tree | 4a76f76ed933f79a08e20881319742664b62171c | |
parent | 4a27e7c7994f7b21d951517e15131b7e67ff74c5 (diff) | |
download | uGFX-069b0d32d886854e8c6dc959ba6889130a53a348.tar.gz uGFX-069b0d32d886854e8c6dc959ba6889130a53a348.tar.bz2 uGFX-069b0d32d886854e8c6dc959ba6889130a53a348.zip |
GConsole -> GConsole_t
-rw-r--r-- | include/console.h | 7 | ||||
-rw-r--r-- | src/console.c | 11 | ||||
-rw-r--r-- | src/gdisp.c | 1 |
3 files changed, 10 insertions, 9 deletions
diff --git a/include/console.h b/include/console.h index 4a60a2d6..e474951c 100644 --- a/include/console.h +++ b/include/console.h @@ -34,15 +34,14 @@ /**
* @brief Structure representing a GConsole driver.
*/
-typedef struct GConsole GConsole;
#ifdef __cplusplus
extern "C" {
#endif
-msg_t lcdConsoleInit(GConsole *console, coord_t x0, coord_t y0, coord_t width, coord_t height, font_t font, pixel_t bkcolor, pixel_t color);
-msg_t lcdConsolePut(GConsole *console, char c);
-msg_t lcdConsoleWrite(GConsole *console, const uint8_t *bp, size_t n);
+msg_t lcdConsoleInit(GConsole_t *console, coord_t x0, coord_t y0, coord_t width, coord_t height, font_t font, pixel_t bkcolor, pixel_t color);
+msg_t lcdConsolePut(GConsole_t *console, char c);
+msg_t lcdConsoleWrite(GConsole_t *console, const uint8_t *bp, size_t n);
#ifdef __cplusplus
}
diff --git a/src/console.c b/src/console.c index a2dc8320..16b18114 100644 --- a/src/console.c +++ b/src/console.c @@ -41,7 +41,7 @@ struct GConsoleVMT { * @details This class extends @p BaseAsynchronousChannel by adding physical
* I/O queues.
*/
-struct GConsole {
+typedef struct _GConsole_t {
/** @brief Virtual Methods Table.*/
const struct GConsoleVMT *vmt;
_base_asynchronous_channel_data
@@ -60,7 +60,7 @@ struct GConsole { uint8_t fy;
/* font inter-character padding in pixels */
uint8_t fp;
-};
+} GConsole_t;
/*
* Interface implementation. The interface is write only
@@ -130,7 +130,7 @@ static const struct GConsoleVMT vmt = { };
-msg_t lcdConsoleInit(GConsole *console, coord_t x0, coord_t y0, coord_t width, coord_t height, font_t font, pixel_t bkcolor, pixel_t color) {
+msg_t lcdConsoleInit(GConsole_t *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 */
console->fy = gdispGetFontMetric(font, fontHeight);
@@ -154,7 +154,7 @@ msg_t lcdConsoleInit(GConsole *console, coord_t x0, coord_t y0, coord_t width, c return RDY_OK;
}
-msg_t lcdConsolePut(GLCDConsole *console, char c) {
+msg_t lcdConsolePut(GLCDConsole_t *console, char c) {
uint8_t width;
if(c == '\n') {
@@ -208,7 +208,7 @@ msg_t lcdConsolePut(GLCDConsole *console, char c) { return RDY_OK;
}
-msg_t lcdConsoleWrite(GLCDConsole *console, const uint8_t *bp, size_t n) {
+msg_t lcdConsoleWrite(GLCDConsole_t *console, const uint8_t *bp, size_t n) {
size_t i;
for(i = 0; i < n; i++)
lcdConsolePut(console, bp[i]);
@@ -217,3 +217,4 @@ msg_t lcdConsoleWrite(GLCDConsole *console, const uint8_t *bp, size_t n) { }
#endif /* GDISP_NEED_CONSOLE */
+
diff --git a/src/gdisp.c b/src/gdisp.c index d566d89f..e8fb699e 100644 --- a/src/gdisp.c +++ b/src/gdisp.c @@ -1122,3 +1122,4 @@ void gdispDrawBox(coord_t x, coord_t y, coord_t cx, coord_t cy, color_t color) { #endif /* _GDISP_C */
/** @} */
+
|