K-FSW v1.2.1-59-gcaca356
KFSW: modular flight software on Zephyr, for small satellites
Loading...
Searching...
No Matches
Wall clock

Functions

bool kfsw_wallclock_is_present (void)
 
int kfsw_wallclock_get (int64_t *seconds)
 
int kfsw_wallclock_set (int64_t seconds)
 

Description

Function Documentation

◆ kfsw_wallclock_get()

int kfsw_wallclock_get ( int64_t *  seconds)

#include <wallclock.h>

Read the wall clock.

Parameters
[out]secondsUnix seconds.
Return values
0Read, and the value had been set.
-ENOTSUPNo wall clock in this composition.
-ENODATAThe clock is running but was never set.
<0An errno from the driver.

◆ kfsw_wallclock_is_present()

bool kfsw_wallclock_is_present ( void  )

#include <wallclock.h>

Wall time from the RTC named by the kfsw,rtc chosen node.

Retention depends on the RTC, board configuration and backup supply. Without an RTC the calls return -ENOTSUP. Whether an RTC is configured.

◆ kfsw_wallclock_set()

int kfsw_wallclock_set ( int64_t  seconds)

#include <wallclock.h>

Set the wall clock.

Parameters
secondsUnix seconds. Must be positive.
Return values
0Set.
-EINVALA time before the epoch.
-ENOTSUPNo wall clock in this composition.
<0An errno from the driver.