mirror of
https://github.com/esphome/esphome.git
synced 2025-02-25 20:42:25 +01:00
formatting
This commit is contained in:
parent
70ff6afb2e
commit
90c6eefc96
5 changed files with 17 additions and 20 deletions
|
@ -12,9 +12,7 @@ class BinaryOutput : public output::BinaryOutput, public Component, public Paren
|
||||||
void set_pin(uint8_t pin) { this->pin_ = pin - 1; }
|
void set_pin(uint8_t pin) { this->pin_ = pin - 1; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void write_state(bool state) override {
|
void write_state(bool state) override { this->parent_->set_output_gpio(this->pin_, state); }
|
||||||
this->parent_->set_output_gpio(this->pin_, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t pin_{0};
|
uint8_t pin_{0};
|
||||||
};
|
};
|
||||||
|
|
|
@ -56,7 +56,6 @@ class DigitalChannelsSelect : public select::Select, public Parented<Si4713Compo
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class DigitalClockEdgeSelect : public select::Select, public Parented<Si4713Component> {
|
class DigitalClockEdgeSelect : public select::Select, public Parented<Si4713Component> {
|
||||||
protected:
|
protected:
|
||||||
void control(const std::string &value) override {
|
void control(const std::string &value) override {
|
||||||
|
|
|
@ -46,8 +46,8 @@ bool Si4713Component::send_cmd(const void *cmd, size_t cmd_size, void *res, size
|
||||||
}
|
}
|
||||||
|
|
||||||
ResBase status;
|
ResBase status;
|
||||||
while(status.CTS == 0) {
|
while (status.CTS == 0) {
|
||||||
err = this->read((uint8_t*) &status, 1); // TODO: read res_size into res here?
|
err = this->read((uint8_t *) &status, 1); // TODO: read res_size into res here?
|
||||||
if (err != i2c::ERROR_OK) {
|
if (err != i2c::ERROR_OK) {
|
||||||
ESP_LOGE(TAG, "send_cmd(0x%02X, %d) read status error", buff[0], cmd_size);
|
ESP_LOGE(TAG, "send_cmd(0x%02X, %d) read status error", buff[0], cmd_size);
|
||||||
// this->mark_failed();
|
// this->mark_failed();
|
||||||
|
|
|
@ -3,7 +3,7 @@ i2c:
|
||||||
scl: 9
|
scl: 9
|
||||||
scan: True
|
scan: True
|
||||||
|
|
||||||
si4713:
|
si4713_i2c:
|
||||||
id: fm_transmitter
|
id: fm_transmitter
|
||||||
reset_pin: 10
|
reset_pin: 10
|
||||||
op_mode: Analog
|
op_mode: Analog
|
||||||
|
@ -77,7 +77,7 @@ si4713:
|
||||||
name: Input Audio Level
|
name: Input Audio Level
|
||||||
|
|
||||||
number:
|
number:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
tuner:
|
tuner:
|
||||||
frequency:
|
frequency:
|
||||||
id: si4713_frequency
|
id: si4713_frequency
|
||||||
|
@ -126,7 +126,7 @@ number:
|
||||||
name: RDS Deviation
|
name: RDS Deviation
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
mute:
|
mute:
|
||||||
name: Mute
|
name: Mute
|
||||||
mono:
|
mono:
|
||||||
|
@ -162,7 +162,7 @@ switch:
|
||||||
name: GPIO3 Switch
|
name: GPIO3 Switch
|
||||||
|
|
||||||
select:
|
select:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
pre_emphasis:
|
pre_emphasis:
|
||||||
name: Pre-Emphasis
|
name: Pre-Emphasis
|
||||||
analog:
|
analog:
|
||||||
|
@ -189,7 +189,7 @@ select:
|
||||||
name: Dynamic Range Control Preset
|
name: Dynamic Range Control Preset
|
||||||
|
|
||||||
text:
|
text:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
rds:
|
rds:
|
||||||
station:
|
station:
|
||||||
name: RDS Station
|
name: RDS Station
|
||||||
|
@ -197,9 +197,9 @@ text:
|
||||||
name: RDS Text
|
name: RDS Text
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
id: "GPIO1"
|
id: "GPIO1"
|
||||||
pin: 1
|
pin: 1
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
id: "GPIO2"
|
id: "GPIO2"
|
||||||
pin: 2
|
pin: 2
|
||||||
|
|
|
@ -3,7 +3,7 @@ i2c:
|
||||||
scl: 9
|
scl: 9
|
||||||
scan: True
|
scan: True
|
||||||
|
|
||||||
si4713:
|
si4713_i2c:
|
||||||
id: fm_transmitter
|
id: fm_transmitter
|
||||||
reset_pin: 10
|
reset_pin: 10
|
||||||
op_mode: Analog
|
op_mode: Analog
|
||||||
|
@ -77,7 +77,7 @@ si4713:
|
||||||
name: Input Audio Level
|
name: Input Audio Level
|
||||||
|
|
||||||
number:
|
number:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
tuner:
|
tuner:
|
||||||
frequency:
|
frequency:
|
||||||
id: si4713_frequency
|
id: si4713_frequency
|
||||||
|
@ -126,7 +126,7 @@ number:
|
||||||
name: RDS Deviation
|
name: RDS Deviation
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
mute:
|
mute:
|
||||||
name: Mute
|
name: Mute
|
||||||
mono:
|
mono:
|
||||||
|
@ -162,7 +162,7 @@ switch:
|
||||||
name: GPIO3 Switch
|
name: GPIO3 Switch
|
||||||
|
|
||||||
select:
|
select:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
pre_emphasis:
|
pre_emphasis:
|
||||||
name: Pre-Emphasis
|
name: Pre-Emphasis
|
||||||
analog:
|
analog:
|
||||||
|
@ -189,7 +189,7 @@ select:
|
||||||
name: Dynamic Range Control Preset
|
name: Dynamic Range Control Preset
|
||||||
|
|
||||||
text:
|
text:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
rds:
|
rds:
|
||||||
station:
|
station:
|
||||||
name: RDS Station
|
name: RDS Station
|
||||||
|
@ -197,9 +197,9 @@ text:
|
||||||
name: RDS Text
|
name: RDS Text
|
||||||
|
|
||||||
output:
|
output:
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
id: "GPIO1"
|
id: "GPIO1"
|
||||||
pin: 1
|
pin: 1
|
||||||
- platform: si4713
|
- platform: si4713_i2c
|
||||||
id: "GPIO2"
|
id: "GPIO2"
|
||||||
pin: 2
|
pin: 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue