ESPHome
2026.11.0-dev
Loading...
Searching...
No Matches
esphome
components
pcf85063
pcf85063.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
esphome/core/component.h
"
4
#include "
esphome/components/i2c/i2c.h
"
5
#include "
esphome/components/time/real_time_clock.h
"
6
7
namespace
esphome::pcf85063
{
8
9
class
PCF85063Component
final :
public
time::RealTimeClock
,
public
i2c::I2CDevice
{
10
public
:
11
void
setup
()
override
;
12
void
update
()
override
;
13
void
dump_config
()
override
;
14
void
read_time
();
15
void
write_time
();
16
17
protected
:
18
bool
read_rtc_
();
19
bool
write_rtc_
();
20
union
PCF85063Reg
{
21
struct
{
22
// Control_1 register
23
bool
cap_12pf
: 1;
24
bool
am_pm
: 1;
25
bool
correction_int_enable
: 1;
26
bool : 1;
27
bool
soft_reset
: 1;
28
bool
stop
: 1;
29
bool : 1;
30
bool
ext_test
: 1;
31
32
// Control_2 register
33
uint8_t
clkout_control
: 3;
34
bool
timer_flag
: 1;
35
bool
halfminute_int
: 1;
36
bool
minute_int
: 1;
37
bool
alarm_flag
: 1;
38
bool
alarm_int
: 1;
39
40
// Offset register
41
uint8_t
offset
: 7;
42
bool
coarse_mode
: 1;
43
44
// nvRAM register
45
uint8_t
nvram
: 8;
46
47
// Seconds register
48
uint8_t
second
: 4;
49
uint8_t
second_10
: 3;
50
bool
osc_stop
: 1;
51
52
// Minutes register
53
uint8_t
minute
: 4;
54
uint8_t
minute_10
: 3;
55
uint8_t : 1;
56
57
// Hours register
58
uint8_t
hour
: 4;
59
uint8_t
hour_10
: 2;
60
uint8_t : 2;
61
62
// Days register
63
uint8_t
day
: 4;
64
uint8_t
day_10
: 2;
65
uint8_t : 2;
66
67
// Weekdays register
68
uint8_t
weekday
: 3;
69
uint8_t
unused_3
: 5;
70
71
// Months register
72
uint8_t
month
: 4;
73
uint8_t
month_10
: 1;
74
uint8_t : 3;
75
76
// Years register
77
uint8_t
year
: 4;
78
uint8_t
year_10
: 4;
79
}
reg
;
80
mutable
uint8_t
raw
[
sizeof
(
reg
)];
81
}
pcf85063_
;
82
};
83
84
}
// namespace esphome::pcf85063
esphome::i2c::I2CDevice
This Class provides the methods to read/write bytes from/to an i2c device.
Definition
i2c.h:144
esphome::pcf85063::PCF85063Component
Definition
pcf85063.h:9
esphome::pcf85063::PCF85063Component::read_time
void read_time()
Definition
pcf85063.cpp:25
esphome::pcf85063::PCF85063Component::setup
void setup() override
Definition
pcf85063.cpp:11
esphome::pcf85063::PCF85063Component::update
void update() override
Definition
pcf85063.cpp:17
esphome::pcf85063::PCF85063Component::read_rtc_
bool read_rtc_()
Definition
pcf85063.cpp:75
esphome::pcf85063::PCF85063Component::write_time
void write_time()
Definition
pcf85063.cpp:51
esphome::pcf85063::PCF85063Component::write_rtc_
bool write_rtc_()
Definition
pcf85063.cpp:88
esphome::pcf85063::PCF85063Component::pcf85063_
union esphome::pcf85063::PCF85063Component::PCF85063Reg pcf85063_
esphome::pcf85063::PCF85063Component::dump_config
void dump_config() override
Definition
pcf85063.cpp:19
esphome::time::RealTimeClock
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
Definition
real_time_clock.h:21
component.h
i2c.h
esphome::pcf85063
Definition
pcf85063.cpp:7
real_time_clock.h
esphome::pcf85063::PCF85063Component::PCF85063Reg
Definition
pcf85063.h:20
esphome::pcf85063::PCF85063Component::PCF85063Reg::am_pm
bool am_pm
Definition
pcf85063.h:24
esphome::pcf85063::PCF85063Component::PCF85063Reg::nvram
uint8_t nvram
Definition
pcf85063.h:45
esphome::pcf85063::PCF85063Component::PCF85063Reg::hour
uint8_t hour
Definition
pcf85063.h:58
esphome::pcf85063::PCF85063Component::PCF85063Reg::day_10
uint8_t day_10
Definition
pcf85063.h:64
esphome::pcf85063::PCF85063Component::PCF85063Reg::cap_12pf
bool cap_12pf
Definition
pcf85063.h:23
esphome::pcf85063::PCF85063Component::PCF85063Reg::year_10
uint8_t year_10
Definition
pcf85063.h:78
esphome::pcf85063::PCF85063Component::PCF85063Reg::minute
uint8_t minute
Definition
pcf85063.h:53
esphome::pcf85063::PCF85063Component::PCF85063Reg::year
uint8_t year
Definition
pcf85063.h:77
esphome::pcf85063::PCF85063Component::PCF85063Reg::alarm_int
bool alarm_int
Definition
pcf85063.h:38
esphome::pcf85063::PCF85063Component::PCF85063Reg::month
uint8_t month
Definition
pcf85063.h:72
esphome::pcf85063::PCF85063Component::PCF85063Reg::clkout_control
uint8_t clkout_control
Definition
pcf85063.h:33
esphome::pcf85063::PCF85063Component::PCF85063Reg::month_10
uint8_t month_10
Definition
pcf85063.h:73
esphome::pcf85063::PCF85063Component::PCF85063Reg::alarm_flag
bool alarm_flag
Definition
pcf85063.h:37
esphome::pcf85063::PCF85063Component::PCF85063Reg::minute_int
bool minute_int
Definition
pcf85063.h:36
esphome::pcf85063::PCF85063Component::PCF85063Reg::weekday
uint8_t weekday
Definition
pcf85063.h:68
esphome::pcf85063::PCF85063Component::PCF85063Reg::second
uint8_t second
Definition
pcf85063.h:48
esphome::pcf85063::PCF85063Component::PCF85063Reg::halfminute_int
bool halfminute_int
Definition
pcf85063.h:35
esphome::pcf85063::PCF85063Component::PCF85063Reg::ext_test
bool ext_test
Definition
pcf85063.h:30
esphome::pcf85063::PCF85063Component::PCF85063Reg::timer_flag
bool timer_flag
Definition
pcf85063.h:34
esphome::pcf85063::PCF85063Component::PCF85063Reg::stop
bool stop
Definition
pcf85063.h:28
esphome::pcf85063::PCF85063Component::PCF85063Reg::correction_int_enable
bool correction_int_enable
Definition
pcf85063.h:25
esphome::pcf85063::PCF85063Component::PCF85063Reg::reg
struct esphome::pcf85063::PCF85063Component::PCF85063Reg::@152 reg
esphome::pcf85063::PCF85063Component::PCF85063Reg::soft_reset
bool soft_reset
Definition
pcf85063.h:27
esphome::pcf85063::PCF85063Component::PCF85063Reg::unused_3
uint8_t unused_3
Definition
pcf85063.h:69
esphome::pcf85063::PCF85063Component::PCF85063Reg::raw
uint8_t raw[sizeof(reg)]
Definition
pcf85063.h:80
esphome::pcf85063::PCF85063Component::PCF85063Reg::osc_stop
bool osc_stop
Definition
pcf85063.h:50
esphome::pcf85063::PCF85063Component::PCF85063Reg::day
uint8_t day
Definition
pcf85063.h:63
esphome::pcf85063::PCF85063Component::PCF85063Reg::hour_10
uint8_t hour_10
Definition
pcf85063.h:59
esphome::pcf85063::PCF85063Component::PCF85063Reg::coarse_mode
bool coarse_mode
Definition
pcf85063.h:42
esphome::pcf85063::PCF85063Component::PCF85063Reg::minute_10
uint8_t minute_10
Definition
pcf85063.h:54
esphome::pcf85063::PCF85063Component::PCF85063Reg::offset
uint8_t offset
Definition
pcf85063.h:41
esphome::pcf85063::PCF85063Component::PCF85063Reg::second_10
uint8_t second_10
Definition
pcf85063.h:49
Generated by
1.12.0