mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
change(parlio_tx): use shift edge instead sample edge
Made-with: Cursor
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -516,16 +516,15 @@ static inline void parlio_ll_tx_treat_msb_as_valid(parl_io_dev_t *dev, bool en)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the sample clock edge
|
||||
* @brief Set the shift clock edge
|
||||
*
|
||||
* @param dev Parallel IO register base address
|
||||
* @param edge Sample clock edge
|
||||
* @param edge Shift clock edge
|
||||
*/
|
||||
static inline void parlio_ll_tx_set_sample_clock_edge(parl_io_dev_t *dev, parlio_sample_edge_t edge)
|
||||
static inline void parlio_ll_tx_set_shift_clock_edge(parl_io_dev_t *dev, parlio_shift_edge_t edge)
|
||||
{
|
||||
bool invert = edge == PARLIO_SAMPLE_EDGE_NEG;
|
||||
dev->tx_clk_cfg.tx_clk_i_inv = invert;
|
||||
dev->tx_clk_cfg.tx_clk_o_inv = invert;
|
||||
dev->tx_clk_cfg.tx_clk_i_inv = edge;
|
||||
dev->tx_clk_cfg.tx_clk_o_inv = edge;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -492,12 +492,12 @@ static inline void parlio_ll_tx_treat_msb_as_valid(parl_io_dev_t *dev, bool en)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the sample clock edge
|
||||
* @brief Set the shift clock edge
|
||||
*
|
||||
* @param dev Parallel IO register base address
|
||||
* @param edge Sample clock edge
|
||||
* @param edge Shift clock edge
|
||||
*/
|
||||
static inline void parlio_ll_tx_set_sample_clock_edge(parl_io_dev_t *dev, parlio_sample_edge_t edge)
|
||||
static inline void parlio_ll_tx_set_shift_clock_edge(parl_io_dev_t *dev, parlio_shift_edge_t edge)
|
||||
{
|
||||
dev->tx_cfg0.tx_smp_edge_sel = edge;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -500,16 +500,15 @@ static inline void parlio_ll_tx_treat_msb_as_valid(parl_io_dev_t *dev, bool en)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the sample clock edge
|
||||
* @brief Set the shift clock edge
|
||||
*
|
||||
* @param dev Parallel IO register base address
|
||||
* @param edge Sample clock edge
|
||||
* @param edge Shift clock edge
|
||||
*/
|
||||
static inline void parlio_ll_tx_set_sample_clock_edge(parl_io_dev_t *dev, parlio_sample_edge_t edge)
|
||||
static inline void parlio_ll_tx_set_shift_clock_edge(parl_io_dev_t *dev, parlio_shift_edge_t edge)
|
||||
{
|
||||
bool invert = edge == PARLIO_SAMPLE_EDGE_NEG;
|
||||
dev->tx_clk_cfg.tx_clk_i_inv = invert;
|
||||
dev->tx_clk_cfg.tx_clk_o_inv = invert;
|
||||
dev->tx_clk_cfg.tx_clk_i_inv = edge;
|
||||
dev->tx_clk_cfg.tx_clk_o_inv = edge;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -565,16 +565,15 @@ static inline void parlio_ll_tx_treat_msb_as_valid(parl_io_dev_t *dev, bool en)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the sample clock edge
|
||||
* @brief Set the shift clock edge
|
||||
*
|
||||
* @param dev Parallel IO register base address
|
||||
* @param edge Sample clock edge
|
||||
* @param edge Shift clock edge
|
||||
*/
|
||||
static inline void parlio_ll_tx_set_sample_clock_edge(parl_io_dev_t *dev, parlio_sample_edge_t edge)
|
||||
static inline void parlio_ll_tx_set_shift_clock_edge(parl_io_dev_t *dev, parlio_shift_edge_t edge)
|
||||
{
|
||||
bool invert = edge == PARLIO_SAMPLE_EDGE_NEG;
|
||||
dev->tx_clk_cfg.tx_clk_i_inv = invert;
|
||||
dev->tx_clk_cfg.tx_clk_o_inv = invert;
|
||||
dev->tx_clk_cfg.tx_clk_i_inv = edge;
|
||||
dev->tx_clk_cfg.tx_clk_o_inv = edge;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -16,13 +16,21 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Parallel IO sample edge
|
||||
* @brief Parallel IO Rx sample edge
|
||||
*/
|
||||
typedef enum {
|
||||
PARLIO_SAMPLE_EDGE_NEG, /*!< Sample data on falling edge of clock */
|
||||
PARLIO_SAMPLE_EDGE_POS, /*!< Sample data on rising edge of clock */
|
||||
} parlio_sample_edge_t;
|
||||
|
||||
/**
|
||||
* @brief Parallel IO Tx shift edge
|
||||
*/
|
||||
typedef enum {
|
||||
PARLIO_SHIFT_EDGE_POS, /*!< Shift data on rising edge of clock */
|
||||
PARLIO_SHIFT_EDGE_NEG, /*!< Shift data on falling edge of clock */
|
||||
} parlio_shift_edge_t;
|
||||
|
||||
/**
|
||||
* @brief Parallel IO bit packing order
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user