ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
lp5562_output.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4
7
8namespace esphome::lp5562 {
9
11class LP5562Output final : public Component, public i2c::I2CDevice {
12 public:
13 void setup() override;
14 void dump_config() override;
15 float get_setup_priority() const override { return setup_priority::HARDWARE; }
16
17 void set_logarithmic_dimming(bool logarithmic_dimming) { this->logarithmic_dimming_ = logarithmic_dimming; }
19 void set_channel_current(uint8_t channel, uint8_t current) { this->currents_[channel] = current; }
20 void write_channel(uint8_t channel, float state);
21
22 protected:
23 // 17.5 mA, the chip's reset value
24 std::array<uint8_t, 4> currents_{175, 175, 175, 175};
26};
27
28} // namespace esphome::lp5562
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
LP5562 4-channel (RGBW) I2C LED driver.
void set_logarithmic_dimming(bool logarithmic_dimming)
void write_channel(uint8_t channel, float state)
std::array< uint8_t, 4 > currents_
float get_setup_priority() const override
void set_channel_current(uint8_t channel, uint8_t current)
Current limit of a channel in steps of 0.1 mA, written to the chip in setup().
bool state
Definition fan.h:2
constexpr float HARDWARE
For components that deal with hardware and are very important like GPIO switch.
Definition component.h:43