diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-07-08 15:15:15 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-07-08 15:15:15 +1000 |
commit | 93da5a0578e7f16ea846eb257f36a24e316ef8d4 (patch) | |
tree | b0e08e991919fdb1fa9079b0ea40c23909cbcd3e /src/gadc | |
parent | 215f31ee3dd27f461540384cdba04b58b481fadc (diff) | |
download | uGFX-93da5a0578e7f16ea846eb257f36a24e316ef8d4.tar.gz uGFX-93da5a0578e7f16ea846eb257f36a24e316ef8d4.tar.bz2 uGFX-93da5a0578e7f16ea846eb257f36a24e316ef8d4.zip |
gDelayNone/gDelayForever to replace TIME_IMMEDIATE/TIME_INFINITE
Diffstat (limited to 'src/gadc')
-rw-r--r-- | src/gadc/gadc.c | 8 |
1 files changed, 4 insertions, 4 deletions
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)))) |