RTC_NXP_Arduino 1.1.1
RTC driver device operation sample code for Arduino
|
#include <RTC_NXP.h>
Public Types | |
enum | board { NONE , ARDUINO_SHIELD } |
enum | alarm_setting { SECOND , MINUTE , HOUR , DAY , WEEKDAY } |
Public Member Functions | |
RTC_NXP () | |
virtual | ~RTC_NXP () |
virtual void | begin (void)=0 |
time_t | time (time_t *tp) |
virtual void | set (struct tm *now_tm)=0 |
virtual bool | oscillator_stop (void)=0 |
virtual void | alarm (alarm_setting digit, int val)=0 |
virtual void | alarm_clear (void)=0 |
virtual void | alarm_disable (void)=0 |
virtual uint8_t | int_clear (void)=0 |
Protected Member Functions | |
virtual time_t | rtc_time (void)=0 |
Static Protected Member Functions | |
static uint8_t | bcd2dec (uint8_t v) |
static uint8_t | dec2bcd (uint8_t v) |
RTC operation library for Arduino
Released under the MIT license License RTC_NXP class
RTC_NXP class is a base class for all RTC drivers All actual device class will be derived from this class
enum RTC_NXP::board |
RTC_NXP::RTC_NXP | ( | ) |
Constructor
Definition at line 3 of file RTC_NXP.cpp.
|
virtual |
Destructor
Definition at line 7 of file RTC_NXP.cpp.
|
pure virtual |
Alarm setting (pure virtual method)
digit | to specify which parameter to set: SECOND, MINUTE, HOUR, DAY, WEEKDAY in 'enum alarm_setting' |
val | Setting value. Set 0x80 to disabling |
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, and PCF85263A.
|
pure virtual |
Alarm clearing (pure virtual method)
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, and PCF85263A.
|
pure virtual |
Alarm interrupt disable (pure virtual method)
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, and PCF85263A.
|
staticprotected |
Class method for BCD to int conversion
v | BCD value |
Definition at line 19 of file RTC_NXP.cpp.
Referenced by PCF2131_base::rtc_time(), PCF85053A::rtc_time(), PCF85063_base::rtc_time(), PCF85263A::rtc_time(), PCF2131_base::timestamp(), and PCF85263A::timestamp().
|
pure virtual |
Initializer (pure virtual method)
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, PCF85063TP, and PCF85263A.
|
staticprotected |
Class method for int to BCD conversion
v | integer |
Definition at line 24 of file RTC_NXP.cpp.
Referenced by PCF2131_base::alarm(), PCF85053A::alarm(), PCF85063_base::alarm(), PCF2131_base::set(), PCF85053A::set(), PCF85063_base::set(), and PCF85263A::set().
|
pure virtual |
Interrupt clear (pure virtual method)
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, and PCF85263A.
|
pure virtual |
Detector for oscillation stop (pure virtual method)
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, PCF85063TP, and PCF85263A.
|
protectedpure virtual |
rtc_time (pure virtual method)
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, and PCF85263A.
Referenced by time().
|
pure virtual |
set (pure virtual method)
now_tm | struct to set calendar and time in RTC |
Implemented in ForFutureExtention, PCF2131_base, PCF2131_I2C, PCF2131_SPI, PCF85053A, PCF85063_base, PCF85063A, PCF85063TP, and PCF85263A.
time_t RTC_NXP::time | ( | time_t * | tp | ) |
time
"time()" in "time.h" compatible method for RTC
tp | pointer to time_t variable |
Definition at line 11 of file RTC_NXP.cpp.