A generic I2C RTC base class. DO NOT USE DIRECTLY.
More...
#include <RTClib.h>
|
static uint8_t | bcd2bin (uint8_t val) |
| Convert a binary coded decimal value to binary. RTC stores time/date values as BCD. More...
|
|
static uint8_t | bin2bcd (uint8_t val) |
| Convert a binary value to BCD format for the RTC registers. More...
|
|
|
Adafruit_I2CDevice * | i2c_dev = NULL |
| Pointer to I2C bus interface.
|
|
A generic I2C RTC base class. DO NOT USE DIRECTLY.
◆ bcd2bin()
static uint8_t RTC_I2C::bcd2bin |
( |
uint8_t |
val | ) |
|
|
inlinestaticprotected |
Convert a binary coded decimal value to binary. RTC stores time/date values as BCD.
- Parameters
-
- Returns
- Binary value
◆ bin2bcd()
static uint8_t RTC_I2C::bin2bcd |
( |
uint8_t |
val | ) |
|
|
inlinestaticprotected |
Convert a binary value to BCD format for the RTC registers.
- Parameters
-
- Returns
- BCD value
◆ read_register()
uint8_t RTC_I2C::read_register |
( |
uint8_t |
reg | ) |
|
|
protected |
Read value from register.
- Parameters
-
- Returns
- value of register
◆ write_register()
void RTC_I2C::write_register |
( |
uint8_t |
reg, |
|
|
uint8_t |
val |
|
) |
| |
|
protected |
Write value to register.
- Parameters
-
reg | register address |
val | value to write |
The documentation for this class was generated from the following files: