mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-05 21:54:33 +02:00
rmt: fix wrong macro of independent channel clock
This commit is contained in:
@@ -114,7 +114,7 @@ static rmt_contex_t rmt_contex = {
|
||||
|
||||
static rmt_obj_t *p_rmt_obj[RMT_CHANNEL_MAX] = {0};
|
||||
|
||||
#if SOC_RMT_SOURCE_CLK_INDEPENDENT
|
||||
#if SOC_RMT_CHANNEL_CLK_INDEPENDENT
|
||||
static uint32_t s_rmt_source_clock_hz[RMT_CHANNEL_MAX];
|
||||
#else
|
||||
static uint32_t s_rmt_source_clock_hz;
|
||||
@@ -597,7 +597,7 @@ static esp_err_t rmt_internal_config(rmt_dev_t *dev, const rmt_config_t *rmt_par
|
||||
}
|
||||
RMT_EXIT_CRITICAL();
|
||||
|
||||
#if SOC_RMT_SOURCE_CLK_INDEPENDENT
|
||||
#if SOC_RMT_CHANNEL_CLK_INDEPENDENT
|
||||
s_rmt_source_clock_hz[channel] = rmt_source_clk_hz;
|
||||
#else
|
||||
if (s_rmt_source_clock_hz && rmt_source_clk_hz != s_rmt_source_clock_hz) {
|
||||
@@ -1316,7 +1316,7 @@ esp_err_t rmt_get_counter_clock(rmt_channel_t channel, uint32_t *clock_hz)
|
||||
RMT_CHECK(clock_hz, "parameter clock_hz can't be null", ESP_ERR_INVALID_ARG);
|
||||
RMT_ENTER_CRITICAL();
|
||||
uint32_t rmt_source_clk_hz = 0;
|
||||
#if SOC_RMT_SOURCE_CLK_INDEPENDENT
|
||||
#if SOC_RMT_CHANNEL_CLK_INDEPENDENT
|
||||
rmt_source_clk_hz = s_rmt_source_clock_hz[channel];
|
||||
#else
|
||||
rmt_source_clk_hz = s_rmt_source_clock_hz;
|
||||
@@ -1355,6 +1355,7 @@ esp_err_t rmt_remove_channel_from_group(rmt_channel_t channel)
|
||||
RMT_EXIT_CRITICAL();
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
esp_err_t rmt_memory_rw_rst(rmt_channel_t channel)
|
||||
{
|
||||
@@ -1368,7 +1369,6 @@ esp_err_t rmt_memory_rw_rst(rmt_channel_t channel)
|
||||
RMT_EXIT_CRITICAL();
|
||||
return ESP_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOC_RMT_SUPPORT_TX_LOOP_COUNT
|
||||
esp_err_t rmt_set_tx_loop_count(rmt_channel_t channel, uint32_t count)
|
||||
|
@@ -1,30 +0,0 @@
|
||||
// Copyright 2019-2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define SOC_RMT_CHANNEL_MEM_WORDS (64) /*!< Each channel owns 64 words memory (1 word = 4 Bytes) */
|
||||
#define SOC_RMT_CHANNELS_NUM (4) /*!< Total 4 channels */
|
||||
#define SOC_RMT_SUPPORT_RX_PINGPONG (1) /*!< Support Ping-Pong mode on RX path */
|
||||
#define SOC_RMT_SUPPORT_RX_DEMODULATION (1) /*!< Support signal demodulation on RX path (i.e. remove carrier) */
|
||||
#define SOC_RMT_SUPPORT_TX_LOOP_COUNT (1) /*!< Support transmit specified number of cycles in loop mode */
|
||||
#define SOC_RMT_SUPPORT_TX_GROUP (1) /*!< Support a group of TX channels to transmit simultaneously */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user