Add wrapper to write complete register
This commit is contained in:
parent
c3f9aa6a13
commit
3029c3cfe0
@ -262,6 +262,12 @@ class DS3231 {
|
||||
i2c_t::stop();
|
||||
}
|
||||
|
||||
template <typename Register>
|
||||
static void writeRegister(const Register ®)
|
||||
{
|
||||
writePartialRegister<0, sizeof(Register) - 1>(reg);
|
||||
}
|
||||
|
||||
static uint8_t calcDayOfWeek(uint16_t year, uint8_t month, uint16_t day)
|
||||
{
|
||||
day += month < 3 ? year-- : year - 2;
|
||||
|
Loading…
Reference in New Issue
Block a user