27 #include <mraa/i2c.hpp>
29 #define ADDR 0x68 // device address
32 #define TIME_CAL_ADDR 0x00
33 #define ALARM1_ADDR 0x07
34 #define ALARM2_ADDR 0x0B
35 #define CONTROL_ADDR 0x0E
36 #define STATUS_ADDR 0x0F
37 #define AGING_OFFSET_ADDR 0x10
38 #define TEMPERATURE_ADDR 0x11
127 uint16_t i2cReadReg_N (
int reg,
unsigned int len, uint8_t * buffer);
128 mraa::Result i2cWriteReg_N (uint8_t reg,
unsigned int len, uint8_t * buffer);
129 uint8_t DECtoBSD (uint8_t data);
130 uint8_t BCDtoDEC (uint8_t data);
MAXDS3231M(int bus=0, int devAddr=0x68)
Definition: maxds3231m.cxx:34
void setDate(Time3231 &time)
Definition: maxds3231m.cxx:48
bool getDate(Time3231 &time)
Definition: maxds3231m.cxx:55
uint16_t getTemperature()
Definition: maxds3231m.cxx:77
std::string name()
Definition: maxds3231m.h:116
Definition: maxds3231m.h:55
API for the MAXDS3231M I2C Real-Time Clock.
Definition: maxds3231m.h:84