30 #include <mraa/i2c.hpp>
32 #define DS1307_I2C_BUS 0
33 #define DS1307_I2C_ADDR 0x68
36 #define DS1307_DAY_MON 1
37 #define DS1307_DAY_TUE 2
38 #define DS1307_DAY_WED 3
39 #define DS1307_DAY_THU 4
40 #define DS1307_DAY_FRI 5
41 #define DS1307_DAY_SAT 6
42 #define DS1307_DAY_SUN 7
118 mraa::Result
writeBytes(uint8_t reg, uint8_t *buffer,
int len);
128 int readBytes(uint8_t reg, uint8_t *buffer,
int len);
uint8_t decToBcd(unsigned int val)
Definition: ds1307.cxx:203
unsigned int minutes
Definition: ds1307.h:158
bool pm
Definition: ds1307.h:186
unsigned int dayOfWeek
Definition: ds1307.h:166
mraa::Result disableClock()
Definition: ds1307.cxx:188
unsigned int dayOfMonth
Definition: ds1307.h:170
unsigned int seconds
Definition: ds1307.h:154
API for the DS1307 Real-Time CLock.
Definition: ds1307.h:71
unsigned int bcdToDec(uint8_t val)
Definition: ds1307.cxx:209
bool setTime()
Definition: ds1307.cxx:136
int readBytes(uint8_t reg, uint8_t *buffer, int len)
Definition: ds1307.cxx:74
mraa::Result writeBytes(uint8_t reg, uint8_t *buffer, int len)
Definition: ds1307.cxx:49
mraa::Result enableClock()
Definition: ds1307.cxx:175
unsigned int year
Definition: ds1307.h:178
DS1307(int bus)
Definition: ds1307.cxx:38
bool loadTime()
Definition: ds1307.cxx:90
bool amPmMode
Definition: ds1307.h:182
unsigned int month
Definition: ds1307.h:174
unsigned int hours
Definition: ds1307.h:162