Files
esp-idf/components/esp_driver_isp/include/driver/isp_dma.h
morris 3af71b792e refactor(isp): read DMA input directly from flash
Avoid the PSRAM copy for unencrypted flash
2026-07-21 10:46:04 +08:00

41 lines
1.3 KiB
C

/*
* SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <stddef.h>
#include "esp_err.h"
#include "driver/isp_types.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Process one ISP DMA frame: feed the input buffer through the ISP and wait for completion
*
* @note The driver synchronizes cacheable buffers before and after DMA access. Input buffers use
* an unaligned cache write-back, while cacheable output buffers and their derived frame
* sizes must be aligned to the cache line size.
* @note This function blocks until both input and output DMA channels finish. On timeout,
* the output buffer may still be owned by DMA and must not be accessed.
*
* @param[in] proc Processor handle
* @param[in] output_buffer Destination buffer for ISP output
* @param[in] input_buffer Source input buffer for RAW frame data
* @param[in] timeout_ms Timeout in milliseconds for waiting transfer completion
*
* @return
* - ESP_OK On success
* - ESP_ERR_INVALID_ARG Invalid argument
* - ESP_ERR_TIMEOUT Wait timeout
*/
esp_err_t esp_isp_dma_process_frame(isp_proc_handle_t proc, void *output_buffer, const void *input_buffer, uint32_t timeout_ms);
#ifdef __cplusplus
}
#endif