ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
ruuvi_interface_rtc.h File Reference

Go to the source code of this file.

Functions

rd_status_t ri_rtc_init (void)
 Initializes RTC at 0 ms. More...
 
rd_status_t ri_rtc_uninit (void)
 Stop RTC if applicable. More...
 
uint64_t ri_rtc_millis (void)
 Get milliseconds since init. More...
 

Detailed Description

Author
Otso Jousimaa otso@.nosp@m.ojou.nosp@m.sima..nosp@m.net
Date
2019-07-07

Interface for basic RTC functionality.

Definition in file ruuvi_interface_rtc.h.

Function Documentation

◆ ri_rtc_init()

rd_status_t ri_rtc_init ( void  )

Initializes RTC at 0 ms.

Returns
RUUVI_SUCCESS if no error occured, error code otherwise.

◆ ri_rtc_millis()

uint64_t ri_rtc_millis ( void  )

Get milliseconds since init.

Returns
number of milliseconds since RTC init.
RUUVI_DRIVER_UINT64_INVALID if RTC is not running

◆ ri_rtc_uninit()

rd_status_t ri_rtc_uninit ( void  )

Stop RTC if applicable.

Returns
RUUVI_SUCCESS if no error occured, error code otherwise.