Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_rtc

Driver for real-time clock. More...

Data Structures

struct  bc_rtc_t
 RTC date and time structure. More...
 

Functions

void bc_rtc_init (void)
 Initialize real-time clock.
 
void bc_rtc_get_date_time (bc_rtc_t *rtc)
 Get date and time from RTC. More...
 
bool bc_rtc_set_date_time (bc_rtc_t *rtc)
 Set gate and time to RTC. More...
 
uint32_t bc_rtc_rtc_to_timestamp (bc_rtc_t *rtc)
 Covert RTC to timestamp. More...
 

Detailed Description

Driver for real-time clock.

Function Documentation

void bc_rtc_get_date_time ( bc_rtc_t rtc)

Get date and time from RTC.

Parameters
[in]rtcPointer to the RTC date and time structure

Definition at line 52 of file bc_rtc.c.

Here is the call graph for this function:

uint32_t bc_rtc_rtc_to_timestamp ( bc_rtc_t rtc)

Covert RTC to timestamp.

Parameters
[in]rtcPointer to the RTC date and time structure
Returns
unix timestamp

Definition at line 23 of file bc_rtc.c.

Referenced by bc_rtc_get_date_time().

Here is the caller graph for this function:

bool bc_rtc_set_date_time ( bc_rtc_t rtc)

Set gate and time to RTC.

Parameters
[in]rtcPointer to the RTC date and time structure
Returns
true On success
false On failure

Definition at line 77 of file bc_rtc.c.