8 static const char *
const TAG =
"sx1509_float_channel";
11 const uint16_t max_duty = 255;
12 const float duty_rounded = roundf(state * max_duty);
13 auto duty =
static_cast<uint16_t
>(duty_rounded);
18 ESP_LOGD(TAG,
"setup pin %d", this->
pin_);
25 ESP_LOGCONFIG(TAG,
"SX1509 PWM:");
26 ESP_LOGCONFIG(TAG,
" sx1509 pin: %d", this->
pin_);
27 LOG_FLOAT_OUTPUT(
this);
SX1509Component * parent_
virtual void turn_off()
Disable this binary output.
void set_pin_value(uint8_t pin, uint8_t i_on)
void pin_mode(uint8_t pin, gpio::Flags flags)
void dump_config() override
void setup_led_driver(uint8_t pin)
Implementation of SPI Controller mode.
void write_state(float state) override