#include <cfg/os.h>
#include <sys/event.h>
#include <sys/timer.h>
#include <dev/rtc.h>
#include <arch/arm/stm32f10x_rtc.h>
#include <arch/arm/stm32f10x_rcc.h>
#include <arch/arm/stm32f10x_pwr.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
Functions | |
int | Stm32RtcGetClock (struct _tm *tm) |
Get date and time from an DS1307 hardware clock. | |
int | Stm32RtcSetClock (const struct _tm *tm) |
Set the DS1307 hardware clock. | |
int | Stm32RtcInit (void) |
Initialize the RTC in stm32f10x controller. | |
Variables | |
NUTRTC | rtcStm32 |
int Stm32RtcGetClock | ( | struct _tm * | tm | ) |
Get date and time from an DS1307 hardware clock.
tm | Points to a structure that receives the date and time information. |
References localtime_r(), rc, RTC, RTC_FLAG_RSF, and time().
int Stm32RtcSetClock | ( | const struct _tm * | tm | ) |
Set the DS1307 hardware clock.
tm | Points to a structure which contains the date and time information. |
References mktime(), RTC, RTC_FLAG_CNF, and time().
int Stm32RtcInit | ( | void | ) |
Initialize the RTC in stm32f10x controller.
References PWR, PWR_CR_DBP, rc, RCC, RCC_APB1Periph_BKP, RCC_APB1Periph_PWR, RCC_RTCCLKSource_HSE_Div128, RTC, RTC_FLAG_CNF, and RTC_FLAG_RSF.
{ Stm32RtcInit, Stm32RtcGetClock, Stm32RtcSetClock, NULL, NULL, NULL, NULL }