From 215f31ee3dd27f461540384cdba04b58b481fadc Mon Sep 17 00:00:00 2001 From: inmarket Date: Sun, 8 Jul 2018 14:30:31 +1000 Subject: Added type gDelay to replace V2.x delaytime_t Added type gTicks to replace V2.x systemticks_t Added type gThreadreturn to replace V2.x threadreturn_t Added type gThreadpriority to replace V2.x threadpriority_t --- demos/games/justget10/jg10.c | 4 ++-- demos/games/tetris/tetris.c | 6 +++--- demos/modules/gdisp/images_animated/main.c | 2 +- demos/modules/gos/threads/main.c | 8 ++++---- demos/modules/gos/threads_advanced/main.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) (limited to 'demos') diff --git a/demos/games/justget10/jg10.c b/demos/games/justget10/jg10.c index 160be7a7..d824ca06 100644 --- a/demos/games/justget10/jg10.c +++ b/demos/games/justget10/jg10.c @@ -102,8 +102,8 @@ static void clean_SelCheck(void) { static void remove_Selected(void) { uint16_t i ,j, step; - systemticks_t delay_start = 0; - systemticks_t delay=0; + gTicks delay_start = 0; + gTicks delay=0; for (step = 0; step < JG10_ANIM_IMAGES; step++) { delay_start = gfxSystemTicks(); for (i = 0; i < JG10_FIELD_WIDTH; i++) { diff --git a/demos/games/tetris/tetris.c b/demos/games/tetris/tetris.c index 53c0e34b..ad8debd7 100644 --- a/demos/games/tetris/tetris.c +++ b/demos/games/tetris/tetris.c @@ -78,8 +78,8 @@ const int tetrisShapes[TETRIS_SHAPE_COUNT][4][2] = { int tetrisField[TETRIS_FIELD_HEIGHT][TETRIS_FIELD_WIDTH]; // main tetris field array unsigned int tetrisGameSpeed = 500; // game auto-move speed in ms unsigned int tetrisKeySpeed = 140; // game key repeat speed in ms -systemticks_t tetrisPreviousGameTime = 0; -systemticks_t tetrisPreviousKeyTime = 0; +gTicks tetrisPreviousGameTime = 0; +gTicks tetrisPreviousKeyTime = 0; int tetrisCurrentShape[4][2]; int tetrisNextShape[4][2]; int tetrisOldShape[4][2]; @@ -474,7 +474,7 @@ static DECLARE_THREAD_FUNCTION(thdTetris, arg) { tetrisPreviousKeyTime = gfxSystemTicks(); } } - return (threadreturn_t)0; + return (gThreadreturn)0; } static void tetrisDeinit(void) { diff --git a/demos/modules/gdisp/images_animated/main.c b/demos/modules/gdisp/images_animated/main.c index 09d46304..5891de4f 100644 --- a/demos/modules/gdisp/images_animated/main.c +++ b/demos/modules/gdisp/images_animated/main.c @@ -55,7 +55,7 @@ static gdispImage myImage; */ int main(void) { gCoord swidth, sheight, errx, erry, errcx, errcy; - delaytime_t delay; + gDelay delay; gfxInit(); // Initialize the display diff --git a/demos/modules/gos/threads/main.c b/demos/modules/gos/threads/main.c index 56ea4bb9..4ef81411 100644 --- a/demos/modules/gos/threads/main.c +++ b/demos/modules/gos/threads/main.c @@ -22,7 +22,7 @@ #error "--" #endif -threadreturn_t heartbeat1(void* param) +gThreadreturn heartbeat1(void* param) { (void)param; @@ -31,10 +31,10 @@ threadreturn_t heartbeat1(void* param) gfxSleepMilliseconds(500); } - return (threadreturn_t)0; + return (gThreadreturn)0; } -threadreturn_t heartbeat2(void* param) +gThreadreturn heartbeat2(void* param) { (void)param; @@ -43,7 +43,7 @@ threadreturn_t heartbeat2(void* param) gfxSleepMilliseconds(900); } - return (threadreturn_t)0; + return (gThreadreturn)0; } int main(void) diff --git a/demos/modules/gos/threads_advanced/main.c b/demos/modules/gos/threads_advanced/main.c index 8527194e..0ae8649c 100644 --- a/demos/modules/gos/threads_advanced/main.c +++ b/demos/modules/gos/threads_advanced/main.c @@ -63,7 +63,7 @@ gfxThreadHandle thd; * Thread function * Prints a message */ -threadreturn_t Thread_function(void* param) +gThreadreturn Thread_function(void* param) { /* Cast the paramter into a gBool pointer so we can use it */ gBool* doExit = (gBool*)param; @@ -75,7 +75,7 @@ threadreturn_t Thread_function(void* param) } /* Don't return anything */ - return (threadreturn_t)0; + return (gThreadreturn)0; } /* -- cgit v1.2.3