SwTimer#

Modules#

SSwTimer

SSwTimerPrivate_t

Enumerations#

enum
ESWTIMER_STATUS_SUCCESS = 0
ESWTIMER_STATUS_FAILED = 1
}

Defines return values from SwTimer methods.

Typedefs#

typedef enum ESwTimerStatus

Defines return values from SwTimer methods.

typedef struct SSwTimerLiaison *

Typedef needed to include pointer for struct SSwTimerLiaison in struct SSwTimer, without requiring include of definition SSwTimerLiaison.

typedef struct SSwTimer
typedef struct SSwTimerPrivate_t

Timer Liaison object.

Functions#

void
TimerSetCallback(SSwTimer *pTimer, void(*pCallback)(SSwTimer *pTimer))

Configures the callback method called on timer timeout.

TimerStart(SSwTimer *pTimer, uint32_t iTimeout)

Configures Timer timeout and starts the timer.

TimerStartFromISR(SSwTimer *pTimer, uint32_t iTimeout)

Configures Timer timeout and starts the timer from an Interrupt Service Routine.

TimerRestart(SSwTimer *pTimer)

Restarts the timer.

TimerRestartFromISR(SSwTimer *pTimer)

Restarts the timer.

TimerStop(SSwTimer *pTimer)

Stops an active timer.

TimerStopFromISR(SSwTimer *pTimer)

Stops an active timer from an Interrupt Service Routine.

bool
TimerIsActive(SSwTimer *pTimer)

Returns if the timer is active.

bool
TimerHasPendingCallback(SSwTimer *pTimer)

Returns if timer has a timeout callback pending.

bool

Returns if timer has a timeout callback pending from an Interrupt Service Routine.

TimerGetMsUntilTimeout(SSwTimer *pTimer, uint32_t refTaskTickCount, uint32_t *pMsUntilTimeout)

Queries a timer for number of milliseconds remaining before time out Method may be called on inactive timers, but in that case ESWTIMER_STATUS_FAILED will be returned and pMsUntilTimeout will not be modified.

uint32_t
TimerGetPeriod(SSwTimer *pTimer)

Returns the period of a freeRTOS timer.

Macros#

#define

Space for holding FreeRTOS StaticEventGroup_t and EventGroupHandle_t.

Enumeration Documentation#

ESwTimerStatus#

ESwTimerStatus

Defines return values from SwTimer methods.

Enumerator
ESWTIMER_STATUS_SUCCESS

ESWTIMER_STATUS_SUCCESS.

ESWTIMER_STATUS_FAILED

ESWTIMER_STATUS_FAILED.


Definition at line 48 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

Typedef Documentation#

ESwTimerStatus#

typedef enum ESwTimerStatus ESwTimerStatus

Defines return values from SwTimer methods.


Definition at line 52 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

SSwTimerLiaisonPtr#

typedef struct SSwTimerLiaison* SSwTimerLiaisonPtr

Typedef needed to include pointer for struct SSwTimerLiaison in struct SSwTimer, without requiring include of definition SSwTimerLiaison.


Definition at line 69 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

SSwTimer#

typedef struct SSwTimer SSwTimer

Definition at line 80 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

SSwTimerPrivate_t#

typedef struct SSwTimerPrivate_t SSwTimerPrivate_t

Timer Liaison object.

All content is private.


Definition at line 35 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimerPrivate.h

Function Documentation#

TimerSetCallback#

void TimerSetCallback (SSwTimer * pTimer, void(*)(SSwTimer *pTimer) pCallback)

Configures the callback method called on timer timeout.

Parameters
[in]pTimer

Pointer to the timer object

[in]pCallback

Callback method of type void Callback(SSwTimer* pTimer). Argument may be NULL, in which case no callback is performed.

If called on a timer that has a pending callback, the callback will be executed on the new callback method.


Definition at line 90 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerStart#

ESwTimerStatus TimerStart (SSwTimer * pTimer, uint32_t iTimeout)

Configures Timer timeout and starts the timer.

Parameters
[in]pTimer

Pointer to the timer object

[in]iTimeout

Timeout value in ms. Zero is illegal.

If method is called on a timer that is already started, the timer will restart from zero and count towards the new timeout.


Definition at line 103 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerStartFromISR#

ESwTimerStatus TimerStartFromISR (SSwTimer * pTimer, uint32_t iTimeout)

Configures Timer timeout and starts the timer from an Interrupt Service Routine.

Parameters
[in]pTimer

Pointer to the timer object

[in]iTimeout

Timeout value in ms. Zero is illegal.

If method is called on a timer that is already started, the timer will restart from zero and count towards the new timeout.


Definition at line 116 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerRestart#

ESwTimerStatus TimerRestart (SSwTimer * pTimer)

Restarts the timer.

Parameters
[in]pTimer

Pointer to the timer object

Starts an inactive timer. If called on a timer that is already started, the timer will restart from zero.


Definition at line 128 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerRestartFromISR#

ESwTimerStatus TimerRestartFromISR (SSwTimer * pTimer)

Restarts the timer.

Parameters
[in]pTimer

Pointer to the timer object

Starts an inactive timer. If called on a timer that is already started, the timer will restart from zero.


Definition at line 140 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerStop#

ESwTimerStatus TimerStop (SSwTimer * pTimer)

Stops an active timer.

Parameters
[in]pTimer

Pointer to the timer object

Method may be called on inactive timers. Any pending callbacks that has not been performed yet will be cleared.


Definition at line 152 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerStopFromISR#

ESwTimerStatus TimerStopFromISR (SSwTimer * pTimer)

Stops an active timer from an Interrupt Service Routine.

Parameters
[in]pTimer

Pointer to the timer object

Method may be called on inactive timers. Any pending callbacks that has not been performed yet will be cleared.


Definition at line 164 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerIsActive#

bool TimerIsActive (SSwTimer * pTimer)

Returns if the timer is active.

Parameters
[in]pTimer

Pointer to the timer object

Active is defined as the timer counting, or having a pending callback.


Definition at line 174 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerHasPendingCallback#

bool TimerHasPendingCallback (SSwTimer * pTimer)

Returns if timer has a timeout callback pending.

Parameters
[in]pTimer

Pointer to the timer object


Definition at line 183 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerHasPendingCallbackFromISR#

bool TimerHasPendingCallbackFromISR (SSwTimer * pTimer)

Returns if timer has a timeout callback pending from an Interrupt Service Routine.

Parameters
[in]pTimer

Pointer to the timer object


Definition at line 192 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerGetMsUntilTimeout#

ESwTimerStatus TimerGetMsUntilTimeout (SSwTimer * pTimer, uint32_t refTaskTickCount, uint32_t * pMsUntilTimeout)

Queries a timer for number of milliseconds remaining before time out Method may be called on inactive timers, but in that case ESWTIMER_STATUS_FAILED will be returned and pMsUntilTimeout will not be modified.

Parameters
[in]pTimer

Pointer to the timer object

[in]refTaskTickCount

The xTaskGetTickCount() value to use as a reference for the timeout.

[out]pMsUntilTimeout

Pointer to variable to receive remaining time until timeout


Definition at line 206 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

TimerGetPeriod#

uint32_t TimerGetPeriod (SSwTimer * pTimer)

Returns the period of a freeRTOS timer.

Parameters
[in]pTimer

Pointer to the timer object


Definition at line 213 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h

Macro Definition Documentation#

PRIVATE_TIMER_SIZE#

#define PRIVATE_TIMER_SIZE
Value:
11

Space for holding FreeRTOS StaticEventGroup_t and EventGroupHandle_t.


Definition at line 57 of file /mnt/raid/workspaces/ws.Mh9rMZz8x/overlay/gsdk/protocol/z-wave/Components/SwTimer/SwTimer.h