From 41271d632b74f5cf47c30d3b699eb6b2786f2136 Mon Sep 17 00:00:00 2001 From: inmarket Date: Sat, 23 Jun 2018 13:02:07 +1000 Subject: Added new type definitions - moving towards V3.0 --- src/gtimer/gtimer.c | 6 +++--- src/gtimer/gtimer.h | 16 ++++------------ 2 files changed, 7 insertions(+), 15 deletions(-) (limited to 'src/gtimer') diff --git a/src/gtimer/gtimer.c b/src/gtimer/gtimer.c index 22ec9ed2..7ae0b652 100644 --- a/src/gtimer/gtimer.c +++ b/src/gtimer/gtimer.c @@ -136,7 +136,7 @@ void gtimerDeinit(GTimer* pt) gtimerStop(pt); } -void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, bool_t periodic, delaytime_t millisec) { +void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, gBool periodic, delaytime_t millisec) { gfxMutexEnter(&mutex); // Start our thread if not already going @@ -205,8 +205,8 @@ void gtimerStop(GTimer *pt) { gfxMutexExit(&mutex); } -bool_t gtimerIsActive(GTimer *pt) { - return (pt->flags & GTIMER_FLG_SCHEDULED) ? TRUE : FALSE; +gBool gtimerIsActive(GTimer *pt) { + return (pt->flags & GTIMER_FLG_SCHEDULED) ? gTrue : gFalse; } void gtimerJab(GTimer *pt) { diff --git a/src/gtimer/gtimer.h b/src/gtimer/gtimer.h index cecf8e70..402c3f1e 100644 --- a/src/gtimer/gtimer.h +++ b/src/gtimer/gtimer.h @@ -63,10 +63,6 @@ typedef struct GTimer_t { /* External declarations. */ /*===========================================================================*/ -#ifdef __cplusplus -extern "C" { -#endif - /** * @brief Initialise a timer * @@ -91,7 +87,7 @@ void gtimerDeinit(GTimer* pt); * @param[in] pt Pointer to a GTimer structure * @param[in] fn The callback function * @param[in] param The parameter to pass to the callback function - * @param[in] periodic Is the timer a periodic timer? FALSE is a once-only timer. + * @param[in] periodic Is the timer a periodic timer? gFalse is a once-only timer. * @param[in] millisec The timer period. The following special values are allowed: * TIME_IMMEDIATE causes the callback function to be called asap. * A periodic timer with this value will fire once only. @@ -114,7 +110,7 @@ void gtimerDeinit(GTimer* pt); * * @api */ -void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, bool_t periodic, delaytime_t millisec); +void gtimerStart(GTimer *pt, GTimerFunction fn, void *param, gBool periodic, delaytime_t millisec); /** * @brief Stop a timer (periodic or otherwise) @@ -132,11 +128,11 @@ void gtimerStop(GTimer *pt); * * @param[in] pt Pointer to a GTimer structure * - * @return TRUE if active, FALSE otherwise + * @return gTrue if active, gFalse otherwise * * @api */ -bool_t gtimerIsActive(GTimer *pt); +gBool gtimerIsActive(GTimer *pt); /** * @brief Jab a timer causing the current period to immediate expire @@ -169,10 +165,6 @@ void gtimerJab(GTimer *pt); */ void gtimerJabI(GTimer *pt); -#ifdef __cplusplus -} -#endif - #endif /* GFX_USE_GTIMER */ #endif /* _GTIMER_H */ -- cgit v1.2.3