Go to the source code of this file.
Functions | |
int | PcfRtcInit (void) |
Initialize the interface to an Intersil PCF8563 hardware clock. | |
int | PcfRtcGetClock (struct _tm *tm) |
Get date and time from an PCF8563 hardware clock. | |
int | PcfRtcSetClock (CONST struct _tm *tm) |
Set an PCF8563 hardware clock. | |
int | PcfRtcGetAlarm (int idx, struct _tm *tm, int *aflgs) |
Get alarm date and time of an PCF8563 hardware clock. | |
int | PcfRtcSetAlarm (int idx, CONST struct _tm *tm, int aflgs) |
Set alarm of an PCF8563 hardware clock. | |
int | PcfRtcGetStatus (uint32_t *sflgs) |
Query RTC status flags. | |
int | PcfRtcClearStatus (uint32_t sflgs) |
Clear RTC status flags. | |
int | PcfRtcReadRegs (uint8_t addr, uint8_t *buff, size_t len) |
Read RTC registers. | |
int | PcfRtcWrite (int nv, CONST uint8_t *buff, size_t len) |
Write to RTC registers. | |
Variables | |
NUTRTC | rtcPcf8563 |
int PcfRtcInit | ( | void | ) |
int PcfRtcGetClock | ( | struct _tm * | tm | ) |
int PcfRtcSetClock | ( | CONST struct _tm * | tm | ) |
int PcfRtcGetAlarm | ( | int | idx, | |
struct _tm * | tm, | |||
int * | aflgs | |||
) |
Get alarm date and time of an PCF8563 hardware clock.
Not implemented.
idx | Zero based index. Two alarms are supported. | |
tm | Points to a structure that receives the date and time information. | |
aflgs | Points to an unsigned long that receives the enable flags. |
int PcfRtcSetAlarm | ( | int | idx, | |
CONST struct _tm * | tm, | |||
int | aflgs | |||
) |
Set alarm of an PCF8563 hardware clock.
Not implemented.
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. | |
aflgs | Each bit enables a specific comparision.
|
int PcfRtcGetStatus | ( | uint32_t * | sflgs | ) |
Query RTC status flags.
sflgs | Points to an unsigned long that receives the status flags.
|
Definition at line 224 of file pcf8563.c.
Referenced by PcfRtcInit().
int PcfRtcClearStatus | ( | uint32_t | sflgs | ) |
Read RTC registers.
reg | The first register to read. | |
buff | Pointer to a buffer that receives the register contents. | |
cnt | The number of registers to read. |
Definition at line 83 of file pcf8563.c.
Referenced by PcfRtcGetClock(), and PcfRtcGetStatus().
int PcfRtcWrite | ( | int | nv, | |
CONST uint8_t * | buff, | |||
size_t | cnt | |||
) |
Write to RTC registers.
nv | Must be set to 1 when writing to non-volatile registers. In this case the routine will poll for write cycle completion before returning to the caller. Set to zero if writing to volatile registers. | |
buff | This buffer must contain all bytes to be transfered to the RTC chip, including the register address. | |
cnt | Number of valid bytes in the buffer. |
Definition at line 106 of file pcf8563.c.
Referenced by PcfRtcSetClock().