ESPHome  2024.11.0
max6956_led_output.cpp
Go to the documentation of this file.
1 #include "max6956_led_output.h"
2 #include "esphome/core/helpers.h"
3 #include "esphome/core/log.h"
4 
5 namespace esphome {
6 namespace max6956 {
7 
8 static const char *const TAG = "max6956_led_channel";
9 
11 
12 void MAX6956LedChannel::write_state(bool state) { this->parent_->digital_write(this->pin_, state); }
13 
15  this->parent_->pin_mode(this->pin_, max6956::FLAG_LED);
16  this->turn_off();
17 }
18 
20  ESP_LOGCONFIG(TAG, "MAX6956 current:");
21  ESP_LOGCONFIG(TAG, " MAX6956 pin: %d", this->pin_);
22  LOG_FLOAT_OUTPUT(this);
23 }
24 
25 } // namespace max6956
26 } // namespace esphome
virtual void turn_off()
Disable this binary output.
Definition: binary_output.h:51
void pin_mode(uint8_t pin, gpio::Flags flags)
Definition: max6956.cpp:56
void digital_write(uint8_t pin, bool value)
Definition: max6956.cpp:51
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
void set_pin_brightness(uint8_t pin, float brightness)
Definition: max6956.cpp:114
bool state
Definition: fan.h:34
void write_state(float state) override