2023-09-13 21:23:20 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-09-26 05:42:03 -04:00
|
|
|
#include "soc/soc_caps.h"
|
2023-09-13 21:23:20 -04:00
|
|
|
#include "esp_private/periph_ctrl.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2023-09-24 23:12:09 -04:00
|
|
|
#if SOC_PERIPH_CLK_CTRL_SHARED
|
2023-09-26 05:42:03 -04:00
|
|
|
#define HP_UART_SRC_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
2023-09-13 21:23:20 -04:00
|
|
|
#else
|
2023-09-26 05:42:03 -04:00
|
|
|
#define HP_UART_SRC_CLK_ATOMIC()
|
2023-09-13 21:23:20 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if SOC_RCC_IS_INDEPENDENT
|
2023-09-26 05:42:03 -04:00
|
|
|
#define HP_UART_BUS_CLK_ATOMIC()
|
2023-09-13 21:23:20 -04:00
|
|
|
#else
|
2023-09-26 05:42:03 -04:00
|
|
|
#define HP_UART_BUS_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (SOC_UART_LP_NUM >= 1)
|
|
|
|
#define LP_UART_SRC_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
|
|
|
#define LP_UART_BUS_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
2023-09-13 21:23:20 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|