ESPHome 2026.11.0b6
Loading...
Searching...
No Matches
tlc59208f_output.h
Go to the documentation of this file.
1#pragma once
2
5
6namespace esphome::tlc59208f {
7
8// 0*: Group dimming, 1: Group blinking
9inline constexpr uint8_t TLC59208F_MODE2_DMBLNK = (1 << 5);
10// 0*: Output change on Stop command, 1: Output change on ACK
11inline constexpr uint8_t TLC59208F_MODE2_OCH = (1 << 3);
12// 0*: WDT disabled, 1: WDT enabled
13inline constexpr uint8_t TLC59208F_MODE2_WDTEN = (1 << 2);
14// WDT timeouts
15inline constexpr uint8_t TLC59208F_MODE2_WDT_5MS = (0 << 0);
16inline constexpr uint8_t TLC59208F_MODE2_WDT_15MS = (1 << 0);
17inline constexpr uint8_t TLC59208F_MODE2_WDT_25MS = (2 << 0);
18inline constexpr uint8_t TLC59208F_MODE2_WDT_35MS = (3 << 0);
19
21class TLC59208FOutput final : public Component, public i2c::I2CDevice {
22 public:
24
25 void register_channel(uint8_t channel);
26 void write_channel(uint8_t channel, float state);
27
28 void setup() override;
29 void dump_config() override;
30 float get_setup_priority() const override { return setup_priority::HARDWARE; }
31 void loop() override;
32
33 protected:
34 uint8_t mode_;
35
36 uint8_t min_channel_{0xFF};
37 uint8_t max_channel_{0x00};
38 uint8_t pwm_amounts_[256] = {
39 0,
40 };
41 bool update_{true};
42};
43
44} // namespace esphome::tlc59208f
BedjetMode mode
BedJet operating mode.
This Class provides the methods to read/write bytes from/to an i2c device.
Definition i2c.h:144
TLC59208F float output component.
float get_setup_priority() const override
void write_channel(uint8_t channel, float state)
TLC59208FOutput(uint8_t mode=TLC59208F_MODE2_OCH)
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
constexpr uint8_t TLC59208F_MODE2_WDT_35MS
constexpr uint8_t TLC59208F_MODE2_OCH
constexpr uint8_t TLC59208F_MODE2_DMBLNK
constexpr uint8_t TLC59208F_MODE2_WDTEN
constexpr uint8_t TLC59208F_MODE2_WDT_5MS
constexpr uint8_t TLC59208F_MODE2_WDT_25MS
constexpr uint8_t TLC59208F_MODE2_WDT_15MS