SPI fixes for buggy components (#5446)

This commit is contained in:
Clyde Stubbs 2023-09-29 10:36:31 +10:00 committed by Jesse Hills
parent 9b75121337
commit ec4777b8d0
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A
4 changed files with 4 additions and 6 deletions

View File

@ -270,7 +270,7 @@ esphome/components/sn74hc165/* @jesserockz
esphome/components/socket/* @esphome/core
esphome/components/sonoff_d1/* @anatoly-savchenkov
esphome/components/speaker/* @jesserockz
esphome/components/spi/* @esphome/core
esphome/components/spi/* @clydebarrow @esphome/core
esphome/components/spi_device/* @clydebarrow
esphome/components/spi_led_strip/* @clydebarrow
esphome/components/sprinkler/* @kbx81

View File

@ -217,10 +217,7 @@ uint8_t MAX7219Component::printf(const char *format, ...) {
return 0;
}
void MAX7219Component::set_writer(max7219_writer_t &&writer) { this->writer_ = writer; }
void MAX7219Component::set_intensity(uint8_t intensity) {
this->intensity_ = intensity;
this->send_to_all_(MAX7219_REGISTER_INTENSITY, this->intensity_);
}
void MAX7219Component::set_intensity(uint8_t intensity) { this->intensity_ = intensity; }
void MAX7219Component::set_num_chips(uint8_t num_chips) { this->num_chips_ = num_chips; }
uint8_t MAX7219Component::strftime(uint8_t pos, const char *format, ESPTime time) {

View File

@ -28,7 +28,7 @@ from esphome.const import (
)
from esphome.core import coroutine_with_priority, CORE
CODEOWNERS = ["@esphome/core"]
CODEOWNERS = ["@esphome/core", "@clydebarrow"]
spi_ns = cg.esphome_ns.namespace("spi")
SPIComponent = spi_ns.class_("SPIComponent", cg.Component)
SPIDevice = spi_ns.class_("SPIDevice")

View File

@ -248,6 +248,7 @@ class SPIDelegateDummy : public SPIDelegate {
SPIDelegateDummy() = default;
uint8_t transfer(uint8_t data) override { return 0; }
void end_transaction() override{};
void begin_transaction() override;
};