mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-11 21:10:20 +00:00
feat(parlio_tx): support loop transmission
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -48,6 +48,11 @@ typedef enum {
|
||||
PARLIO_LL_RX_EOF_COND_EN_INACTIVE, /*!< RX unit generates EOF event when the external enable signal becomes inactive */
|
||||
} parlio_ll_rx_eof_cond_t;
|
||||
|
||||
typedef enum {
|
||||
PARLIO_LL_TX_EOF_COND_DATA_LEN, /*!< TX unit generates EOF event when it transmits particular data bit length that specified in `tx_bitlen`. */
|
||||
PARLIO_LL_TX_EOF_COND_DMA_EOF, /*!< TX unit generates EOF event when the DMA EOF takes place */
|
||||
} parlio_ll_tx_eof_cond_t;
|
||||
|
||||
/**
|
||||
* @brief Enable or disable the parlio peripheral APB clock
|
||||
*
|
||||
@@ -475,6 +480,29 @@ static inline void parlio_ll_tx_set_trans_bit_len(parl_io_dev_t *dev, uint32_t b
|
||||
dev->tx_data_cfg.tx_bitlen = bitlen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if tx size can be determined by DMA
|
||||
*
|
||||
* @param dev Parallel IO register base address (not used)
|
||||
*/
|
||||
static inline bool parlio_ll_tx_support_dma_eof(parl_io_dev_t *dev)
|
||||
{
|
||||
(void)dev;
|
||||
return ESP_CHIP_REV_ABOVE(efuse_hal_chip_revision(), 102);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the condition to generate the TX EOF event
|
||||
*
|
||||
* @param dev Parallel IO register base address
|
||||
* @param cond TX EOF condition
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void parlio_ll_tx_set_eof_condition(parl_io_dev_t *dev, parlio_ll_tx_eof_cond_t cond)
|
||||
{
|
||||
dev->tx_genrl_cfg.tx_eof_gen_sel = cond;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Whether to enable the TX clock gating
|
||||
*
|
||||
|
Reference in New Issue
Block a user