Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Functions
wsf_timer.h File Reference

Timer service. More...

#include "wsf_os.h"

Go to the source code of this file.

Data Structures

struct  wsfTimer_tag
 Timer structure. More...
 

Macros

#define WSF_MS_PER_TICK   10
 Default milliseconds per tick rate. More...
 

Typedefs

typedef uint32_t wsfTimerTicks_t
 Timer ticks data type. More...
 
typedef struct wsfTimer_tag wsfTimer_t
 Timer structure. More...
 

Functions

void WsfTimerInit (void)
 Initialize the timer service. This function should only be called once upon system initialization. More...
 
void WsfTimerStartSec (wsfTimer_t *pTimer, wsfTimerTicks_t sec)
 Start a timer in units of seconds. Before this function is called parameter pTimer->handlerId must be set to the event handler for this timer and parameter pTimer->msg must be set to any application-defined timer event parameters. More...
 
void WsfTimerStartMs (wsfTimer_t *pTimer, wsfTimerTicks_t ms)
 Start a timer in units of milliseconds. More...
 
void WsfTimerStop (wsfTimer_t *pTimer)
 Stop a timer. More...
 
void WsfTimerUpdate (wsfTimerTicks_t ticks)
 Update the timer service with the number of elapsed ticks. This function is typically called only from timer porting code. More...
 
wsfTimerTicks_t WsfTimerNextExpiration (uint8_t *pTimerRunning)
 Return the number of ticks until the next timer expiration. Note that this function can return zero even if a timer is running, indicating the timer has expired but has not yet been serviced. More...
 
wsfTimer_tWsfTimerServiceExpired (wsfTaskId_t taskId)
 Service expired timers for the given task. This function is typically called only WSF OS porting code. More...
 
void WsfTimerSleep (void)
 Check if there is an active timer and if there is enough time to go to sleep. More...
 
void WsfTimerSleepUpdate (void)
 Update WSF timer based on elapsed RTC ticks. More...
 

Detailed Description

Timer service.

Copyright (c) 2009-2019 Arm Ltd. All Rights Reserved.

Copyright (c) 2019-2020 Packetcraft, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file wsf_timer.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.