2021-11-06 05:23:21 -04:00
|
|
|
/*
|
2022-01-17 21:32:56 -05:00
|
|
|
* SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
|
2021-11-06 05:23:21 -04:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "soc/dport_access.h"
|
|
|
|
|
|
|
|
// Read a sequence of DPORT registers to the buffer.
|
|
|
|
void esp_dport_access_read_buffer(uint32_t *buff_out, uint32_t address, uint32_t num_words)
|
|
|
|
{
|
2022-04-28 05:44:59 -04:00
|
|
|
DPORT_INTERRUPT_DISABLE();
|
|
|
|
for (uint32_t i = 0; i < num_words; ++i) {
|
2021-11-06 05:23:21 -04:00
|
|
|
buff_out[i] = DPORT_SEQUENCE_REG_READ(address + i * 4);
|
|
|
|
}
|
2022-04-28 05:44:59 -04:00
|
|
|
DPORT_INTERRUPT_RESTORE();
|
2021-11-06 05:23:21 -04:00
|
|
|
}
|