Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
Timer Class Reference

Timer on top of the timer peripheral. More...

#include <cs_Timer.h>

Public Member Functions

void init ()
 
void createSingleShot (app_timer_id_t &timer_handle, app_timer_timeout_handler_t func)
 Create single shot timer. More...
 
void start (app_timer_id_t &timer_handle, uint32_t ticks, void *obj)
 Start a previously created timer @timer_handle Reference to previously created timer @ticks Number of ticks till timeout (minimum is 5) @obj Reference to the object on which the function should be executed. More...
 
void stop (app_timer_id_t &timer_handle)
 Stop a timer @timer_handle Reference to previously created timer. More...
 
void reset (app_timer_id_t &timer_handle, uint32_t ticks, void *obj)
 Resets a timer (if already active) to the new ticks @timer_handle Reference to previously created timer @ticks Number of ticks till timeout (minimum is 5) @obj Reference to the object on which the function should be executed. More...
 

Static Public Member Functions

static TimergetInstance ()
 

Private Member Functions

 Timer ()
 
 Timer (Timer const &)
 
void operator= (Timer const &)
 

Detailed Description

Timer on top of the timer peripheral.

Constructor & Destructor Documentation

◆ Timer() [1/2]

Timer::Timer ( )
inlineprivate

◆ Timer() [2/2]

Timer::Timer ( Timer const &  )
private

Member Function Documentation

◆ createSingleShot()

void Timer::createSingleShot ( app_timer_id_t &  timer_handle,
app_timer_timeout_handler_t  func 
)

Create single shot timer.

function will only be called once and after that timer will be stopped @timer_handle An id or handle to reference the timer, set by this function (actually, just a Uint32_t) @func The function to be called

Create a timer for a specific purpose.

◆ getInstance()

static Timer & Timer::getInstance ( )
static

◆ init()

void Timer::init ( )

◆ operator=()

void Timer::operator= ( Timer const &  )
private

◆ reset()

void Timer::reset ( app_timer_id_t &  timer_handle,
uint32_t  ticks,
void *  obj 
)

Resets a timer (if already active) to the new ticks @timer_handle Reference to previously created timer @ticks Number of ticks till timeout (minimum is 5) @obj Reference to the object on which the function should be executed.

◆ start()

void Timer::start ( app_timer_id_t &  timer_handle,
uint32_t  ticks,
void *  obj 
)

Start a previously created timer @timer_handle Reference to previously created timer @ticks Number of ticks till timeout (minimum is 5) @obj Reference to the object on which the function should be executed.

◆ stop()

void Timer::stop ( app_timer_id_t &  timer_handle)

Stop a timer @timer_handle Reference to previously created timer.


The documentation for this class was generated from the following file: