ESPHome  2024.11.1
x9c.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "esphome/core/hal.h"
6 
7 namespace esphome {
8 namespace x9c {
9 
10 class X9cOutput : public output::FloatOutput, public Component {
11  public:
12  void set_cs_pin(InternalGPIOPin *pin) { cs_pin_ = pin; }
13  void set_inc_pin(InternalGPIOPin *pin) { inc_pin_ = pin; }
14  void set_ud_pin(InternalGPIOPin *pin) { ud_pin_ = pin; }
15  void set_initial_value(float initial_value) { initial_value_ = initial_value; }
16  void set_step_delay(int step_delay) { step_delay_ = step_delay; }
17 
18  void setup() override;
19  void dump_config() override;
20 
21  void trim_value(int change_amount);
22 
23  protected:
24  void write_state(float state) override;
29  float pot_value_;
31 };
32 
33 } // namespace x9c
34 } // namespace esphome
InternalGPIOPin * ud_pin_
Definition: x9c.h:27
void set_inc_pin(InternalGPIOPin *pin)
Definition: x9c.h:13
float initial_value_
Definition: x9c.h:28
Base class for all output components that can output a variable level, like PWM.
Definition: float_output.h:31
void set_step_delay(int step_delay)
Definition: x9c.h:16
InternalGPIOPin * inc_pin_
Definition: x9c.h:26
void dump_config() override
Definition: x9c.cpp:66
void trim_value(int change_amount)
Definition: x9c.cpp:9
void setup() override
Definition: x9c.cpp:36
InternalGPIOPin * cs_pin_
Definition: x9c.h:25
void set_cs_pin(InternalGPIOPin *pin)
Definition: x9c.h:12
void set_initial_value(float initial_value)
Definition: x9c.h:15
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void set_ud_pin(InternalGPIOPin *pin)
Definition: x9c.h:14
void write_state(float state) override
Definition: x9c.cpp:61
bool state
Definition: fan.h:34