RTClib
|
RTC based on the PCF8563 chip connected via I2C and the Wire library. More...
#include <RTClib.h>
Public Member Functions | |
bool | begin (TwoWire *wireInstance=&Wire) |
Start I2C for the PCF8563 and test succesful connection. More... | |
bool | lostPower (void) |
Check the status of the VL bit in the VL_SECONDS register. More... | |
void | adjust (const DateTime &dt) |
Set the date and time. More... | |
DateTime | now () |
Get the current date/time. More... | |
void | start (void) |
Resets the STOP bit in register Control_1. | |
void | stop (void) |
Sets the STOP bit in register Control_1. | |
uint8_t | isrunning () |
Is the PCF8563 running? Check the STOP bit in register Control_1. More... | |
Pcf8563SqwPinMode | readSqwPinMode () |
Read the mode of the CLKOUT pin on the PCF8563. More... | |
void | writeSqwPinMode (Pcf8563SqwPinMode mode) |
Set the CLKOUT pin mode on the PCF8563. More... | |
RTC based on the PCF8563 chip connected via I2C and the Wire library.
bool RTC_PCF8563::begin | ( | TwoWire * | wireInstance = &Wire | ) |
Start I2C for the PCF8563 and test succesful connection.
wireInstance | pointer to the I2C bus |
bool RTC_PCF8563::lostPower | ( | void | ) |
Check the status of the VL bit in the VL_SECONDS register.
The PCF8563 has an on-chip voltage-low detector. When VDD drops below Vlow, bit VL in the VL_seconds register is set to indicate that the integrity of the clock information is no longer guaranteed.
DateTime RTC_PCF8563::now | ( | ) |
Get the current date/time.
uint8_t RTC_PCF8563::isrunning | ( | void | ) |
Is the PCF8563 running? Check the STOP bit in register Control_1.
Pcf8563SqwPinMode RTC_PCF8563::readSqwPinMode | ( | ) |
Read the mode of the CLKOUT pin on the PCF8563.
void RTC_PCF8563::writeSqwPinMode | ( | Pcf8563SqwPinMode | mode | ) |
Set the CLKOUT pin mode on the PCF8563.
mode | The mode to set, see the Pcf8563SqwPinMode enum for options |