mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(gdma): add burst size validation check during config
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -55,6 +55,8 @@ typedef struct {
|
||||
// Supported interrupt events can vary across DMA instances (e.g. AHB vs AXI)
|
||||
uint32_t tx_event_mask;
|
||||
uint32_t rx_event_mask;
|
||||
// Bitmap of supported configurable data burst sizes, using gdma_burst_size_support_t
|
||||
uint32_t supported_burst_size_mask;
|
||||
} gdma_hal_priv_data_t;
|
||||
|
||||
/**
|
||||
@@ -128,6 +130,8 @@ void gdma_hal_enable_burst(gdma_hal_context_t *hal, int chan_id, gdma_channel_di
|
||||
|
||||
void gdma_hal_set_burst_size(gdma_hal_context_t *hal, int chan_id, gdma_channel_direction_t dir, uint32_t burst_sz);
|
||||
|
||||
bool gdma_hal_check_burst_size(gdma_hal_context_t *hal, uint32_t burst_sz);
|
||||
|
||||
void gdma_hal_set_strategy(gdma_hal_context_t *hal, int chan_id, gdma_channel_direction_t dir, bool en_owner_check, bool en_desc_write_back, bool eof_till_popped);
|
||||
|
||||
void gdma_hal_enable_intr(gdma_hal_context_t *hal, int chan_id, gdma_channel_direction_t dir, uint32_t intr_event_mask, bool en_or_dis);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -22,6 +22,18 @@ typedef enum {
|
||||
GDMA_CHANNEL_DIRECTION_RX, /*!< GDMA channel direction: RX */
|
||||
} gdma_channel_direction_t;
|
||||
|
||||
/**
|
||||
* @brief Bit definitions used by the LL layer to describe supported data burst sizes
|
||||
*/
|
||||
typedef enum {
|
||||
GDMA_BURST_SIZE_SUPPORT_4 = 1U << 2,
|
||||
GDMA_BURST_SIZE_SUPPORT_8 = 1U << 3,
|
||||
GDMA_BURST_SIZE_SUPPORT_16 = 1U << 4,
|
||||
GDMA_BURST_SIZE_SUPPORT_32 = 1U << 5,
|
||||
GDMA_BURST_SIZE_SUPPORT_64 = 1U << 6,
|
||||
GDMA_BURST_SIZE_SUPPORT_128 = 1U << 7,
|
||||
} gdma_burst_size_support_t;
|
||||
|
||||
/**
|
||||
* @brief GDMA channel events that supported by the ETM module
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user