Change the prototype for uGFXMain()

release/v2.9
inmarket 2017-03-04 17:01:02 +10:00
parent f934fc4a49
commit 3a0e49dabc
3 changed files with 9 additions and 5 deletions

View File

@ -79,7 +79,7 @@ extern void _gosDeinit(void);
extern void _gtransDeinit(void); extern void _gtransDeinit(void);
#endif #endif
#if GFX_OS_CALL_UGFXMAIN #if GFX_OS_CALL_UGFXMAIN
extern threadreturn_t uGFXMain(void *param); extern void uGFXMain(void);
#endif #endif
void gfxInit(void) void gfxInit(void)

View File

@ -38,14 +38,19 @@ void _gosInit(void)
} }
#if !GFX_OS_NO_INIT && GFX_OS_CALL_UGFXMAIN #if !GFX_OS_NO_INIT && GFX_OS_CALL_UGFXMAIN
extern threadreturn_t uGFXMain(void *param); extern void uGFXMain(void);
static DECLARE_THREAD_FUNCTION(startUGFX_FreeRTOS, p) {
(void) p;
uGFXMain();
}
#endif #endif
void _gosPostInit(void) void _gosPostInit(void)
{ {
#if !GFX_OS_NO_INIT && GFX_OS_CALL_UGFXMAIN #if !GFX_OS_NO_INIT && GFX_OS_CALL_UGFXMAIN
if (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED) { if (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED) {
gfxThreadCreate(0, GFX_OS_UGFXMAIN_STACKSIZE, NORMAL_PRIORITY, uGFXMain, 0); gfxThreadCreate(0, GFX_OS_UGFXMAIN_STACKSIZE, NORMAL_PRIORITY, startUGFX_FreeRTOS, 0);
vTaskStartScheduler(); vTaskStartScheduler();
gfxHalt("Unable to start FreeRTOS scheduler. Out of memory?"); gfxHalt("Unable to start FreeRTOS scheduler. Out of memory?");
} }

View File

@ -189,8 +189,7 @@
* operating systems whose main thread never returns after starting the * operating systems whose main thread never returns after starting the
* scheduler.<br> * scheduler.<br>
* Its prototype is:<br> * Its prototype is:<br>
* threadreturn_t uGFXMain(void *param);<br> * void uGFXMain(void);<br>
* @note uGFXMain() will always be called with a NULL paramter.
*/ */
#ifndef GFX_OS_CALL_UGFXMAIN #ifndef GFX_OS_CALL_UGFXMAIN
#define GFX_OS_CALL_UGFXMAIN FALSE #define GFX_OS_CALL_UGFXMAIN FALSE