diff options
author | Joel Bodenmann <joel@unormal.org> | 2013-10-05 02:32:35 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2013-10-05 02:32:35 +0200 |
commit | 8b6e95de7326382f75e1d1ee1069d39f774d5299 (patch) | |
tree | 4749ca582b05104389709b756efbf1087d7665c6 | |
parent | a370394dbb0b5bf2ae1fbb2838b8b09956bfe38e (diff) | |
download | uGFX-8b6e95de7326382f75e1d1ee1069d39f774d5299.tar.gz uGFX-8b6e95de7326382f75e1d1ee1069d39f774d5299.tar.bz2 uGFX-8b6e95de7326382f75e1d1ee1069d39f774d5299.zip |
added thread priorities to gfxconf.h
-rw-r--r-- | gfxconf.example.h | 2 | ||||
-rw-r--r-- | include/gdisp/options.h | 7 | ||||
-rw-r--r-- | include/gtimer/options.h | 73 | ||||
-rw-r--r-- | src/gdisp/gdisp.c | 2 | ||||
-rw-r--r-- | src/gtimer/gtimer.c | 2 |
5 files changed, 51 insertions, 35 deletions
diff --git a/gfxconf.example.h b/gfxconf.example.h index 65bc97f0..b0bf39a0 100644 --- a/gfxconf.example.h +++ b/gfxconf.example.h @@ -145,8 +145,10 @@ #define GDISP_NEED_UTF8 FALSE #define GDISP_NEED_TEXT_KERNING FALSE #define GDISP_NEED_ANTIALIAS FALSE + #define GDISP_THREAD_PRIORITY NORMAL_PRIORITY #define GEVENT_MAXIMUM_SIZE 32 #define GEVENT_MAX_SOURCE_LISTENERS 32 + #define GTIMER_THREAD_PRIORITY HIGH_PRIORITY #define GTIMER_THREAD_WORKAREA_SIZE 512 #define GADC_MAX_LOWSPEED_DEVICES 4 #define GWIN_BUTTON_LAZY_RELEASE FALSE diff --git a/include/gdisp/options.h b/include/gdisp/options.h index d5818284..87a0276b 100644 --- a/include/gdisp/options.h +++ b/include/gdisp/options.h @@ -21,6 +21,13 @@ * @{ */ /** + * @brief The priority of the GDISP thread. + * @details Defaults to NORMAL_PRIORITY + */ + #ifndef GDISP_THREAD_PRIORITY + #define GDISP_THREAD_PRIORITY NORMAL_PRIORITY + #endif + /** * @brief Should all operations be clipped to the screen and colors validated. * @details Defaults to TRUE. * @note If this is FALSE, any operations that extend beyond the diff --git a/include/gtimer/options.h b/include/gtimer/options.h index 958f89e4..17358abe 100644 --- a/include/gtimer/options.h +++ b/include/gtimer/options.h @@ -4,36 +4,43 @@ * * http://ugfx.org/license.html */ -
-/**
- * @file include/gtimer/options.h
- * @brief GTIMER sub-system options header file.
- *
- * @addtogroup GTIMER
- * @{
- */
-
-#ifndef _GTIMER_OPTIONS_H
-#define _GTIMER_OPTIONS_H
-
-/**
- * @name GTIMER Functionality to be included
- * @{
- */
-/**
- * @}
- *
- * @name GTIMER Optional Sizing Parameters
- * @{
- */
- /**
- * @brief Defines the size of the timer threads work area (stack+structures).
- * @details Defaults to 512 bytes
- */
- #ifndef GTIMER_THREAD_WORKAREA_SIZE
- #define GTIMER_THREAD_WORKAREA_SIZE 512
- #endif
-/** @} */
-
-#endif /* _GTIMER_OPTIONS_H */
-/** @} */
+ +/** + * @file include/gtimer/options.h + * @brief GTIMER sub-system options header file. + * + * @addtogroup GTIMER + * @{ + */ + +#ifndef _GTIMER_OPTIONS_H +#define _GTIMER_OPTIONS_H + +/** + * @name GTIMER Functionality to be included + * @{ + */ +/** + * @} + * + * @name GTIMER Optional Sizing Parameters + * @{ + */ + /** + * @brief Defines the GTIMER thread priority + * @details Defaults to HIGH_PRIORITY + */ + #ifndef GTIMER_THREAD_PRIORITY + #define GTIMER_THREAD_PRIORITY HIGH_PRIORITY + #endif + /** + * @brief Defines the size of the timer threads work area (stack+structures). + * @details Defaults to 512 bytes + */ + #ifndef GTIMER_THREAD_WORKAREA_SIZE + #define GTIMER_THREAD_WORKAREA_SIZE 512 + #endif +/** @} */ + +#endif /* _GTIMER_OPTIONS_H */ +/** @} */ diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 22773908..54ab59a5 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -123,7 +123,7 @@ gfxMutexInit(&gdispMsgsMutex); gfxSemInit(&gdispMsgsSem, GDISP_QUEUE_SIZE, GDISP_QUEUE_SIZE); - hth = gfxThreadCreate(waGDISPThread, sizeof(waGDISPThread), NORMAL_PRIORITY, GDISPThreadHandler, NULL); + hth = gfxThreadCreate(waGDISPThread, sizeof(waGDISPThread), GDISP_PRIORITY, GDISPThreadHandler, NULL); if (hth) gfxThreadClose(hth); /* Initialise driver - synchronous */ diff --git a/src/gtimer/gtimer.c b/src/gtimer/gtimer.c index e789ee74..25b7d804 100644 --- a/src/gtimer/gtimer.c +++ b/src/gtimer/gtimer.c @@ -132,7 +132,7 @@ void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, bool_t periodic, de // Start our thread if not already going
if (!hThread) {
- hThread = gfxThreadCreate(waTimerThread, sizeof(waTimerThread), HIGH_PRIORITY, GTimerThreadHandler, NULL);
+ hThread = gfxThreadCreate(waTimerThread, sizeof(waTimerThread), GTIMER_PRIORITY, GTimerThreadHandler, NULL);
if (hThread) gfxThreadClose(hThread); // We never really need the handle again
}
|