aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-11-09 19:18:59 +1000
committerinmarket <andrewh@inmarket.com.au>2013-11-09 19:18:59 +1000
commit1f99d5c9fac79e3e9aa4ebff97b296b6dcb9c9a7 (patch)
treefb498bc169bbf76750348f6a900df5adfb6bb7c9 /src
parentdaa4e8bbd78ebe4a84234de266006d1a23697657 (diff)
downloaduGFX-1f99d5c9fac79e3e9aa4ebff97b296b6dcb9c9a7.tar.gz
uGFX-1f99d5c9fac79e3e9aa4ebff97b296b6dcb9c9a7.tar.bz2
uGFX-1f99d5c9fac79e3e9aa4ebff97b296b6dcb9c9a7.zip
Add support for a default application orientation.
Also remove old unneeded GDISP_USE_CUSTOM_BOARD macro
Diffstat (limited to 'src')
-rw-r--r--src/gdisp/gdisp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 7eade99c..6964bfff 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -587,6 +587,15 @@ void _gdispInit(void) {
g->flags = 0;
gdisp_lld_init(g);
+ #if defined(GDISP_DEFAULT_ORIENTATION) && GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
+ g->p.x = GDISP_CONTROL_ORIENTATION;
+ g->p.ptr = GDISP_DEFAULT_ORIENTATION;
+ #if GDISP_HARDWARE_CONTROL == HARDWARE_AUTODETECT
+ if (g->vmt->control)
+ #endif
+ gdisp_lld_control(g);
+ #endif
+
// Set the initial clipping region
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP