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

Wrapper class for RTC functions. More...

#include <cs_RTC.h>

Static Public Member Functions

static uint32_t getCount ()
 return number of ticks More...
 
static uint32_t ticksToMs (uint32_t ticks)
 Return time in ms, given time in ticks. More...
 
static uint32_t msToTicks (uint32_t ms)
 Return time in ticks, given time in ms Make sure time in ms is not too large! (limit is 512,000 ms with current frequency) More...
 
static uint32_t difference (uint32_t ticksTo, uint32_t ticksFrom)
 return difference between two tick counter values More...
 
static uint32_t differenceMs (uint32_t ticksTo, uint32_t ticksFrom)
 return difference between two tick counter values in ms. More...
 
static uint32_t msPassedSince (uint32_t ticksFrom)
 Returns the number of milliseconds passed since the given tick counter value. More...
 
static uint32_t now ()
 return current clock in ms More...
 

Private Member Functions

 RTC ()=default
 
 RTC (RTC const &)=delete
 
void operator= (RTC const &)=delete
 

Detailed Description

Wrapper class for RTC functions.

if NRF51_USE_SOFTDEVICE==1 uses the RTC0 clock managed by the softdevice, otherwise uses the RTC1 clock used by the app timer With the current clock frequency and max counter val, the RTC overflows every 512s.

Constructor & Destructor Documentation

◆ RTC() [1/2]

RTC::RTC ( )
privatedefault

◆ RTC() [2/2]

RTC::RTC ( RTC const &  )
privatedelete

Member Function Documentation

◆ difference()

static uint32_t RTC::difference ( uint32_t  ticksTo,
uint32_t  ticksFrom 
)
static

return difference between two tick counter values

◆ differenceMs()

static uint32_t RTC::differenceMs ( uint32_t  ticksTo,
uint32_t  ticksFrom 
)
static

return difference between two tick counter values in ms.

◆ getCount()

static uint32_t RTC::getCount ( )
static

return number of ticks

◆ msPassedSince()

static uint32_t RTC::msPassedSince ( uint32_t  ticksFrom)
static

Returns the number of milliseconds passed since the given tick counter value.

◆ msToTicks()

static uint32_t RTC::msToTicks ( uint32_t  ms)
static

Return time in ticks, given time in ms Make sure time in ms is not too large! (limit is 512,000 ms with current frequency)

◆ now()

static uint32_t RTC::now ( )
inlinestatic

return current clock in ms

◆ operator=()

void RTC::operator= ( RTC const &  )
privatedelete

◆ ticksToMs()

static uint32_t RTC::ticksToMs ( uint32_t  ticks)
static

Return time in ms, given time in ticks.


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