1 /* 2 * SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include "soc/lldesc.h" 10 #include "soc/soc_caps.h" 11 #include "esp_err.h" 12 13 #ifdef __cplusplus 14 extern "C" { 15 #endif 16 17 /** 18 * @brief Start the DMA engine 19 * 20 * @param input AES input descriptor (outlink) 21 * @param output AES output descriptor (inlink) 22 * @return 23 * - ESP_OK: Successfully started the DMA 24 * - ESP_ERR_INVALID_STATE: No DMA channel available 25 */ 26 esp_err_t esp_aes_dma_start(const lldesc_t *input, const lldesc_t *output); 27 28 /** 29 * @brief Check if the DMA engine is finished reading the result 30 * 31 * @param output AES output descriptor (inlink) 32 * @return 33 * - true: DMA finished 34 * - false: DMA not yet finished 35 */ 36 bool esp_aes_dma_done(const lldesc_t *output); 37 38 /** 39 * @brief Allocate AES peripheral interrupt handler 40 */ 41 void esp_aes_intr_alloc(void); 42 43 #ifdef __cplusplus 44 } 45 #endif 46