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 119 mraa::Result
writeBytes(uint8_t reg, uint8_t *buffer,
int len);
129 int readBytes(uint8_t reg, uint8_t *buffer,
int len);
uint8_t decToBcd(unsigned int val)
Definition: ds1307.cxx:190
unsigned int minutes
Definition: ds1307.hpp:159
bool pm
Definition: ds1307.hpp:187
unsigned int dayOfWeek
Definition: ds1307.hpp:167
mraa::Result disableClock()
Definition: ds1307.cxx:175
unsigned int dayOfMonth
Definition: ds1307.hpp:171
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
unsigned int seconds
Definition: ds1307.hpp:155
API for the DS1307 Real-Time CLock.
Definition: ds1307.hpp:72
unsigned int bcdToDec(uint8_t val)
Definition: ds1307.cxx:196
bool setTime()
Definition: ds1307.cxx:123
int readBytes(uint8_t reg, uint8_t *buffer, int len)
Definition: ds1307.cxx:67
mraa::Result writeBytes(uint8_t reg, uint8_t *buffer, int len)
Definition: ds1307.cxx:49
mraa::Result enableClock()
Definition: ds1307.cxx:162
unsigned int year
Definition: ds1307.hpp:179
DS1307(int bus)
Definition: ds1307.cxx:38
bool loadTime()
Definition: ds1307.cxx:77
bool amPmMode
Definition: ds1307.hpp:183
unsigned int month
Definition: ds1307.hpp:175
unsigned int hours
Definition: ds1307.hpp:163