mirror of
https://github.com/esphome/esphome.git
synced 2024-12-18 15:57:58 +01:00
Fixed wrong setup of tc9548a (#2766)
This commit is contained in:
parent
07b882c801
commit
710096b1c6
@ -22,7 +22,7 @@ i2c::ErrorCode TCA9548AChannel::writev(uint8_t address, i2c::WriteBuffer *buffer
|
|||||||
void TCA9548AComponent::setup() {
|
void TCA9548AComponent::setup() {
|
||||||
ESP_LOGCONFIG(TAG, "Setting up TCA9548A...");
|
ESP_LOGCONFIG(TAG, "Setting up TCA9548A...");
|
||||||
uint8_t status = 0;
|
uint8_t status = 0;
|
||||||
if (this->read_register(0x00, &status, 1) != i2c::ERROR_OK) {
|
if (this->read(&status, 1) != i2c::ERROR_OK) {
|
||||||
ESP_LOGI(TAG, "TCA9548A failed");
|
ESP_LOGI(TAG, "TCA9548A failed");
|
||||||
this->mark_failed();
|
this->mark_failed();
|
||||||
return;
|
return;
|
||||||
|
@ -24,6 +24,7 @@ class TCA9548AComponent : public Component, public i2c::I2CDevice {
|
|||||||
public:
|
public:
|
||||||
void setup() override;
|
void setup() override;
|
||||||
void dump_config() override;
|
void dump_config() override;
|
||||||
|
float get_setup_priority() const override { return setup_priority::IO; }
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
i2c::ErrorCode switch_to_channel(uint8_t channel);
|
i2c::ErrorCode switch_to_channel(uint8_t channel);
|
||||||
|
Loading…
Reference in New Issue
Block a user