feat(mpi): use RCC atomic block to enable/reset the MPI peripheral
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if SOC_RCC_IS_INDEPENDENT
|
||||
#define MPI_RCC_ATOMIC()
|
||||
#else /* !SOC_RCC_IS_INDEPENDENT */
|
||||
#define MPI_RCC_ATOMIC() PERIPH_RCC_ATOMIC()
|
||||
#endif /* SOC_RCC_IS_INDEPENDENT */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user