diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-09-17 09:47:48 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-09-17 09:47:48 +1000 |
commit | 32eb6ff830c959894b35b1c2db57a6c786113050 (patch) | |
tree | def975f65bd69a43157ab5545bf3b9eb1f3de2ae /src/gdisp/gdisp_gdisp.c | |
parent | 676c416a9bb85a092d9290244a9564f314fcf799 (diff) | |
parent | 6e265c80d2f9a197b5b1573ffb972c8827162728 (diff) | |
download | uGFX-32eb6ff830c959894b35b1c2db57a6c786113050.tar.gz uGFX-32eb6ff830c959894b35b1c2db57a6c786113050.tar.bz2 uGFX-32eb6ff830c959894b35b1c2db57a6c786113050.zip |
Merge branch 'master' into newmouse
Diffstat (limited to 'src/gdisp/gdisp_gdisp.c')
-rw-r--r-- | src/gdisp/gdisp_gdisp.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/gdisp/gdisp_gdisp.c b/src/gdisp/gdisp_gdisp.c index 0e5cacb5..4a149faa 100644 --- a/src/gdisp/gdisp_gdisp.c +++ b/src/gdisp/gdisp_gdisp.c @@ -569,7 +569,7 @@ void _gdispInit(void) // GDISP_DRIVER_LIST is defined - create each driver instance #if defined(GDISP_DRIVER_LIST) { - int i; + unsigned i; extern GDriverVMTList GDISP_DRIVER_LIST; static const struct GDriverVMT const * dclist[] = {GDISP_DRIVER_LIST}; @@ -579,7 +579,8 @@ void _gdispInit(void) } #elif GDISP_TOTAL_DISPLAYS > 1 { - int i; + unsigned i; + extern GDriverVMTList GDISPVMT_OnlyOne; for(i = 0; i < GDISP_TOTAL_DISPLAYS; i++) gdriverRegister(GDISPVMT_OnlyOne); @@ -622,7 +623,7 @@ void _gdispDeinit(void) /* ToDo */ } -bool_t _gdispInitDriver(GDriver *g, int driverinstance, int systeminstance) { +bool_t _gdispInitDriver(GDriver *g, unsigned driverinstance, unsigned systeminstance) { #define gd ((GDisplay *)g) bool_t ret; @@ -694,10 +695,18 @@ void _gdispDeInitDriver(GDriver *g) { #undef gd } +GDisplay *gdispGetDisplay(unsigned display) { + return (GDisplay *)gdriverGetInstance(GDRIVER_TYPE_DISPLAY, display); +} + void gdispSetDisplay(GDisplay *g) { if (g) GDISP = g; } +unsigned gdispGetDisplayCount(void) { + return gdriverInstanceCount(GDRIVER_TYPE_DISPLAY); +} + coord_t gdispGGetWidth(GDisplay *g) { return g->g.Width; } coord_t gdispGGetHeight(GDisplay *g) { return g->g.Height; } powermode_t gdispGGetPowerMode(GDisplay *g) { return g->g.Powermode; } |