From 8a9ed5195b3345635533b6150b9303abbaf5adf3 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 3 Nov 2018 12:29:30 +1000 Subject: Tidy u gfxSem, gfxMutex and various Macros by converting to new types gSem, gMutex etc --- demos/3rdparty/notepad-2/notepadApp.c | 8 ++++---- demos/3rdparty/notepad-2/notepadCore.c | 6 +++--- demos/applications/combo/bounce.c | 2 +- demos/applications/combo/mandelbrot.c | 2 +- demos/games/justget10/jg10.c | 4 ++-- demos/games/minesweeper/mines.c | 4 ++-- demos/games/tetris/tetris.c | 2 +- demos/tools/uGFXnetDisplay/main.c | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) (limited to 'demos') diff --git a/demos/3rdparty/notepad-2/notepadApp.c b/demos/3rdparty/notepad-2/notepadApp.c index 1f94070d..1bf914a6 100644 --- a/demos/3rdparty/notepad-2/notepadApp.c +++ b/demos/3rdparty/notepad-2/notepadApp.c @@ -2,7 +2,7 @@ * File: notepadApp.c * * This file is a part of the Notepad demo application for ChibiOS/GFX - * Copyright © 2013, Kumar Abhishek [abhishek.kakkar@edaboard.com]. + * Copyright 2013, Kumar Abhishek [abhishek.kakkar@edaboard.com]. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -70,7 +70,7 @@ static int selColorIndex = 0, selPenWidth = 1, tbMode = 1; static NColorScheme nCurColorScheme; -static DECLARE_THREAD_FUNCTION(notepadThread, param); +static GFX_THREAD_FUNCTION(notepadThread, param); // Custom drawing functions for the buttons static void nbtnColorBarDraw(GHandle gh, gBool enabled, gBool isdown, const char *txt, const GButtonDrawStyle *pstyle, void *param) { @@ -311,8 +311,8 @@ static void drawVButtons(void) { gwinButtonDraw(H(btnFill)); } -static DECLARE_THREAD_STACK(waNotepadThread, NPAD_THD_WA_SIZE); -static DECLARE_THREAD_FUNCTION(notepadThread, param) { +static GFX_THREAD_STACK(waNotepadThread, NPAD_THD_WA_SIZE); +static GFX_THREAD_FUNCTION(notepadThread, param) { GEventMouse *pem; GEventGWinButton *peb; diff --git a/demos/3rdparty/notepad-2/notepadCore.c b/demos/3rdparty/notepad-2/notepadCore.c index 4662a9ba..ae1b4645 100644 --- a/demos/3rdparty/notepad-2/notepadCore.c +++ b/demos/3rdparty/notepad-2/notepadCore.c @@ -2,7 +2,7 @@ * File: notepadCore.c * * This file is a part of the Notepad demo application for ChibiOS/GFX - * Copyright © 2013, Kumar Abhishek [abhishek.kakkar@edaboard.com]. + * Copyright 2013, Kumar Abhishek [abhishek.kakkar@edaboard.com]. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ (ev.y >= ncoreDrawingArea->y) && (ev.y <= (ncoreDrawingArea->y + ncoreDrawingArea->height))) /* This is the drawing core */ -static DECLARE_THREAD_STACK(waDrawThread, NCORE_THD_STACK_SIZE); +static GFX_THREAD_STACK(waDrawThread, NCORE_THD_STACK_SIZE); static gU8 nPenWidth = 1; static gU8 nMode = NCORE_MODE_DRAW; @@ -127,7 +127,7 @@ static void draw_line(gCoord x0, gCoord y0, gCoord x1, gCoord y1) { } /* Core thread */ -static DECLARE_THREAD_FUNCTION(ncoreDrawThread, msg) { +static GFX_THREAD_FUNCTION(ncoreDrawThread, msg) { GEventMouse ev, evPrev; gCoord dx, dy; diff --git a/demos/applications/combo/bounce.c b/demos/applications/combo/bounce.c index 7c77e478..4f21ce09 100644 --- a/demos/applications/combo/bounce.c +++ b/demos/applications/combo/bounce.c @@ -62,7 +62,7 @@ static gThread thread; #define FLOORCOLOR HTML2COLOR(0x606060) #define SHADOWALPHA (255-255*0.2) -static DECLARE_THREAD_FUNCTION(task, param) { +static GFX_THREAD_FUNCTION(task, param) { gCoord width, height, x, y, radius, ballx, bally, dx, floor; gCoord minx, miny, maxx, maxy, winx, winy; gCoord ballcx, ballcy; diff --git a/demos/applications/combo/mandelbrot.c b/demos/applications/combo/mandelbrot.c index f70aa356..9e9dc35e 100644 --- a/demos/applications/combo/mandelbrot.c +++ b/demos/applications/combo/mandelbrot.c @@ -66,7 +66,7 @@ static void mandelbrot(float x1, float y1, float x2, float y2) { } } -static DECLARE_THREAD_FUNCTION(task, param) { +static GFX_THREAD_FUNCTION(task, param) { float cx, cy; float zoom = 1.0f; (void) param; diff --git a/demos/games/justget10/jg10.c b/demos/games/justget10/jg10.c index bcb58508..6e1a95ec 100644 --- a/demos/games/justget10/jg10.c +++ b/demos/games/justget10/jg10.c @@ -223,7 +223,7 @@ static void printCongrats(void) { gdispDrawString(JG10_TOTAL_FIELD_WIDTH+((gdispGetWidth()-JG10_TOTAL_FIELD_WIDTH)/2)-(gdispGetStringWidth(pps_str, font)/2), (gdispGetHeight()/2)+20, pps_str, font, GFX_RED); } -static DECLARE_THREAD_FUNCTION(thdJg10, msg) { +static GFX_THREAD_FUNCTION(thdJg10, msg) { (void)msg; gU16 x,y; while (!jg10GameOver) { @@ -273,7 +273,7 @@ static DECLARE_THREAD_FUNCTION(thdJg10, msg) { } } } - THREAD_RETURN(0); + gfxThreadReturn(0); } static void initField(void) { diff --git a/demos/games/minesweeper/mines.c b/demos/games/minesweeper/mines.c index 4ae8f361..6d7cd38f 100644 --- a/demos/games/minesweeper/mines.c +++ b/demos/games/minesweeper/mines.c @@ -192,7 +192,7 @@ static void openEmptyNodes(void) } } -static DECLARE_THREAD_FUNCTION(thdMines, msg) +static GFX_THREAD_FUNCTION(thdMines, msg) { (void)msg; gU16 x,y, delay; @@ -245,7 +245,7 @@ static DECLARE_THREAD_FUNCTION(thdMines, msg) } } } - THREAD_RETURN(0); + gfxThreadReturn(0); } static void printGameOver(void) diff --git a/demos/games/tetris/tetris.c b/demos/games/tetris/tetris.c index c0bbe3b0..530050e5 100644 --- a/demos/games/tetris/tetris.c +++ b/demos/games/tetris/tetris.c @@ -427,7 +427,7 @@ static void goLeft(void) { } } -static DECLARE_THREAD_FUNCTION(thdTetris, arg) { +static GFX_THREAD_FUNCTION(thdTetris, arg) { (void)arg; gU8 i; while (!tetrisGameOver) { diff --git a/demos/tools/uGFXnetDisplay/main.c b/demos/tools/uGFXnetDisplay/main.c index 4eba5f78..011728cd 100644 --- a/demos/tools/uGFXnetDisplay/main.c +++ b/demos/tools/uGFXnetDisplay/main.c @@ -182,8 +182,8 @@ static gBool sendpkt(gU16 *pkt, int len) { * We do the send in a single transaction to prevent it getting interspersed with * any reply we need to send on the main thread. */ - static DECLARE_THREAD_STACK(waNetThread, 512); - static DECLARE_THREAD_FUNCTION(NetThread, param) { + static GFX_THREAD_STACK(waNetThread, 512); + static GFX_THREAD_FUNCTION(NetThread, param) { GEventMouse *pem; gU16 cmd[2]; gU16 lbuttons; -- cgit v1.2.3