ESPHome 2026.6.0-dev
Loading...
Searching...
No Matches
x9c.h
Go to the documentation of this file.
1#pragma once
2
4#include "esphome/core/hal.h"
6
7namespace esphome::x9c {
8
9class X9cOutput : public output::FloatOutput, public Component {
10 public:
11 void set_cs_pin(InternalGPIOPin *pin) { cs_pin_ = pin; }
12 void set_inc_pin(InternalGPIOPin *pin) { inc_pin_ = pin; }
13 void set_ud_pin(InternalGPIOPin *pin) { ud_pin_ = pin; }
14 void set_initial_value(float initial_value) { initial_value_ = initial_value; }
15 void set_step_delay(int step_delay) { step_delay_ = step_delay; }
16
17 void setup() override;
18 void dump_config() override;
19
20 void trim_value(int32_t change_amount);
21
22 protected:
23 void write_state(float state) override;
27 float initial_value_{0.0f};
28 float pot_value_{0.0f};
30};
31
32} // namespace esphome::x9c
Base class for all output components that can output a variable level, like PWM.
void setup() override
Definition x9c.cpp:35
InternalGPIOPin * inc_pin_
Definition x9c.h:25
void set_initial_value(float initial_value)
Definition x9c.h:14
void set_step_delay(int step_delay)
Definition x9c.h:15
void trim_value(int32_t change_amount)
Definition x9c.cpp:8
void set_inc_pin(InternalGPIOPin *pin)
Definition x9c.h:12
void set_ud_pin(InternalGPIOPin *pin)
Definition x9c.h:13
InternalGPIOPin * ud_pin_
Definition x9c.h:26
void dump_config() override
Definition x9c.cpp:63
InternalGPIOPin * cs_pin_
Definition x9c.h:24
void write_state(float state) override
Definition x9c.cpp:58
void set_cs_pin(InternalGPIOPin *pin)
Definition x9c.h:11
bool state
Definition fan.h:2