rtc.h File Reference

This file provides access to the System's Real-time Clock that maintains time even through power-loss granted that the RTC Backup battery is installed. More...

#include <stdint.h>
Include dependency graph for rtc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  __attribute__
 

Enumerations

enum  __attribute__ {
  dow_sun = 0, dow_mon, dow_tue, dow_wed,
  dow_thu, dow_fri, dow_sat
}
 

Functions

void rtc_init (void)
 Initialize the RTC. More...
 
rtc_t rtc_gettime (void)
 
void rtc_settime (const rtc_t *rtcstruct)
 
const char * rtc_get_date_time_str (void)
 

Detailed Description

This file provides access to the System's Real-time Clock that maintains time even through power-loss granted that the RTC Backup battery is installed.

Enumeration Type Documentation

Enumeration of the RTC.dow

Enumerator
dow_sun 
dow_mon 
dow_tue 
dow_wed 
dow_thu 
dow_fri 
dow_sat 

Function Documentation

const char* rtc_get_date_time_str ( void  )

Get the RTC time as string in the format: "Wed Feb 13 15:46:11 2013"

Returns
the pointer to the time string (do not modify it)
Warning
This method is not thread safe
rtc_t rtc_gettime ( void  )
Returns
the latest time in RTC structure
void rtc_init ( void  )

Initialize the RTC.

void rtc_settime ( const rtc_t *  rtcstruct)

Sets the RTC time

Parameters
[in]rtcstructThe rtc time structure pointer