UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
Functions

Real-Time Clock Driver. More...

Functions

void RTC_init (void)
 
void RTC_getTime (uint32_t *time)
 
void RTC_getTime_ms (uint64_t *time_ms)
 
void RTC_setTime (uint32_t *time)
 
bool RTC_timerElapsed_ms (uint64_t start_time_ms, uint64_t period_ms)
 

Detailed Description

Real-Time Clock Driver.

Real-Time Clock Driver.

Function Documentation

void RTC_init ( void  )

Initialise Real-Time Clock. Will block for ~1500ms if RTC not already initialised.

Definition at line 15 of file rtc.c.

void RTC_getTime ( uint32_t *  time)

Get time from Real-Time Clock.

uint32_t* Pointer to variable to store time value.

Definition at line 20 of file rtc.c.

void RTC_getTime_ms ( uint64_t *  time_ms)

Get time in milliseconds from Real-Time Clock.

uint64_t* Pointer to variable to store time in milliseconds value.

Definition at line 33 of file rtc.c.

void RTC_setTime ( uint32_t *  time)

Set time on Real-Time Clock.

uint32_t* Pointer to variable containing time value to be set.

Definition at line 46 of file rtc.c.

bool RTC_timerElapsed_ms ( uint64_t  start_time_ms,
uint64_t  period_ms 
)

Timer function, returns true if current_time < start_time_ms or current_time > start_time_ms + period.

uint64_t Start time of timer uint64_t Period of timer

Definition at line 53 of file rtc.c.