aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-12-21 13:21:59 +1000
committerinmarket <andrewh@inmarket.com.au>2013-12-21 13:21:59 +1000
commitd9f02858fdc04c4404834a033850f758e4c8ee7e (patch)
tree2d7b4759cabf76eba5b7ef2147e58d3c9d7f885b /src
parent018a930d5525ffefc30fb2514752918455853685 (diff)
downloaduGFX-d9f02858fdc04c4404834a033850f758e4c8ee7e.tar.gz
uGFX-d9f02858fdc04c4404834a033850f758e4c8ee7e.tar.bz2
uGFX-d9f02858fdc04c4404834a033850f758e4c8ee7e.zip
Replace NULL's with 0 as NULL is not defined by the Raw32 GOS.
Diffstat (limited to 'src')
-rw-r--r--src/gadc/gadc.c6
-rw-r--r--src/gaudin/gaudin.c2
-rw-r--r--src/gdisp/fonts.c2
-rw-r--r--src/gos/chibios.c2
-rw-r--r--src/gos/osx.c2
-rw-r--r--src/gos/win32.c6
-rw-r--r--src/gqueue/gqueue.c6
-rw-r--r--src/gtimer/gtimer.c4
8 files changed, 15 insertions, 15 deletions
diff --git a/src/gadc/gadc.c b/src/gadc/gadc.c
index ffd934c1..e297ef7e 100644
--- a/src/gadc/gadc.c
+++ b/src/gadc/gadc.c
@@ -344,7 +344,7 @@ void gadcHighSpeedInit(uint32_t physdev, uint32_t frequency, adcsample_t *buffer
#if GFX_USE_GEVENT
GSourceHandle gadcHighSpeedGetSource(void) {
if (!gtimerIsActive(&HighSpeedGTimer))
- gtimerStart(&HighSpeedGTimer, HighSpeedGTimerCallback, NULL, TRUE, TIME_INFINITE);
+ gtimerStart(&HighSpeedGTimer, HighSpeedGTimerCallback, 0, TRUE, TIME_INFINITE);
hs.flags |= GADC_FLG_GTIMER;
return (GSourceHandle)&HighSpeedGTimer;
}
@@ -393,7 +393,7 @@ void gadcLowSpeedGet(uint32_t physdev, adcsample_t *buffer) {
gfxSemInit(&mysem, 1, 1);
gfxMutexEnter(&gadcmutex);
if (!gtimerIsActive(&LowSpeedGTimer))
- gtimerStart(&LowSpeedGTimer, LowSpeedGTimerCallback, NULL, TRUE, TIME_INFINITE);
+ gtimerStart(&LowSpeedGTimer, LowSpeedGTimerCallback, 0, TRUE, TIME_INFINITE);
gfxMutexExit(&gadcmutex);
while(1) {
@@ -430,7 +430,7 @@ bool_t gadcLowSpeedStart(uint32_t physdev, adcsample_t *buffer, GADCCallbackFunc
/* Start the Low Speed Timer */
gfxMutexEnter(&gadcmutex);
if (!gtimerIsActive(&LowSpeedGTimer))
- gtimerStart(&LowSpeedGTimer, LowSpeedGTimerCallback, NULL, TRUE, TIME_INFINITE);
+ gtimerStart(&LowSpeedGTimer, LowSpeedGTimerCallback, 0, TRUE, TIME_INFINITE);
/* Find a slot */
for(p = ls; p < &ls[GADC_MAX_LOWSPEED_DEVICES]; p++) {
diff --git a/src/gaudin/gaudin.c b/src/gaudin/gaudin.c
index cddab32f..a6e173ce 100644
--- a/src/gaudin/gaudin.c
+++ b/src/gaudin/gaudin.c
@@ -119,7 +119,7 @@ bool_t gaudinInit(uint16_t channel, uint32_t frequency, audin_sample_t *buffer,
#if GFX_USE_GEVENT
GSourceHandle gaudinGetSource(void) {
if (!gtimerIsActive(&AudGTimer))
- gtimerStart(&AudGTimer, AudGTimerCallback, NULL, TRUE, TIME_INFINITE);
+ gtimerStart(&AudGTimer, AudGTimerCallback, 0, TRUE, TIME_INFINITE);
audFlags |= AUDFLG_USE_EVENTS;
return (GSourceHandle)&aud;
}
diff --git a/src/gdisp/fonts.c b/src/gdisp/fonts.c
index 937102ee..ea8d1615 100644
--- a/src/gdisp/fonts.c
+++ b/src/gdisp/fonts.c
@@ -74,7 +74,7 @@ void gdispCloseFont(font_t font) {
struct mf_font_s *dfont = (struct mf_font_s *)font;
/* Make sure that no-one can successfully use font after closing */
- dfont->render_character = NULL;
+ dfont->render_character = 0;
/* Release the allocated memory */
gfxFree(dfont);
diff --git a/src/gos/chibios.c b/src/gos/chibios.c
index 3af0047b..30a2b228 100644
--- a/src/gos/chibios.c
+++ b/src/gos/chibios.c
@@ -106,7 +106,7 @@ gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_
}
if (!stacksz)
- return NULL;
+ return 0;
return chThdCreateStatic(stackarea, stacksz, prio, fn, param);
}
diff --git a/src/gos/osx.c b/src/gos/osx.c
index 3692fe5e..a5560b4e 100644
--- a/src/gos/osx.c
+++ b/src/gos/osx.c
@@ -149,7 +149,7 @@ bool_t gfxSemWait(gfxSem *pSem, delaytime_t ms) {
struct timeval now;
struct timespec tm;
- gettimeofday(&now, NULL);
+ gettimeofday(&now, 0);
tm.tv_sec = now.tv_sec + ms / 1000;
tm.tv_nsec = (now.tv_usec + ms % 1000) * 1000;
while (!pSem->cnt) {
diff --git a/src/gos/win32.c b/src/gos/win32.c
index 77b35dc3..a05e5c30 100644
--- a/src/gos/win32.c
+++ b/src/gos/win32.c
@@ -57,7 +57,7 @@ void gfxSleepMicroseconds(delaytime_t ms) {
void gfxSystemLock(void) {
if (!SystemMutex)
- SystemMutex = CreateMutex(NULL, FALSE, NULL);
+ SystemMutex = CreateMutex(0, FALSE, 0);
WaitForSingleObject(SystemMutex, INFINITE);
}
@@ -87,7 +87,7 @@ semcount_t gfxSemCounter(gfxSem *pSem) {
if (!NtQuerySemaphore)
NtQuerySemaphore = (_NtQuerySemaphore)GetProcAddress(GetModuleHandle("ntdll.dll"), "NtQuerySemaphore");
- NtQuerySemaphore(*pSem, 0, &BasicInfo, sizeof(BasicInfo), NULL);
+ NtQuerySemaphore(*pSem, 0, &BasicInfo, sizeof(BasicInfo), 0);
return BasicInfo.CurrentCount;
}
@@ -96,7 +96,7 @@ gfxThreadHandle gfxThreadCreate(void *stackarea, size_t stacksz, threadpriority_
(void) stackarea;
HANDLE thd;
- if (!(thd = CreateThread(NULL, stacksz, fn, param, CREATE_SUSPENDED, NULL)))
+ if (!(thd = CreateThread(0, stacksz, fn, param, CREATE_SUSPENDED, 0)))
return FALSE;
SetThreadPriority(thd, prio);
diff --git a/src/gqueue/gqueue.c b/src/gqueue/gqueue.c
index 00bdede6..2adfd9ff 100644
--- a/src/gqueue/gqueue.c
+++ b/src/gqueue/gqueue.c
@@ -83,7 +83,7 @@
}
bool_t gfxQueueASyncIsEmpty(gfxQueueASync *pqueue) {
- return pqueue->head == NULL;
+ return pqueue->head == 0;
}
bool_t gfxQueueASyncIsIn(gfxQueueASync *pqueue, const gfxQueueASyncItem *pitem) {
@@ -176,7 +176,7 @@
}
bool_t gfxQueueGSyncIsEmpty(gfxQueueGSync *pqueue) {
- return pqueue->head == NULL;
+ return pqueue->head == 0;
}
bool_t gfxQueueGSyncIsIn(gfxQueueGSync *pqueue, const gfxQueueGSyncItem *pitem) {
@@ -282,7 +282,7 @@
}
bool_t gfxQueueFSyncIsEmpty(gfxQueueFSync *pqueue) {
- return pqueue->head == NULL;
+ return pqueue->head == 0;
}
bool_t gfxQueueFSyncIsIn(gfxQueueFSync *pqueue, const gfxQueueFSyncItem *pitem) {
diff --git a/src/gtimer/gtimer.c b/src/gtimer/gtimer.c
index 7425f65d..de40e16c 100644
--- a/src/gtimer/gtimer.c
+++ b/src/gtimer/gtimer.c
@@ -132,8 +132,8 @@ void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, bool_t periodic, de
// Start our thread if not already going
if (!hThread) {
- hThread = gfxThreadCreate(waTimerThread, sizeof(waTimerThread), GTIMER_THREAD_PRIORITY, GTimerThreadHandler, NULL);
- if (hThread) gfxThreadClose(hThread); // We never really need the handle again
+ hThread = gfxThreadCreate(waTimerThread, sizeof(waTimerThread), GTIMER_THREAD_PRIORITY, GTimerThreadHandler, 0);
+ if (hThread) {gfxThreadClose(hThread);} // We never really need the handle again
}
// Is this already scheduled?