1 /* 2 * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <stdint.h> 8 #include "soc/dport_access.h" 9 10 // Read a sequence of DPORT registers to the buffer. esp_dport_access_read_buffer(uint32_t * buff_out,uint32_t address,uint32_t num_words)11void esp_dport_access_read_buffer(uint32_t *buff_out, uint32_t address, uint32_t num_words) 12 { 13 DPORT_INTERRUPT_DISABLE(); 14 for (uint32_t i = 0; i < num_words; ++i) { 15 buff_out[i] = DPORT_SEQUENCE_REG_READ(address + i * 4); 16 } 17 DPORT_INTERRUPT_RESTORE(); 18 } 19