mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Cleanup transmitter
This commit is contained in:
parent
e18a36e28e
commit
f18ff4b533
1 changed files with 2 additions and 2 deletions
|
@ -28,14 +28,14 @@ void RemoteTransmitterComponent::dump_config() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteTransmitterComponent::configure_rmt_() {
|
void RemoteTransmitterComponent::configure_rmt_() {
|
||||||
|
esp_err_t error;
|
||||||
rmt_tx_channel_config_t config{};
|
rmt_tx_channel_config_t config{};
|
||||||
config.clk_src = RMT_CLK_SRC_DEFAULT;
|
config.clk_src = RMT_CLK_SRC_DEFAULT;
|
||||||
config.resolution_hz = 1 * 1000 * 1000;
|
config.resolution_hz = 1 * 1000 * 1000;
|
||||||
config.gpio_num = gpio_num_t(this->pin_->get_pin());
|
config.gpio_num = gpio_num_t(this->pin_->get_pin());
|
||||||
config.mem_block_symbols = 64 * this->mem_block_num_;
|
config.mem_block_symbols = 64 * this->mem_block_num_;
|
||||||
config.trans_queue_depth = 1;
|
config.trans_queue_depth = 1;
|
||||||
|
error = rmt_new_tx_channel(&config, &this->channel_);
|
||||||
esp_err_t error = rmt_new_tx_channel(&config, &this->channel_);
|
|
||||||
if (error != ESP_OK) {
|
if (error != ESP_OK) {
|
||||||
this->error_code_ = error;
|
this->error_code_ = error;
|
||||||
this->error_string_ = "in rmt_new_tx_channel";
|
this->error_string_ = "in rmt_new_tx_channel";
|
||||||
|
|
Loading…
Reference in a new issue