freertos port cleanup
This commit is contained in:
parent
cb825aa823
commit
33a037b81c
2 changed files with 10 additions and 7 deletions
|
@ -72,6 +72,14 @@ portTickType MS2ST(portTickType ms)
|
||||||
return (ms / portTICK_PERIOD_MS);
|
return (ms / portTICK_PERIOD_MS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gfxMutexInit(xSemaphoreHandle *s)
|
||||||
|
{
|
||||||
|
*s = xSemaphoreCreateMutex();
|
||||||
|
#if GFX_FREERTOS_USE_TRACE
|
||||||
|
vTraceSetMutexName(*s,"uGFXMutex"); // for FreeRTOS+Trace debug
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void gfxSemInit(gfxSem* psem, semcount_t val, semcount_t limit)
|
void gfxSemInit(gfxSem* psem, semcount_t val, semcount_t limit)
|
||||||
{
|
{
|
||||||
if (val > limit)
|
if (val > limit)
|
||||||
|
|
|
@ -78,13 +78,8 @@ extern "C" {
|
||||||
#define gfxMillisecondsToTicks(ms) MS2ST(ms)
|
#define gfxMillisecondsToTicks(ms) MS2ST(ms)
|
||||||
#define gfxSystemLock() {}
|
#define gfxSystemLock() {}
|
||||||
#define gfxSystemUnlock() {}
|
#define gfxSystemUnlock() {}
|
||||||
static inline void gfxMutexInit(xSemaphoreHandle *s)
|
|
||||||
{
|
void gfxMutexInit(xSemaphoreHandle* s);
|
||||||
*s = xSemaphoreCreateMutex();
|
|
||||||
#if GFX_FREERTOS_USE_TRACE
|
|
||||||
vTraceSetMutexName(*s,"uGFXMutex"); // for FreeRTOS+Trace debug
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#define gfxMutexDestroy(pmutex) vSemaphoreDelete(*pmutex)
|
#define gfxMutexDestroy(pmutex) vSemaphoreDelete(*pmutex)
|
||||||
#define gfxMutexEnter(pmutex) xSemaphoreTake(*pmutex,portMAX_DELAY)
|
#define gfxMutexEnter(pmutex) xSemaphoreTake(*pmutex,portMAX_DELAY)
|
||||||
#define gfxMutexExit(pmutex) xSemaphoreGive(*pmutex)
|
#define gfxMutexExit(pmutex) xSemaphoreGive(*pmutex)
|
||||||
|
|
Loading…
Add table
Reference in a new issue