From 93da5a0578e7f16ea846eb257f36a24e316ef8d4 Mon Sep 17 00:00:00 2001 From: inmarket <andrewh@inmarket.com.au> Date: Sun, 8 Jul 2018 15:15:15 +1000 Subject: gDelayNone/gDelayForever to replace TIME_IMMEDIATE/TIME_INFINITE --- src/gadc/gadc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gadc') diff --git a/src/gadc/gadc.c b/src/gadc/gadc.c index ee5b9fdf..d3b8fb70 100644 --- a/src/gadc/gadc.c +++ b/src/gadc/gadc.c @@ -214,7 +214,7 @@ void gadcHighSpeedInit(uint32_t physdev, uint32_t frequency) #if GFX_USE_GEVENT GSourceHandle gadcHighSpeedGetSource(void) { if (!gtimerIsActive(&hsGTimer)) - gtimerStart(&hsGTimer, HighSpeedGTimerCallback, 0, gTrue, TIME_INFINITE); + gtimerStart(&hsGTimer, HighSpeedGTimerCallback, 0, gTrue, gDelayForever); hsFlags |= GADC_HSADC_GTIMER; return (GSourceHandle)&hsGTimer; } @@ -285,7 +285,7 @@ static void LowSpeedGTimerCallback(void *param) { NonTimerData *pdata; // Look for completed non-timer jobs and call the call-backs for each - while ((pdata = (NonTimerData *)gfxQueueGSyncGet(&lsListDone, TIME_IMMEDIATE))) { + while ((pdata = (NonTimerData *)gfxQueueGSyncGet(&lsListDone, gDelayNone))) { pdata->callback(pdata->job.buffer, pdata->param); gfxFree(pdata); } @@ -315,7 +315,7 @@ void gadcLowSpeedGet(uint32_t physdev, adcsample_t *buffer) { gfxSystemUnlock(); // Wait for it to complete - gfxSemWait(&ndata.sigdone, TIME_INFINITE); + gfxSemWait(&ndata.sigdone, gDelayForever); gfxSemDestroy(&ndata.sigdone); } @@ -324,7 +324,7 @@ gBool gadcLowSpeedStart(uint32_t physdev, adcsample_t *buffer, GADCCallbackFunct /* Start the Low Speed Timer */ if (!gtimerIsActive(&lsGTimer)) - gtimerStart(&lsGTimer, LowSpeedGTimerCallback, 0, gTrue, TIME_INFINITE); + gtimerStart(&lsGTimer, LowSpeedGTimerCallback, 0, gTrue, gDelayForever); // Prepare the job if (!(pdata = gfxAlloc(sizeof(NonTimerData)))) -- cgit v1.2.3