mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
feat(uart): spilt LP and HP uart set_baudrate function
This commit is contained in:
@@ -7,27 +7,28 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if (SOC_UART_LP_NUM >= 1)
|
||||
#define LP_UART_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
||||
#endif
|
||||
|
||||
#if SOC_PERIPH_CLK_CTRL_SHARED
|
||||
#define UART_SCLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
||||
#define HP_UART_SRC_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
||||
#else
|
||||
#define UART_SCLK_ATOMIC()
|
||||
#define HP_UART_SRC_CLK_ATOMIC()
|
||||
#endif
|
||||
|
||||
#if SOC_RCC_IS_INDEPENDENT
|
||||
#define UART_CLK_ATOMIC()
|
||||
#define HP_UART_BUS_CLK_ATOMIC()
|
||||
#else
|
||||
#define UART_CLK_ATOMIC() PERIPH_RCC_ATOMIC()
|
||||
#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()
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user