ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esphome::time::BcdCalendarLayout Struct Reference

Layout of a 7-byte BCD calendar: second, minute, hour, weekday and day of the month in either order, month and year since 2000. More...

#include <real_time_clock.h>

Public Member Functions

constexpr size_t weekday_index () const
 
constexpr size_t day_index () const
 

Data Fields

BcdWeekday weekday
 
bool weekday_before_day {true}
 
bool century_bit {false}
 Bit 7 of the month byte is set from the year 2100 on. Chips without the bit read it as 0.
 
bool hour_12h {false}
 Bit 6 of the hour byte selects 12-hour mode, with PM in bit 5; decoded only, encoding writes 24-hour mode.
 

Detailed Description

Layout of a 7-byte BCD calendar: second, minute, hour, weekday and day of the month in either order, month and year since 2000.

Definition at line 56 of file real_time_clock.h.

Member Function Documentation

◆ day_index()

size_t esphome::time::BcdCalendarLayout::day_index ( ) const
inlineconstexpr

Definition at line 65 of file real_time_clock.h.

◆ weekday_index()

size_t esphome::time::BcdCalendarLayout::weekday_index ( ) const
inlineconstexpr

Definition at line 64 of file real_time_clock.h.

Field Documentation

◆ century_bit

bool esphome::time::BcdCalendarLayout::century_bit {false}

Bit 7 of the month byte is set from the year 2100 on. Chips without the bit read it as 0.

Definition at line 60 of file real_time_clock.h.

◆ hour_12h

bool esphome::time::BcdCalendarLayout::hour_12h {false}

Bit 6 of the hour byte selects 12-hour mode, with PM in bit 5; decoded only, encoding writes 24-hour mode.

Definition at line 62 of file real_time_clock.h.

◆ weekday

BcdWeekday esphome::time::BcdCalendarLayout::weekday

Definition at line 57 of file real_time_clock.h.

◆ weekday_before_day

bool esphome::time::BcdCalendarLayout::weekday_before_day {true}

Definition at line 58 of file real_time_clock.h.


The documentation for this struct was generated from the following file: