Loading...
Searching...
No Matches
RTC emulation on top of a RTT

Detailed Description

Files

file  rtt_rtc.h
 Additional functions provided in addition to the normal RTC API.
 

Functions

void rtt_rtc_settimeofday (uint32_t s, uint32_t us)
 Set the time as epoch (elapsed seconds since RIOT_EPOCH) with sub-second precision This feature is an extension provided by the rtt_rtc module.
 
void rtt_rtc_gettimeofday (uint32_t *s, uint32_t *us)
 Get the current epoch (elapsed seconds since RIOT_EPOCH) with sub-second precision This feature is an extension provided by the rtt_rtc module.
 

Function Documentation

◆ rtt_rtc_gettimeofday()

void rtt_rtc_gettimeofday ( uint32_t *  s,
uint32_t *  us 
)

Get the current epoch (elapsed seconds since RIOT_EPOCH) with sub-second precision This feature is an extension provided by the rtt_rtc module.

Note
The actual µs precision depends on the underlying hardware. The smallest time step will be 1 / RTT_FREQUENCY.
Parameters
[out]sThe current epoch timestamp
[out]usSub-Seconds

◆ rtt_rtc_settimeofday()

void rtt_rtc_settimeofday ( uint32_t  s,
uint32_t  us 
)

Set the time as epoch (elapsed seconds since RIOT_EPOCH) with sub-second precision This feature is an extension provided by the rtt_rtc module.

Note
The actual µs precision depends on the underlying hardware. The smallest time step will be 1 / RTT_FREQUENCY.
Parameters
[in]sThe new epoch timestamp
[in]usSub-Seconds