From 32da19db12911d997cc04d35a1ba8b3b52deae01 Mon Sep 17 00:00:00 2001 From: inmarket Date: Thu, 5 Nov 2015 17:07:23 +1000 Subject: Add support for a PreInit Routine to allow early hardware initialisation --- src/gfx.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gfx.c') diff --git a/src/gfx.c b/src/gfx.c index b3d82c15..b4a28209 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -20,6 +20,9 @@ static bool_t gfxInitDone = FALSE; /* These init functions are defined by each module but not published */ extern void _gosInit(void); extern void _gosDeinit(void); +#ifdef GFX_OS_PRE_INIT_FUNCTION + extern void GFX_OS_PRE_INIT_FUNCTION(void); +#endif #ifdef GFX_OS_EXTRA_INIT_FUNCTION extern void GFX_OS_EXTRA_INIT_FUNCTION(void); #endif @@ -80,6 +83,9 @@ void gfxInit(void) // These must be initialised in the order of their dependancies + #ifdef GFX_OS_PRE_INIT_FUNCTION + GFX_OS_PRE_INIT_FUNCTION(); + #endif _gosInit(); #ifdef GFX_OS_EXTRA_INIT_FUNCTION GFX_OS_EXTRA_INIT_FUNCTION(); -- cgit v1.2.3