ESPHome  2024.12.2
sm2335.cpp
Go to the documentation of this file.
1 #include "sm2335.h"
2 #include "esphome/core/log.h"
3 
4 namespace esphome {
5 namespace sm2335 {
6 
7 static const char *const TAG = "sm2335";
8 
9 void SM2335::setup() {
10  ESP_LOGCONFIG(TAG, "Setting up sm2335 Output Component...");
11  this->data_pin_->setup();
12  this->data_pin_->digital_write(true);
13  this->clock_pin_->setup();
14  this->clock_pin_->digital_write(true);
15  this->pwm_amounts_.resize(5, 0);
16 }
17 
19  ESP_LOGCONFIG(TAG, "sm2335:");
20  LOG_PIN(" Data Pin: ", this->data_pin_);
21  LOG_PIN(" Clock Pin: ", this->clock_pin_);
22  ESP_LOGCONFIG(TAG, " Color Channels Max Power: %u", this->max_power_color_channels_);
23  ESP_LOGCONFIG(TAG, " White Channels Max Power: %u", this->max_power_white_channels_);
24 }
25 
26 } // namespace sm2335
27 } // namespace esphome
virtual void digital_write(bool value)=0
std::vector< uint16_t > pwm_amounts_
Definition: sm10bit_base.h:58
virtual void setup()=0
void setup() override
Definition: sm2335.cpp:9
void dump_config() override
Definition: sm2335.cpp:18
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7