12class HT16K33CharDisplay;
21 void setup()
override;
29#ifdef HT16K33_CHAR_SECONDARY_COUNT
32#ifdef USE_HT16K33_CHAR_GLYPH_OVERRIDES
42 uint8_t
print(uint8_t
pos,
const char *str);
43 uint8_t
print(
const char *str) {
return this->
print(0, str); }
48 return this->
strftime(0, format, time);
64#ifdef HT16K33_CHAR_SECONDARY_COUNT
71#ifdef HT16K33_CHAR_SECONDARY_COUNT
86 void send_(uint8_t command);
99#ifdef HT16K33_CHAR_SECONDARY_COUNT
102#ifdef USE_HT16K33_CHAR_GLYPH_OVERRIDES
This class simplifies creating components that periodically check a state.
Minimal static vector - saves memory by avoiding std::vector overhead.
void push_back(const T &value)
void add_secondary_display(uint8_t address)
void set_intensity(uint8_t intensity)
0 (dimmest) to 15, clamped
uint8_t printf(uint8_t pos, const char *format,...) __attribute__((format(printf
uint8_t display_setup_command_() const
void for_each_chip_(F &&f)
void send_(uint8_t command)
Send a command to every chip once set up, and report the result.
uint8_t uint8_t uint8_t strftime(uint8_t pos, const char *format, ESPTime time) __attribute__((format(strftime
uint8_t display_setup_
Display setup register: on bit and blink rate; bit 7 remembers standby, which the register does not u...
void dump_config() override
void clear()
For printing from automations; the lambda starts from an empty message.
bool write_frames_(uint8_t length)
Draw the first length bytes of the message; the chips it does not reach are cleared.
void display_power(bool power_status)
Turn the display on or off.
bool write_all_(uint8_t command)
uint8_t chip_count_() const
float get_setup_priority() const override
StaticVector< uint8_t, HT16K33_CHAR_SECONDARY_COUNT > secondary_addresses_
void set_writer(ht16k33_char_writer_t &&writer)
const uint32_t * glyph_overrides_
void set_glyph_overrides(const uint32_t *glyphs)
add_characters entries, each a word with the code point in the low half and the segments in the high ...
HT16K33CharDisplay(char *message, uint8_t capacity, uint8_t intensity)
message holds capacity bytes of UTF-8 text; intensity is 0 (dimmest) to 15
uint8_t chip_address_(uint8_t chip) const
uint8_t vprintf_(uint8_t pos, const char *format, va_list arg)
uint8_t system_setup_() const
void set_blink(uint8_t blink)
0 steady, 1 at 2 Hz, 2 at 1 Hz, 3 at 0.5 Hz; before setup only the value is kept
uint8_t find_segments_(uint32_t codepoint) const
void display_standby(bool standby)
Stop the oscillator, the lowest power state; before setup only the value is kept.
void blank()
Clear the display memory; the next update redraws the message.
uint8_t uint8_t uint8_t uint8_t uint8_t clock_display(uint8_t pos, bool show_leading_zero, bool use_ampm, ESPTime time)
HH:MM, or H:MM without the leading zero; 12-hour when use_ampm.
ht16k33_char_writer_t writer_
uint8_t print(const char *str)
This Class provides the methods to read/write bytes from/to an i2c device.
uint8_t address_
store the address of the device on the bus
const LogString * message
constexpr float PROCESSOR
For components that use data from sensors like displays.
uint16_t uint16_t & capacity
A more user-friendly version of struct tm from time.h.