diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-06-23 13:02:07 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-06-23 13:02:07 +1000 |
commit | 41271d632b74f5cf47c30d3b699eb6b2786f2136 (patch) | |
tree | 78bcb729c6d6177ca598f28908fefd186c50e9b6 /demos/modules/gos | |
parent | 3b97fb798e96514057bcf17263c1e5dbdcd7da26 (diff) | |
download | uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.gz uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.tar.bz2 uGFX-41271d632b74f5cf47c30d3b699eb6b2786f2136.zip |
Added new type definitions - moving towards V3.0
Diffstat (limited to 'demos/modules/gos')
-rw-r--r-- | demos/modules/gos/threads/main.c | 6 | ||||
-rw-r--r-- | demos/modules/gos/threads_advanced/main.c | 18 |
2 files changed, 12 insertions, 12 deletions
diff --git a/demos/modules/gos/threads/main.c b/demos/modules/gos/threads/main.c index 97b1c7e4..56ea4bb9 100644 --- a/demos/modules/gos/threads/main.c +++ b/demos/modules/gos/threads/main.c @@ -26,7 +26,7 @@ threadreturn_t heartbeat1(void* param) { (void)param; - while (TRUE) { + while (1) { DEBUGWRITE("thread 1\n"); gfxSleepMilliseconds(500); } @@ -38,7 +38,7 @@ threadreturn_t heartbeat2(void* param) { (void)param; - while (TRUE) { + while (1) { DEBUGWRITE("thread 2\n"); gfxSleepMilliseconds(900); } @@ -54,7 +54,7 @@ int main(void) gfxThreadCreate(0, 2048, NORMAL_PRIORITY, heartbeat1, 0); gfxThreadCreate(0, 2048, NORMAL_PRIORITY, heartbeat2, 0); - while (TRUE) { + while (1) { DEBUGWRITE("thread main\n"); gfxSleepMilliseconds(1400); } diff --git a/demos/modules/gos/threads_advanced/main.c b/demos/modules/gos/threads_advanced/main.c index 89cada9f..8527194e 100644 --- a/demos/modules/gos/threads_advanced/main.c +++ b/demos/modules/gos/threads_advanced/main.c @@ -65,11 +65,11 @@ gfxThreadHandle thd; */ threadreturn_t Thread_function(void* param) { - /* Cast the paramter into a bool pointer so we can use it */ - bool_t* doExit = (bool_t*)param; + /* Cast the paramter into a gBool pointer so we can use it */ + gBool* doExit = (gBool*)param; /* Execute this until we shall be terminated */ - while (*doExit == FALSE) { + while (!*doExit) { DEBUGWRITE("Message from Thread\n"); gfxSleepMilliseconds(500); } @@ -84,12 +84,12 @@ threadreturn_t Thread_function(void* param) */ void timerCallback(void* param) { - /* Cast the paramter into a bool pointer so we can use it */ - bool_t* threadExit = (bool_t*)param; + /* Cast the paramter into a gBool pointer so we can use it */ + gBool* threadExit = (gBool*)param; /* Ask the Thread to fall over the end */ DEBUGWRITE("Closing thread!\n"); - *threadExit = TRUE; + *threadExit = gTrue; } /* @@ -97,7 +97,7 @@ void timerCallback(void* param) */ int main(void) { - bool_t exitThread = FALSE; + gBool exitThread = gFalse; gfxInit(); @@ -112,9 +112,9 @@ int main(void) /* Start the timer. The callback function will be called once after 2000ms * We will pass the thread handle as a parameter so the timer can ask the thread to terminate */ - gtimerStart(>, timerCallback, (void*)&exitThread, FALSE, 2000); + gtimerStart(>, timerCallback, (void*)&exitThread, gFalse, 2000); - while(TRUE) { + while(1) { DEBUGWRITE("Message from main!\n"); gfxSleepMilliseconds(500); } |