From 5d8705b6e0338b0fd631f27e80b94efea96201d0 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 4 Mar 2017 15:02:55 +1000 Subject: FEATURE: Significantly improved the FreeRTOS port FEATURE: Added support for operating system initialisation in FreeRTOS FEATURE: Added GFX_OS_CALL_UGFXMAIN configuration option to allow uGFXMain() to be automatically called FEATURE: Added GFX_OS_UGFXMAIN_STACKSIZE configuration option to control uGFXMain() stack size --- src/gos/gos_options.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/gos/gos_options.h') diff --git a/src/gos/gos_options.h b/src/gos/gos_options.h index 2d3b0d29..c78d25ca 100644 --- a/src/gos/gos_options.h +++ b/src/gos/gos_options.h @@ -180,6 +180,32 @@ #ifndef GFX_OS_INIT_NO_WARNING #define GFX_OS_INIT_NO_WARNING FALSE #endif + /** + * @brief Call uGFXMain() after all initialisation + * @details Defaults to FALSE + * @note uGFXMain() is a function defined by the user in their project + * that contains the application main code. This is not expected to return + * and thus gfxInit() will also never return. This is required for some + * operating systems whose main thread never returns after starting the + * scheduler.
+ * Its prototype is:
+ * threadreturn_t uGFXMain(void *param);
+ * @note uGFXMain() will always be called with a NULL paramter. + */ + #ifndef GFX_OS_CALL_UGFXMAIN + #define GFX_OS_CALL_UGFXMAIN FALSE + #endif + /** + * @brief When uGFXMain() is started as a thread, what stack size should be used + * @details Defaults to 0 + * @note uGFXMain() contains the application main code. Some operating systems + * will start this as a thread. eg FreeRTOS. When it is started as a thread + * this defines how many bytes should be used for the thread stack. + * @note 0 means to use the operating systems default stack size. + */ + #ifndef GFX_OS_UGFXMAIN_STACKSIZE + #define GFX_OS_UGFXMAIN_STACKSIZE 0 + #endif /** * @brief Should uGFX stuff be added to the FreeRTOS+Tracer * @details Defaults to FALSE -- cgit v1.2.3