diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-07-29 12:00:47 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-07-29 12:00:47 +1000 |
commit | 9826378b9608362c4ad6efa3271e6f6de1e2b30e (patch) | |
tree | a0e4bc643f420dda032f90bf6423ee64728209d2 /src/gos/chibios.c | |
parent | 4ce658b022bbafe129d5ed3a571017c7d34b3892 (diff) | |
download | uGFX-9826378b9608362c4ad6efa3271e6f6de1e2b30e.tar.gz uGFX-9826378b9608362c4ad6efa3271e6f6de1e2b30e.tar.bz2 uGFX-9826378b9608362c4ad6efa3271e6f6de1e2b30e.zip |
Operating System initialisation can now be turned off in gfxconf.h
Diffstat (limited to 'src/gos/chibios.c')
-rw-r--r-- | src/gos/chibios.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/gos/chibios.c b/src/gos/chibios.c index 468c012c..9d1a86da 100644 --- a/src/gos/chibios.c +++ b/src/gos/chibios.c @@ -33,18 +33,21 @@ void _gosInit(void) { - /* Don't initialise if the user already has */ - - #if CH_KERNEL_MAJOR == 2 - if (!chThdSelf()) { - halInit(); - chSysInit(); - } - #elif CH_KERNEL_MAJOR == 3 - if (!chThdGetSelfX()) { - halInit(); - chSysInit(); - } + #if !GFX_NO_OS_INIT + /* Don't Initialize if the user already has */ + #if CH_KERNEL_MAJOR == 2 + if (!chThdSelf()) { + halInit(); + chSysInit(); + } + #elif CH_KERNEL_MAJOR == 3 + if (!chThdGetSelfX()) { + halInit(); + chSysInit(); + } + #endif + #else + #warning "GOS: Operating System initialization has been turned off. Make sure you call halInit() and chSysInit() before gfxInit() in your application!" #endif } |