diff options
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 } |