Read value from register, NOT SMP-safe version. This method uses the pre-reading of the APB register before reading the register of the DPORT. There is not disable/enable interrupt. The difference from DPORT_REG_READ() is that the user himself must disable interrupts while DPORT reading. This implementation is useful for reading DORT registers in loop without stall other CPU. Note the usage example. The recommended way to read registers sequentially without stall other CPU is to use the method esp_dport_read_buffer(buff_out, address, num_words). It allows you to read registers in the buffer.
{c}
// This example shows how to use it.
{ // Use curly brackets to limit the visibility of variables in macros DPORT_INTERRUPT_DISABLE/RESTORE.
DPORT_INTERRUPT_DISABLE(); // Disable interrupt only on current CPU.
for (i = 0; i < max; ++i) {
array[i] = esp_dport_access_sequence_reg_read(Address + i * 4); // reading DPORT registers
}
DPORT_INTERRUPT_RESTORE(); // restore the previous interrupt level
}