diff options
author | Joel Bodenmann <joel@unormal.org> | 2012-12-17 00:16:15 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2012-12-17 00:16:15 +0100 |
commit | d47cf26d31d9ca5c8308b02d498f3296af606d32 (patch) | |
tree | 69256852ae1772eaf7bb5bba468394fcfb71799d /drivers/gdisp/SSD1289 | |
parent | 58b9938db200856bebf99794ba11a51e78954bc7 (diff) | |
download | uGFX-d47cf26d31d9ca5c8308b02d498f3296af606d32.tar.gz uGFX-d47cf26d31d9ca5c8308b02d498f3296af606d32.tar.bz2 uGFX-d47cf26d31d9ca5c8308b02d498f3296af606d32.zip |
SSD1289 reset_viewport quick fix
Diffstat (limited to 'drivers/gdisp/SSD1289')
-rw-r--r-- | drivers/gdisp/SSD1289/gdisp_lld.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gdisp/SSD1289/gdisp_lld.c b/drivers/gdisp/SSD1289/gdisp_lld.c index 49600349..0f000637 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld.c +++ b/drivers/gdisp/SSD1289/gdisp_lld.c @@ -95,7 +95,7 @@ static __inline void set_cursor(coord_t x, coord_t y) { }
}
-static __inline void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
+void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) {
set_cursor(x, y);
@@ -134,6 +134,19 @@ static __inline void set_viewport(coord_t x, coord_t y, coord_t cx, coord_t cy) set_cursor(x, y);
}
+void reset_viewport(void) {
+ switch(GDISP.Orientation) {
+ case GDISP_ROTATE_0:
+ case GDISP_ROTATE_180:
+ set_viewport(0, 0, GDISP_SCREEN_WIDTH, GDISP_SCREEN_HEIGHT);
+ break;
+ case GDISP_ROTATE_90:
+ case GDISP_ROTATE_270:
+ set_viewport(0, 0, GDISP_SCREEN_HEIGHT, GDISP_SCREEN_WIDTH);
+ break;
+ }
+}
+
/*===========================================================================*/
/* Driver interrupt handlers. */
/*===========================================================================*/
|