* * $Log: rtc.c,v $ * Revision 1.2 2006/10/08 16:48:09 haraldkipp * Documentation fixed * * Revision 1.1 2006/10/05 17:18:49 haraldkipp * Hardware independant RTC layer added. * * *
Definition in file rtc.c.
Go to the source code of this file.
Functions | |
int | NutRegisterRtc (NUTRTC *rtc) |
Register a specified RTC. | |
int | NutRtcGetTime (struct _tm *tm) |
Get date and time from the registered RTC. | |
int | NutRtcSetTime (CONST struct _tm *tm) |
Set date and time of the registered RTC. | |
int | NutRtcGetAlarm (int idx, struct _tm *tm, int *aflags) |
Get alarm date and time from the registered RTC. | |
int | NutRtcSetAlarm (int idx, CONST struct _tm *tm, int aflags) |
Set alarm date and time of the registered RTC. | |
int | NutRtcGetStatus (u_long *sflags) |
Query status flags from the registered RTC. | |
int | NutRtcClearStatus (u_long sflags) |
Clear status flags of the registered RTC. |
int NutRegisterRtc | ( | NUTRTC * | rtc | ) |
Register a specified RTC.
This will also initialize any hardware, if required.
rtc | Pointer to the NUTRTC structure. |
Definition at line 66 of file rtc.c.
References _NUTRTC::rtc_init.
int NutRtcGetTime | ( | struct _tm * | tm | ) |
Get date and time from the registered RTC.
Portable applications should use standard C functions.
tm | Points to a structure that receives the date and time information. |
Definition at line 88 of file rtc.c.
References _NUTRTC::rtc_gettime.
int NutRtcSetTime | ( | CONST struct _tm * | tm | ) |
Set date and time of the registered RTC.
Portable applications should stime().
tm | Points to a structure which contains the date and time information. |
Definition at line 106 of file rtc.c.
References _NUTRTC::rtc_settime.
int NutRtcGetAlarm | ( | int | idx, | |
struct _tm * | tm, | |||
int * | aflags | |||
) |
Get alarm date and time from the registered RTC.
idx | Zero based index. Two alarms are supported. | |
tm | Points to a structure that receives the date and time information. | |
aflags | Points to an unsigned long that receives the enable flags. |
Definition at line 125 of file rtc.c.
References _NUTRTC::rtc_getalarm.
int NutRtcSetAlarm | ( | int | idx, | |
CONST struct _tm * | tm, | |||
int | aflags | |||
) |
Set alarm date and time of the registered RTC.
idx | Zero based index. Two alarms are supported. | |
tm | Points to a structure which contains the date and time information. May be NULL to clear the alarm. | |
aflags | Each bit enables a specific comparision.
|
Definition at line 149 of file rtc.c.
References _NUTRTC::rtc_setalarm.
int NutRtcGetStatus | ( | u_long * | sflags | ) |
Query status flags from the registered RTC.
sflags | Points to an unsigned long that receives the status flags.
|
Definition at line 167 of file rtc.c.
References _NUTRTC::rtc_getstatus.
int NutRtcClearStatus | ( | u_long | sflags | ) |
Clear status flags of the registered RTC.
sflags | Status flags to clear. |
Definition at line 182 of file rtc.c.
References _NUTRTC::rtc_clrstatus.