7 static const char *
const TAG =
"sn74hc595";
10 ESP_LOGCONFIG(TAG,
"Setting up SN74HC595...");
27 this->clock_pin_->setup();
28 this->data_pin_->setup();
29 this->clock_pin_->digital_write(
false);
30 this->data_pin_->digital_write(
false);
46 ESP_LOGE(TAG,
"Pin %u is out of range! Maximum pin number with %u chips in series is %u", pin, this->
sr_count_,
60 for (int8_t i = 7; i >= 0; i--) {
61 bool bit = (*byte >> i) & 1;
62 this->data_pin_->digital_write(bit);
63 this->clock_pin_->digital_write(
true);
64 this->clock_pin_->digital_write(
false);
74 this->transfer_byte(*byte);
95 this->parent_->digital_write_(this->pin_, value != this->inverted_);
virtual void digital_write(bool value)=0
virtual void write_gpio()
std::vector< uint8_t > output_bytes_
float get_setup_priority() const override
void write_gpio() override
void dump_config() override
std::string dump_summary() const override
void digital_write(bool value) override
const float IO
For components that represent GPIO pins like PCF8573.
void write_gpio() override
Implementation of SPI Controller mode.
std::string str_snprintf(const char *fmt, size_t len,...)
void digital_write_(uint16_t pin, bool value)